/* BullApe Dashboard - Dark Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0a0a0a;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: relative;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(253, 184, 19, 0.1);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #FDB813 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s, transform 0.2s;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #FFD700;
    transform: translateY(-1px);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    padding-bottom: 1rem;
    margin-bottom: -0.5rem;
}

.nav-dropdown > a::after {
    content: ' ▾';
    font-size: 0.75rem;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    min-width: 180px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    list-style: none;
}

/* Bridge the gap between trigger and menu */
.nav-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.nav-dropdown .dropdown-menu li {
    padding: 0;
}

.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
}

.nav-dropdown .dropdown-menu a:hover {
    background: rgba(253, 184, 19, 0.15);
    color: #FFD700;
}

/* Nav User */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(51, 65, 85, 0.5);
}

.nav-user .user-name {
    color: #94a3b8;
    font-size: 0.875rem;
}

.btn-logout {
    padding: 0.375rem 0.75rem;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5 !important;
    border-radius: 6px;
    font-size: 0.875rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171 !important;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 20px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #f1f5f9;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(253, 184, 19, 0.15);
    border-color: #FDB813;
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(51, 65, 85, 0.5);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(253, 184, 19, 0.2);
    border-color: rgba(253, 184, 19, 0.5);
}

.stat-card h3 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-card p {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
}

/* Section */
.section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: #1a1a1a;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(253, 184, 19, 0.2);
    border-color: rgba(253, 184, 19, 0.5);
}

.video-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.video-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.video-card h3 a {
    color: #f1f5f9;
    text-decoration: none;
    transition: color 0.3s;
}

.video-card h3 a:hover {
    color: #FFD700;
}

