/* ========================================
   SEARCH HISTORY
   ======================================== */

.search-history {
    background: var(--card-bg, #1f2937);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #e5e7eb);
}

.clear-history-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.search-history-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-history-item {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    text-align: left;
    color: var(--text-color, #e5e7eb);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.search-history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

/* ========================================
   ADVANCED SEARCH FILTERS
   ======================================== */

.advanced-filters {
    background: var(--card-bg, #1f2937);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #e5e7eb);
}

.filter-group select,
.filter-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-color, #e5e7eb);
    font-size: 14px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ========================================
   SIMILAR MODELS SECTION
   ======================================== */

.similar-models-section {
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.similar-models-header {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color, #e5e7eb);
}

.similar-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ========================================
   SHARE BUTTONS
   ======================================== */

.share-btn {
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.share-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.share-btn:active {
    transform: translateY(0);
}

/* ========================================
   FULLSCREEN & PIP CONTROLS
   ======================================== */

.media-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ========================================
   TIKTOK ENHANCED CONTROLS
   ======================================== */

.tiktok-controls-enhanced {
    position: absolute;
    bottom: 80px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

.speed-control,
.quality-control {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.speed-control:hover,
.quality-control:hover {
    background: rgba(0, 0, 0, 0.9);
}

.loop-toggle {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.loop-toggle.active {
    background: #3b82f6;
}

/* ========================================
   NOTIFICATIONS PANEL
   ======================================== */

.notifications-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 360px;
    max-height: 500px;
    background: var(--card-bg, #1f2937);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1000;
    display: none;
}

.notifications-panel.show {
    display: flex;
    flex-direction: column;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-color, #e5e7eb);
}

.notifications-list {
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
}

.notification-item.unread::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    margin-right: 8px;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-color, #e5e7eb);
}

.notification-message {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
    color: #6b7280;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
}

/* ========================================
   PREMIUM BADGE
   ======================================== */

.ad-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 8px;
}

/* ========================================
   REPORT MODAL
   ======================================== */

.report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.report-modal.show {
    display: flex;
}

.report-modal-content {
    background: var(--card-bg, #1f2937);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.report-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color, #e5e7eb);
}

.report-form-group {
    margin-bottom: 16px;
}

.report-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color, #e5e7eb);
}

.report-form-group select,
.report-form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-color, #e5e7eb);
    font-size: 14px;
}

.report-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ========================================
   ACCESSIBILITY STYLES
   ======================================== */

.high-contrast {
    --bg-color: #000;
    --card-bg: #1a1a1a;
    --text-color: #fff;
}

[data-font-size="small"] {
    font-size: 14px;
}

[data-font-size="medium"] {
    font-size: 16px;
}

[data-font-size="large"] {
    font-size: 18px;
}

[data-font-size="x-large"] {
    font-size: 20px;
}

.reduced-motion * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
}

/* ========================================
   INFINITE SCROLL
   ======================================== */

.infinite-scroll-sentinel {
    height: 1px;
    visibility: hidden;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--text-color, #e5e7eb);
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .notifications-panel {
        width: calc(100% - 32px);
        right: 16px;
        left: 16px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .similar-models-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .media-controls {
        bottom: 8px;
        right: 8px;
        gap: 6px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .tiktok-controls-enhanced {
        bottom: 60px;
        right: 8px;
        gap: 8px;
    }
}