.video-meta {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.video-meta .author {
    font-weight: 500;
    color: #cbd5e1;
}

.video-meta .date {
    margin-left: 1rem;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Channel List */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    background: #1a1a1a;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.channel-item:hover {
    background: #334155;
    border-color: rgba(253, 184, 19, 0.5);
    transform: translateX(4px);
}

.channel-item h4 {
    margin-bottom: 0.25rem;
}

.channel-item h4 a {
    color: #f1f5f9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.channel-item h4 a:hover {
    color: #FFD700;
}

.channel-meta {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Forms */
.edit-form, .add-form {
    max-width: 600px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    font-size: 1rem;
    color: #e2e8f0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FDB813;
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.1);
}

.form-group input:disabled {
    background: #1a1a1a;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-check label {
    display: inline;
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-sm {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(253, 184, 19, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 184, 19, 0.4);
}

.btn-secondary {
    background: #334155;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    color: #000;
    white-space: nowrap;
}

.btn-sm:hover {
    background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
    transform: translateY(-2px);
}

.btn-sm.btn-secondary {
    background: #334155;
}

.btn-sm.btn-secondary:hover {
    background: #475569;
}

.btn-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.btn-link:hover {
    color: #FFE66D;
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.empty-state a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.empty-state a:hover {
    color: #FFE66D;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(253, 184, 19, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(253, 184, 19, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.hiding {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-message {
    flex: 1;
}

.toast-action {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.toast-action:hover {
    background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
    transform: scale(1.05);
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
}


/* ========================================
   PAGE-SPECIFIC STYLES (moved from inline)
   ======================================== */

/* ========================================
   admin_cron_monitor
   ======================================== */

.monitor-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .job-card {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-left: 4px solid #FFD700;
    }

    .job-card.running {
        border-left-color: #27ae60;
    }

    .job-card.error {
        border-left-color: #e74c3c;
    }

    .job-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .job-icon {
        font-size: 2rem;
    }

    .job-info h3 {
        margin: 0;
        font-size: 1.2rem;
        color: #2c3e50;
    }

    .job-schedule {
        font-size: 0.85rem;
        color: #7f8c8d;
        margin-top: 0.25rem;
    }

    .job-description {
        color: #7f8c8d;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .job-status {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 4px;
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    .status-label {
        font-weight: bold;
        color: #7f8c8d;
    }

    .status-value {
        color: #2c3e50;
    }

    .trigger-btn {
        width: 100%;
        padding: 0.75rem;
        background: #FFD700;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 600;
        transition: background 0.2s;
    }

    .trigger-btn:hover {
        background: #2980b9;
    }

    .trigger-btn:disabled {
        background: #95a5a6;
        cursor: not-allowed;
    }

    .logs-container {
        background: #1e1e1e;
        border-radius: 8px;
        padding: 1.5rem;
        margin-top: 2rem;
        max-height: 600px;
        overflow-y: auto;
    }

    .logs-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .logs-header h2 {
        color: white;
        margin: 0;
        font-size: 1.3rem;
    }

    .logs-controls {
        display: flex;
        gap: 0.5rem;
    }

    .control-btn {
        padding: 0.5rem 1rem;
        background: #FFD700;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.85rem;
    }

    .control-btn:hover {
        background: #2980b9;
    }

    .control-btn.danger {
        background: #e74c3c;
    }

    .control-btn.danger:hover {
        background: #c0392b;
    }

    .log-content {
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
        color: #e0e0e0;
        line-height: 1.6;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .log-line {
        padding: 0.25rem 0;
        border-bottom: 1px solid #2d2d2d;
    }

    .log-line:last-child {
        border-bottom: none;
    }

    .log-line.success {
        color: #27ae60;
    }

    .log-line.error {
        color: #e74c3c;
    }

    .log-line.warning {
        color: #f39c12;
    }

    .connection-status {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: #2d2d2d;
        border-radius: 4px;
        color: white;
        font-size: 0.85rem;
    }

    .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #95a5a6;
    }

    .status-dot.connected {
        background: #27ae60;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }

    .empty-logs {
        text-align: center;
        color: #7f8c8d;
        padding: 3rem;
    }

/* ========================================
   admin_invite_codes
   ======================================== */

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    margin-bottom: 0.5rem;
}

.admin-header .subtitle {
    color: var(--text-muted, #94a3b8);
}

.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
}

.stat-label {
    display: block;
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.action-bar {
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.data-table th {
    background: rgba(30, 41, 59, 0.5);
    font-weight: 600;
    color: #e2e8f0;
}

.data-table td {
    color: #cbd5e1;
}

.used-row {
    opacity: 0.6;
}

.invite-code {
    font-family: monospace;
    font-size: 1rem;
    background: rgba(253, 184, 19, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #FFD700;
    letter-spacing: 1px;
}

.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    color: #94a3b8;
    vertical-align: middle;
}

.btn-copy:hover {
    color: #FFD700;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.badge-success {
    background: rgba(253, 184, 19, 0.15);
    color: #6ee7b7;
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

@media (max-width: 1200px) {
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }
}

/* ========================================
   admin_users
   ======================================== */

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    margin-bottom: 0.5rem;
}

.admin-header .subtitle {
    color: #94a3b8;
}

.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
}

.stat-label {
    display: block;
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.data-table th {
    background: rgba(30, 41, 59, 0.5);
    font-weight: 600;
    color: #e2e8f0;
}

.data-table td {
    color: #cbd5e1;
}

.inactive-row {
    opacity: 0.6;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.badge-success {
    background: rgba(253, 184, 19, 0.15);
    color: #6ee7b7;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.badge-info {
    background: rgba(253, 184, 19, 0.15);
    color: #FFE66D;
}

.badge-secondary {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

.auth-method {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.7rem;
    background: rgba(253, 184, 19, 0.1);
    color: #FFD700;
    border-radius: 3px;
    margin-right: 0.25rem;
}

.actions {
    white-space: nowrap;
}

.actions form {
    margin-right: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }
}

/* ========================================
   audit_log
   ======================================== */

.audit-log-page {
        max-width: 1400px;
        margin: 0 auto;
    }

    .audit-table {
        width: 100%;
        border-collapse: collapse;
        background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
        border-radius: 12px;
        overflow: hidden;
    }

    .audit-table thead {
        background: rgba(253, 184, 19, 0.1);
        border-bottom: 2px solid rgba(253, 184, 19, 0.3);
    }

    .audit-table th {
        padding: 1rem;
        text-align: left;
        font-weight: 600;
        color: #e2e8f0;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .audit-table td {
        padding: 1rem;
        border-bottom: 1px solid rgba(51, 65, 85, 0.5);
        color: #cbd5e1;
    }

    .audit-table tbody tr {
        transition: background 0.2s;
    }

    .audit-table tbody tr:hover {
        background: rgba(253, 184, 19, 0.05);
    }

    .timestamp {
        white-space: nowrap;
        font-size: 0.875rem;
    }

    .item-type {
        white-space: nowrap;
    }

    .item-title {
        max-width: 400px;
        word-wrap: break-word;
    }

    .item-link {
        color: #FFD700;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s;
    }

    .item-link:hover {
        color: #FFE66D;
        text-decoration: underline;
    }

    .ip-address code {
        background: rgba(253, 184, 19, 0.1);
        color: #FFE66D;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.875rem;
        font-family: 'Monaco', 'Courier New', monospace;
        border: 1px solid rgba(253, 184, 19, 0.2);
    }

    .action-badge {
        display: inline-block;
        padding: 0.4rem 0.75rem;
        border-radius: 6px;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .action-hide_video,
    .action-hide_channel {
        background: rgba(239, 68, 68, 0.15);
        color: #fca5a5;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .action-unhide_video,
    .action-unhide_channel {
        background: rgba(253, 184, 19, 0.15);
        color: #6ee7b7;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .action-add_channel {
        background: rgba(253, 184, 19, 0.15);
        color: #FFE66D;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .action-transcribe_video {
        background: rgba(168, 85, 247, 0.15);
        color: #c084fc;
        border: 1px solid rgba(168, 85, 247, 0.3);
    }

    .action-summarize_openai {
        background: rgba(253, 184, 19, 0.15);
        color: #6ee7b7;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .action-summarize_claude {
        background: rgba(251, 146, 60, 0.15);
        color: #fdba74;
        border: 1px solid rgba(251, 146, 60, 0.3);
    }

    .action-summarize_gemini {
        background: rgba(253, 184, 19, 0.15);
        color: #FFE66D;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    @media (max-width: 768px) {
        .audit-table {
            font-size: 0.875rem;
        }

        .audit-table th,
        .audit-table td {
            padding: 0.75rem 0.5rem;
        }

        .item-title {
            max-width: 200px;
        }
    }

/* ========================================
   auth_forgot_password
   ======================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    text-align: center;
    color: #f1f5f9;
}

.auth-subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #FDB813;
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.2);
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 184, 19, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #FFD700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #FFE66D;
}

/* ========================================
   auth_login
   ======================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    text-align: center;
    color: #f1f5f9;
}

.auth-subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #FDB813;
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.2);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #cbd5e1;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    accent-color: #FDB813;
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 184, 19, 0.4);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(51, 65, 85, 0.5);
}

.auth-divider span {
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.oauth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-oauth {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.5);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}

.btn-oauth:hover {
    background: rgba(51, 65, 85, 0.5);
    border-color: rgba(253, 184, 19, 0.5);
    color: #e2e8f0;
}

.oauth-icon {
    width: 20px;
    height: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #FFD700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #FFE66D;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #FDB813;
}

.eye-icon {
    stroke-width: 2;
}

/* ========================================
   auth_register
   ======================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    text-align: center;
    color: #f1f5f9;
}

.auth-subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #FDB813;
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.2);
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 184, 19, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #FFD700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #FFE66D;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #FDB813;
}

.eye-icon {
    stroke-width: 2;
}

/* ========================================
   auth_reset_password
   ======================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.auth-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    text-align: center;
    color: #f1f5f9;
}

.auth-subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-subtitle strong {
    color: #FFD700;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #FDB813;
    box-shadow: 0 0 0 3px rgba(253, 184, 19, 0.2);
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 184, 19, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #94a3b8;
}

.auth-footer a {
    color: #FFD700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #FFE66D;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #FDB813;
}

.eye-icon {
    stroke-width: 2;
}

/* ========================================
   database_viewer
   ======================================== */

.database-viewer-page {
        padding: 2rem 0;
    }

    .collection-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        background: white;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .collection-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: #f8f9fa;
        border-radius: 6px;
        text-decoration: none;
        color: #2c3e50;
        transition: all 0.2s;
    }

    .collection-item:hover {
        background: #e9ecef;
        transform: translateX(4px);
    }

    .collection-item.active {
        background: #FFD700;
        color: white;
    }

    .collection-name {
        font-weight: 500;
    }

    .collection-count {
        background: rgba(0, 0, 0, 0.1);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.85rem;
    }

    .collection-item.active .collection-count {
        background: rgba(255, 255, 255, 0.2);
    }

    .documents-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .document-card {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow-x: auto;
    }

    .json-viewer {
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
        font-size: 0.9rem;
        line-height: 1.6;
        color: #2c3e50;
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 4px;
    }

    .json-key {
        color: #8b4513;
        font-weight: 600;
    }

    .json-string {
        color: #2ecc71;
    }

    .json-number {
        color: #FFD700;
    }

    .json-boolean {
        color: #9b59b6;
        font-weight: 600;
    }

    .json-null {
        color: #95a5a6;
        font-style: italic;
    }

    .json-toggle {
        cursor: pointer;
        user-select: none;
        display: inline-block;
        width: 20px;
        color: #7f8c8d;
        font-weight: bold;
    }

    .json-toggle:hover {
        color: #FFD700;
    }

    .json-collapsible {
        margin-left: 20px;
    }

    .json-collapsed {
        display: none;
    }

    .json-line {
        margin: 2px 0;
    }

    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 2rem;
        padding: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .empty-state {
        background: white;
        border-radius: 8px;
        padding: 3rem;
        text-align: center;
        color: #7f8c8d;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    @media (max-width: 768px) {
        .database-viewer-page > div {
            flex-direction: column;
        }

        .collection-list {
            min-width: auto;
        }
    }

/* ========================================
   index
   ======================================== */

.spinner-small {
        width: 12px;
        height: 12px;
        border: 2px solid rgba(253, 184, 19, 0.2);
        border-top: 2px solid #FFD700;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .spinner-large {
        width: 40px;
        height: 40px;
        border: 4px solid rgba(253, 184, 19, 0.2);
        border-top: 4px solid #FFD700;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

/* ========================================
   market_prediction
   ======================================== */

.market-analysis-page {
        padding: 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .page-header h1 {
        margin: 0;
        color: #e2e8f0;
    }

    .subtitle {
        color: #94a3b8;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .controls label {
        color: #94a3b8;
        font-size: 0.9rem;
    }

    #daysSelector {
        padding: 0.5rem 1rem;
        border-radius: 8px;
        background: rgba(30, 41, 59, 0.5);
        color: white;
        border: 1px solid rgba(51, 65, 85, 0.5);
        cursor: pointer;
        font-size: 0.9rem;
    }

    #daysSelector:hover {
        background: rgba(30, 41, 59, 0.7);
        border-color: rgba(253, 184, 19, 0.5);
    }

    /* Empty State */
    .empty-state {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 12px;
        padding: 3rem;
        text-align: center;
    }

    .empty-message {
        font-size: 1.5rem;
        color: #94a3b8;
        margin-bottom: 1rem;
    }

    .empty-hint {
        color: #64748b;
        margin-bottom: 2rem;
    }

    /* Videos Table */
    .videos-table-container {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(51, 65, 85, 0.5);
    }

    .videos-table {
        width: 100%;
        border-collapse: collapse;
    }

    .videos-table thead {
        background: rgba(30, 41, 59, 0.7);
        border-bottom: 2px solid rgba(51, 65, 85, 0.5);
    }

    .videos-table th {
        padding: 1rem;
        text-align: left;
        color: #FFD700;
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .videos-table tbody tr {
        border-bottom: 1px solid rgba(51, 65, 85, 0.3);
        transition: background 0.2s;
    }

    .videos-table tbody tr:hover {
        background: rgba(253, 184, 19, 0.1);
    }

    .videos-table tbody tr:last-child {
        border-bottom: none;
    }

    .videos-table td {
        padding: 1rem;
        color: #e2e8f0;
    }

    .title-cell {
        max-width: 500px;
    }

    .video-link {
        color: #FFD700;
        text-decoration: none;
        transition: color 0.2s;
    }

    .video-link:hover {
        color: #FDB813;
        text-decoration: underline;
    }

    .author-cell {
        color: #94a3b8;
        font-size: 0.9rem;
    }

    .date-cell {
        color: #94a3b8;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .summaries-cell {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .summary-badge {
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
    }

    .badge-openai {
        background: rgba(253, 184, 19, 0.2);
        color: #34d399;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .badge-claude {
        background: rgba(245, 158, 11, 0.2);
        color: #fbbf24;
        border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .badge-gemini {
        background: rgba(253, 184, 19, 0.2);
        color: #FFD700;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .btn-primary {
        background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
        color: #000;
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1.5rem;
        cursor: pointer;
        transition: all 0.3s;
        display: inline-block;
        text-decoration: none;
    }

    .btn-primary:hover {
        background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
        transform: translateY(-2px);
    }

    .btn-secondary {
        background: rgba(100, 116, 139, 0.5);
        color: white;
        border: 1px solid rgba(148, 163, 184, 0.3);
        border-radius: 8px;
        padding: 0.5rem 1rem;
        cursor: pointer;
        transition: all 0.3s;
        display: inline-block;
        text-decoration: none;
        font-weight: 500;
    }

    .btn-secondary:hover {
        background: rgba(100, 116, 139, 0.7);
        border-color: rgba(148, 163, 184, 0.5);
    }

    /* Generate Prediction Section */
    .generate-section {
        margin-top: 2rem;
        text-align: center;
        padding: 1.5rem;
        background: rgba(30, 41, 59, 0.3);
        border-radius: 12px;
    }

    .btn-generate {
        background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 1rem 2rem;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 4px 12px rgba(253, 184, 19, 0.3);
    }

    .btn-generate:hover:not(:disabled) {
        background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(253, 184, 19, 0.4);
    }

    .btn-generate:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Loading Indicator */
    .loading-indicator {
        margin-top: 2rem;
        padding: 2rem;
        text-align: center;
        background: rgba(30, 41, 59, 0.5);
        border-radius: 12px;
        border: 2px solid rgba(253, 184, 19, 0.3);
    }

    .spinner {
        width: 50px;
        height: 50px;
        margin: 0 auto 1rem;
        border: 4px solid rgba(253, 184, 19, 0.2);
        border-top-color: #FDB813;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

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

    .loading-indicator p {
        color: #94a3b8;
        font-size: 1rem;
        margin: 0;
    }

    /* Prediction Results */
    .prediction-results {
        margin-top: 2rem;
        padding: 2rem;
        background: linear-gradient(135deg, rgba(253, 184, 19, 0.1) 0%, rgba(253, 184, 19, 0.1) 100%);
        border-radius: 12px;
        border: 2px solid rgba(253, 184, 19, 0.3);
        animation: slideIn 0.5s ease-out;
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .results-header {
        margin-bottom: 2rem;
    }

    .results-header h3 {
        color: #FDB813;
        margin: 0 0 0.5rem 0;
    }

    .results-subtitle {
        color: #94a3b8;
        margin: 0;
        font-size: 0.9rem;
    }

    .results-subtitle strong {
        color: #FFD700;
    }

    /* Provider Predictions Grid */
    .provider-predictions-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .provider-prediction-card {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 8px;
        border-left: 4px solid;
        padding: 1.5rem;
        transition: all 0.3s;
    }

    .provider-prediction-card:hover {
        background: rgba(30, 41, 59, 0.7);
        transform: translateY(-2px);
    }

    .provider-error-card {
        opacity: 0.7;
    }

    .provider-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    }

    .provider-name {
        font-weight: 600;
        font-size: 1.1rem;
    }

    .provider-model {
        color: #64748b;
        font-size: 0.8rem;
        font-family: monospace;
    }

    .provider-error {
        color: #ef4444;
        font-size: 0.85rem;
        font-weight: 500;
    }

    .provider-prediction-text {
        color: #e2e8f0;
        line-height: 1.6;
        font-size: 0.95rem;
    }

    .provider-error-text {
        color: #f87171;
        font-size: 0.9rem;
    }

    /* Trends Section */
    .trends-section {
        margin-bottom: 1.5rem;
    }

    .trends-section h4 {
        color: #FFD700;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }

    .trends-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .trends-list li {
        color: #e2e8f0;
        font-size: 0.9rem;
        line-height: 1.6;
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        position: relative;
    }

    .trends-list li:before {
        content: "▸";
        position: absolute;
        left: 0;
        color: #FFD700;
        font-weight: bold;
    }

    /* Recommendations Section */
    .recommendations-section {
        margin-top: 1.5rem;
    }

    .recommendations-section h4 {
        color: #FDB813;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }

    .recommendations-grid {
        display: grid;
        gap: 0.75rem;
    }

    .recommendation-card {
        background: rgba(15, 23, 42, 0.5);
        border: 1px solid rgba(51, 65, 85, 0.5);
        border-radius: 6px;
        padding: 0.75rem;
        transition: all 0.2s;
    }

    .recommendation-card:hover {
        background: rgba(15, 23, 42, 0.7);
        border-color: rgba(253, 184, 19, 0.5);
        transform: translateX(4px);
    }

    .rec-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .rec-price-wrapper {
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
    }

    .rec-price-container {
    }

    .rec-price-label {
        font-size: 0.7rem;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.15rem;
        font-weight: 600;
    }

    .rec-price {
        font-size: 1.5rem;
        font-weight: 700;
        color: #10b981;
        font-family: 'Courier New', monospace;
        letter-spacing: 0.5px;
    }

    .rec-price-current {
        color: #fbbf24;
    }

    .sell-recommendation .rec-price {
        color: #ef4444;
    }

    .sell-recommendation .rec-price-current {
        color: #fb923c;
    }

    .rec-symbol {
        font-weight: 700;
        font-size: 1rem;
        color: #e2e8f0;
        font-family: monospace;
    }

    .rec-type {
        padding: 0.2rem 0.5rem;
        border-radius: 10px;
        font-size: 0.7rem;
        font-weight: 600;
        border: 1px solid;
    }

    .rec-name {
        color: #94a3b8;
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .rec-rationale {
        color: #cbd5e1;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Confidence Badges for Market Predictions */
    .rec-confidence-badges {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .confidence-badge {
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .confidence-badge.video-confidence {
        background: rgba(16, 185, 129, 0.3);
        color: #34d399;
    }

    .confidence-badge.video-confidence.sell {
        background: rgba(239, 68, 68, 0.3);
        color: #f87171;
    }

    .confidence-badge.ai-confidence {
        background: rgba(168, 85, 247, 0.3);
        color: #c084fc;
    }

    .rec-confidence-rationales {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(51, 65, 85, 0.5);
    }

    .rec-confidence-rationales .rationale-item {
        font-size: 0.8rem;
        color: #94a3b8;
        margin-bottom: 0.25rem;
    }

    .rec-confidence-rationales .rationale-label {
        font-weight: 600;
    }

    .rec-confidence-rationales .rationale-label.video-label {
        color: #34d399;
    }

    .rec-confidence-rationales .rationale-label.sell-label {
        color: #f87171;
    }

    .rec-confidence-rationales .rationale-label.ai-label {
        color: #c084fc;
    }

    .no-recommendations {
        color: #64748b;
        font-style: italic;
        font-size: 0.9rem;
    }

    /* Source Videos Section */
    .source-videos-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(51, 65, 85, 0.5);
    }

    .source-videos-section h4 {
        color: #FFD700;
        margin-top: 0;
        margin-bottom: 1rem;
        font-size: 1rem;
    }

    .source-videos-list {
        display: grid;
        gap: 0.75rem;
    }

    .source-video-item {
        background: rgba(30, 41, 59, 0.4);
        padding: 1rem;
        border-radius: 8px;
        border-left: 3px solid rgba(253, 184, 19, 0.5);
        transition: all 0.2s;
    }

    .source-video-item:hover {
        background: rgba(30, 41, 59, 0.6);
        border-left-color: #FDB813;
    }

    .source-video-item .video-title {
        color: #FFD700;
        text-decoration: none;
        font-weight: 500;
        display: block;
        margin-bottom: 0.5rem;
        transition: color 0.2s;
    }

    .source-video-item .video-title:hover {
        color: #FDB813;
        text-decoration: underline;
    }

    .source-video-item .video-details {
        display: flex;
        gap: 1rem;
        font-size: 0.85rem;
    }

    .source-video-item .video-author {
        color: #94a3b8;
    }

    .source-video-item .video-date {
        color: #64748b;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .market-analysis-page {
            padding: 1rem;
        }

        .page-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .videos-table-container {
            overflow-x: auto;
        }

        .videos-table {
            min-width: 600px;
        }

        .title-cell {
            max-width: 250px;
        }

        .btn-generate {
            padding: 0.75rem 1.5rem;
            font-size: 0.9rem;
        }

        .prediction-meta {
            flex-direction: column;
        }
    }

/* ========================================
   prediction_history
   ======================================== */

.history-page {
        padding: 2rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .page-header h1 {
        margin: 0;
        color: #e2e8f0;
    }

    .subtitle {
        color: #94a3b8;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    .btn-primary {
        background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
        color: #000;
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1.5rem;
        cursor: pointer;
        transition: all 0.3s;
        display: inline-block;
        text-decoration: none;
        font-weight: 600;
    }

    .btn-primary:hover {
        background: linear-gradient(135deg, #FFA500 0%, #CC8400 100%);
        transform: translateY(-2px);
    }

    .empty-state {
        background: rgba(30, 41, 59, 0.5);
        border-radius: 12px;
        padding: 3rem;
        text-align: center;
    }

    .empty-message {
        font-size: 1.5rem;
        color: #94a3b8;
        margin-bottom: 1rem;
    }

    .empty-hint {
        color: #64748b;
        margin-bottom: 2rem;
    }

    .group-section {
        margin-bottom: 3rem;
    }

    .group-section h2 {
        color: #FFD700;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .predictions-list {
        display: grid;
        gap: 1.5rem;
    }

    .prediction-card {
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
        border-radius: 12px;
        border: 1px solid rgba(51, 65, 85, 0.5);
        overflow: hidden;
        transition: all 0.3s;
    }

    .prediction-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border-color: rgba(253, 184, 19, 0.5);
    }

    .card-header {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(51, 65, 85, 0.5);
        background: rgba(30, 41, 59, 0.5);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .timestamp {
        color: #94a3b8;
        font-size: 0.85rem;
    }

    .badges {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .badge {
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 500;
    }

    .badge-days {
        background: rgba(253, 184, 19, 0.2);
        color: #FFD700;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .badge-videos {
        background: rgba(253, 184, 19, 0.2);
        color: #34d399;
        border: 1px solid rgba(253, 184, 19, 0.3);
    }

    .badge-provider {
        background: rgba(245, 158, 11, 0.2);
        color: #fbbf24;
        border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .card-content {
        padding: 1.5rem;
    }

    .prediction-text {
        color: #e2e8f0;
        line-height: 1.6;
        margin: 0;
    }

    .provider-prediction-mini {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    }

    .provider-prediction-mini:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .provider-header-mini {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .provider-label {
        color: #FFD700;
        font-size: 0.95rem;
    }

    .model-badge {
        background: rgba(100, 116, 139, 0.3);
        color: #cbd5e1;
        padding: 0.2rem 0.6rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-family: monospace;
        border: 1px solid rgba(100, 116, 139, 0.4);
    }

    .prediction-text-mini {
        color: #e2e8f0;
        line-height: 1.6;
        margin: 0;
        font-size: 0.95rem;
    }

    .prediction-error-mini {
        color: #f87171;
        margin: 0;
        font-size: 0.9rem;
        font-style: italic;
    }

    .section-title {
        color: #FFD700;
        font-size: 0.85rem;
        display: block;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .trends-mini {
        margin-bottom: 1rem;
    }

    .trends-list-mini {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .trends-list-mini li {
        color: #cbd5e1;
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 0.3rem 0;
        padding-left: 1.2rem;
        position: relative;
    }

    .trends-list-mini li:before {
        content: "▸";
        position: absolute;
        left: 0;
        color: #FFD700;
    }

    .recommendations-mini {
        margin-top: 1rem;
    }

    .recs-list-mini {
        display: grid;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .rec-item-mini {
        background: rgba(15, 23, 42, 0.3);
        padding: 0.5rem;
        border-radius: 4px;
        font-size: 0.85rem;
        line-height: 1.5;
        color: #cbd5e1;
        border: 1px solid rgba(51, 65, 85, 0.3);
    }

    .rec-symbol-mini {
        font-weight: 700;
        color: #e2e8f0;
        font-family: monospace;
    }

    .rec-type-mini {
        background: rgba(253, 184, 19, 0.2);
        color: #FFD700;
        padding: 0.1rem 0.4rem;
        border-radius: 8px;
        font-size: 0.7rem;
        text-transform: uppercase;
        font-weight: 600;
    }

    /* Mini Confidence Badges for Prediction History */
    .rec-header-mini {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-bottom: 0.25rem;
    }

    .rec-price-mini {
        font-size: 1.1rem;
        font-weight: 700;
        color: #10b981;
        font-family: 'Courier New', monospace;
        letter-spacing: 0.5px;
    }

    .rec-price-mini.rec-price-current {
        color: #fbbf24;
    }

    .rec-price-mini.sell-price {
        color: #ef4444;
    }

    .rec-price-mini.rec-price-current.sell-price {
        color: #fb923c;
    }

    .confidence-badge-mini {
        padding: 0.1rem 0.4rem;
        border-radius: 4px;
        font-size: 0.65rem;
        font-weight: 600;
    }

    .confidence-badge-mini.video {
        background: rgba(16, 185, 129, 0.3);
        color: #34d399;
    }

    .confidence-badge-mini.sell {
        background: rgba(239, 68, 68, 0.3);
        color: #f87171;
    }

    .confidence-badge-mini.ai {
        background: rgba(168, 85, 247, 0.3);
        color: #c084fc;
    }

    .rec-detail-mini {
        color: #cbd5e1;
        line-height: 1.4;
    }

    .rec-rationale-mini {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(51, 65, 85, 0.3);
        font-size: 0.75rem;
        color: #94a3b8;
    }

    .rec-rationale-mini .rationale-video {
        display: block;
        margin-bottom: 0.25rem;
    }

    .rec-rationale-mini .rationale-video::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #34d399;
        border-radius: 2px;
        margin-right: 0.5rem;
    }

    .rec-rationale-mini .rationale-sell {
        display: block;
        margin-bottom: 0.25rem;
    }

    .rec-rationale-mini .rationale-sell::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #f87171;
        border-radius: 2px;
        margin-right: 0.5rem;
    }

    .rec-rationale-mini .rationale-ai {
        display: block;
    }

    .rec-rationale-mini .rationale-ai::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #c084fc;
        border-radius: 2px;
        margin-right: 0.5rem;
    }

    .videos-used-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(51, 65, 85, 0.5);
    }

    .videos-used-header {
        color: #94a3b8;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }

    .videos-used-list {
        display: grid;
        gap: 0.75rem;
    }

    .video-used-item {
        background: rgba(30, 41, 59, 0.3);
        border-radius: 6px;
        border: 1px solid rgba(51, 65, 85, 0.3);
        transition: all 0.2s;
    }

    .video-used-item:hover {
        background: rgba(30, 41, 59, 0.5);
        border-color: rgba(253, 184, 19, 0.4);
        transform: translateX(4px);
    }

    .video-used-link {
        display: block;
        padding: 0.75rem 1rem;
        text-decoration: none;
        color: inherit;
    }

    .video-used-title {
        color: #e2e8f0;
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
        line-height: 1.4;
    }

    .video-used-meta {
        display: flex;
        gap: 1rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .video-used-author {
        color: #94a3b8;
    }

    .video-used-date {
        color: #64748b;
        font-family: monospace;
    }

    .card-footer {
        padding: 1rem 1.5rem;
        background: rgba(30, 41, 59, 0.5);
        border-top: 1px solid rgba(51, 65, 85, 0.5);
    }

    .prediction-id {
        color: #64748b;
        font-size: 0.8rem;
        font-family: monospace;
    }

    @media (max-width: 768px) {
        .history-page {
            padding: 1rem;
        }

        .page-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .card-header {
            flex-direction: column;
            align-items: flex-start;
        }
    }

/* ========================================
   transcribed_videos
   ======================================== */

.video-list-vertical {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .video-list-item {
        display: flex;
        gap: 1.5rem;
        padding: 1.5rem;
        background: white;
        border-bottom: 1px solid #e1e8ed;
        transition: background-color 0.2s;
    }

    .video-list-item:hover {
        background-color: #f8f9fa;
    }

    .video-thumbnail-small {
        flex-shrink: 0;
        width: 180px;
        height: 101px;
        border-radius: 6px;
        overflow: hidden;
    }

    .video-thumbnail-small img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.2s;
    }

    .video-thumbnail-small:hover img {
        transform: scale(1.05);
    }

    .video-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
    }

    .video-header h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .video-header h3 a {
        color: #2c3e50;
        text-decoration: none;
    }

    .video-header h3 a:hover {
        color: #FFD700;
    }

    .video-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        font-size: 0.9rem;
        color: #7f8c8d;
        margin-bottom: 0.75rem;
    }

    .video-meta .separator {
        color: #bdc3c7;
    }

    .video-meta .author {
        font-weight: 500;
        color: #34495e;
    }

    .video-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    @media (max-width: 768px) {
        .video-list-item {
            flex-direction: column;
        }

        .video-thumbnail-small {
            width: 100%;
            height: auto;
            aspect-ratio: 16/9;
        }
    }

/* ========================================
   video_detail
   ======================================== */

.spinner {
            width: 16px;
            height: 16px;
            border: 2px solid rgba(253, 184, 19, 0.2);
            border-top: 2px solid #FFD700;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
/* ========================================
   MOBILE-FIRST ENHANCEMENTS
   ======================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #FFD700;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    /* Show hamburger button on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Mobile Navigation */
    .navbar .container {
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #1a1a1a;
        flex-direction: column;
        padding: 80px 0 20px;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 10001;
        border-left: 2px solid #FDB813;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Ensure navbar stays on top */
    .navbar {
        position: relative;
        z-index: 10002;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(253, 184, 19, 0.1);
    }

    .nav-menu > li > a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: left;
        font-size: 1.1rem;
    }

    /* Mobile dropdown */
    .nav-dropdown .dropdown-menu {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.3);
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .nav-dropdown > a::after {
        float: right;
    }

    /* Mobile user section */
    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        border-left: none;
        border-top: 2px solid #FDB813;
        gap: 0.5rem;
    }

    .btn-logout {
        width: 100%;
        text-align: center;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
    }

    /* Adjust main content */
    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 1.5rem 15px;
    }

    /* Improved touch targets (minimum 44x44px) */
    .btn-primary, .btn-secondary, .btn-sm {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Nav menu buttons on mobile */
    .nav-menu .btn-primary {
        display: inline-flex;
        width: auto;
        max-width: 100%;
    }

    /* Tables scroll horizontally on mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Video grid - single column on mobile */
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Stats grid - stack on mobile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Form adjustments */
    .edit-form, .add-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-actions {
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100% !important;
    }

    /* Channel items stack better */
    .channel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .video-actions {
        width: 100%;
    }

    .video-actions .btn-sm {
        flex: 1;
    }

    /* Toast notifications */
    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        width: auto;
    }

    /* Footer */
    footer {
        padding: 1rem 0;
        font-size: 0.875rem;
    }

    /* Headings */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* Tablet Styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.95rem;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles (1024px+) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

/* Improve touch feedback */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets for mobile */
    a, button, .btn-sm, .btn-primary, .btn-secondary {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-sm:hover {
        transform: none;
    }

    /* Add active state for touch feedback */
    .btn-primary:active,
    .btn-secondary:active,
    .btn-sm:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    a:active, button:active {
        opacity: 0.7;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 10000;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-title {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
}

/* Twitter accounts modal overrides */
.modal.modal-twitter {
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.65);
}

.modal-content.modal-content-twitter {
    background-color: #111827;
    color: #e5e7eb;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    max-width: 500px;
    border: 1px solid #1f2937;
}

.modal-twitter .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #1f2937;
    background: #0b1220;
}

.modal-twitter .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-twitter .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #cbd5f5;
}

.modal-twitter .close-btn:hover {
    color: #ffffff;
}

.modal-twitter .modal-content form {
    padding: 1.5rem;
}

.modal-twitter .form-group {
    margin-bottom: 1rem;
}

.modal-twitter .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e5e7eb;
}

.modal-twitter .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #334155;
    border-radius: 4px;
    font-size: 1rem;
    color: #e5e7eb;
    background: #0f172a;
}

.modal-twitter .form-control:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.modal-twitter .form-control::placeholder {
    color: #94a3b8;
}

.modal-twitter small {
    color: #94a3b8;
}

.separator {
    color: #666;
    margin: 0 8px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing Page Styles */
.landing-hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: white;
    margin: -20px -20px 40px -20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FDB813 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #FDB813;
    color: #FDB813;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #FDB813;
    color: #000;
}

.features-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(253, 184, 19, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #FDB813;
}

.feature-card p {
    color: #ccc;
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(253, 184, 19, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-radius: 12px;
    margin: 40px 0;
}

.cta-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #fff;
}

/* Responsive adjustments for landing page */
@media (max-width: 768px) {
    .landing-hero {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .modal {
        align-items: center;
        padding: 10px;
    }

    .modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        padding: 30px 20px;
        width: calc(100% - 20px);
        max-width: calc(100vw - 40px);
        max-height: 85vh;
        margin: 0;
        position: relative;
        box-sizing: border-box;
    }

    .modal-content * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .features-section {
        padding: 40px 20px;
    }

    .cta-section {
        padding: 60px 20px;
    }

    .cta-section h2 {
        font-size: 24px;
    }
}
