:root {
    --bg-dark: #121212;
    --bg-light: #ffffff;
    --window-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: rgba(224, 224, 224, 0.6);
    --text-dim: rgba(224, 224, 224, 0.4);
    --primary: #3498db;
    --primary-hover: #2980b9;
    --btn-bg: #2c3e50;
    --btn-text: #ffffff;
    --input-bg: #2a2a2a;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --panel-bg: rgba(255, 255, 255, 0.03);
    --header-gradient: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    --card-bg: #1a1a1a;

    --link-text: #3498db;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}


body:not(.landing-page) {
    overflow: hidden;
}

.dark-theme {
    --bg-dark: #121212;
    --window-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: rgba(224, 224, 224, 0.6);
    --text-dim: rgba(224, 224, 224, 0.4);
    --input-bg: #2a2a2a;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --panel-bg: rgba(255, 255, 255, 0.03);
    --header-gradient: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
}


.light-theme {
    --bg-dark: #f5f7fa;
    --window-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: rgba(44, 62, 80, 0.7);
    --text-dim: rgba(44, 62, 80, 0.5);
    --input-bg: #ffffff;
    --input-border: #dcdde1;
    --border-subtle: rgba(0, 0, 0, 0.1);
    --panel-bg: rgba(0, 0, 0, 0.02);
    --header-gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    --btn-bg: #e0e0e0;

    --btn-text: #2c3e50;
}


/* Landing Page Styles */
/* Landing Page Styles */
.landing-page {
    background: radial-gradient(circle at center, #0f172a, #1e293b, #000000);
    background-size: 200% 200%;
    animation: gradientBG 20s ease infinite;
    min-height: 100vh;
    color: white;
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
    /* Ensure scrollable */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.landing-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    /* Takes up most of the initial view */
    margin-bottom: 4rem;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease;
}

.hero-section .glass-panel {
    width: 100%;
    max-width: 700px;
    padding: 4rem 2rem;
}

.status-green {
    color: #2ecc71 !important;
}

.status-gray {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Display Configuration Section */
.display-config-section {
    padding: 2rem 1rem 4rem;
    width: 100%;
}

.display-config-card {
    padding: 2.5rem !important;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--primary) !important;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.display-detection-info {
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.detection-text {
    font-size: 1.05rem;
}

.icon-bulb {
    font-size: 1.4rem;
    margin-right: 0.5rem;
}

.display-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    text-align: left;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    letter-spacing: -0.5px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan-line 3s linear infinite;
    opacity: 0.3;
}

@keyframes scan-line {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.stat-item:hover {
    background: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
    border-color: rgba(52, 152, 219, 0.3);
}

.fullscreen-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.4rem;
    display: block;
    font-weight: 400;
}

.kbd-shortcut {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 0.7rem;
    margin: 0 2px;
}

.display-config-card {
    border-left: 4px solid var(--primary) !important;
}

.status-green {
    color: #2ecc71 !important;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.status-warning {
    color: #f1c40f !important;
}

/* Intelligence Header Animation */
.section-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #3498db;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 0.4;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.6rem;
    }

    .display-config-card {
        padding: 1.5rem !important;
    }

    .stat-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .display-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .display-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Splash Image */
.splash-container {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.splash-gif {
    max-width: 100%;
    width: 280px;
    /* Adjust as needed */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.2);
}

/* Header & Typography */
.hero-header {
    margin-bottom: 3rem;
}

.logo-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-logo {
    width: 48px;
    height: auto;
}

.app-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.hero-tagline {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: left;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: #94a3b8;
    line-height: 1.6;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--bg-dark);
    border-right: 1px solid var(--input-border);
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    position: relative;
    height: 100vh;
    transition: width 0.3s ease;
}

.sidebar-splash {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    border-radius: 8px;
    opacity: 0.9;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding: 0.5rem;
    flex-shrink: 0;
}

.sidebar-header .app-icon {
    width: 38px;
    height: auto;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


.nav-links {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.nav-links::-webkit-scrollbar {
    width: 4px;
}

.nav-links::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.nav-item {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-item:hover {
    background-color: var(--panel-bg);
    color: var(--text-main);
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    /* Active items always white text for contrast */
}

.nav-item-sep {
    height: 1px;
    background: var(--border-subtle);
    margin: 10px 0;
    flex-shrink: 0;
}


.auth-btn-item {
    margin-top: auto;
    border: 1px solid rgba(52, 152, 219, 0.3);
    background: rgba(52, 152, 219, 0.05);
}

.auth-btn-item:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--primary);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: var(--window-bg);
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

.tab-content.active {
    display: block;
}

/* App Mirrored UI Elements */
.app-mirrored-ui {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: max-width 0.3s ease;
}

@media (min-width: 2500px) {
    .app-mirrored-ui {
        max-width: 1800px;
    }

    .video-list-section {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}


.input-area-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row label {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 40px;
}

.url-input-row input {
    flex: 1;
}

.grid-controls-row input[type="number"] {
    width: 60px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.spacer {
    flex: 1;
}

/* Mirrored Button Styles */
.btn-app {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    transition: background 0.2s;
}

.btn-app:hover {
    background-color: var(--primary);
}

.rec-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    margin-right: 5px;
}

/* Video List Mirror */
.section-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.scroll-list {
    min-height: 120px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    border-radius: 4px;
    padding: 0.5rem;
    overflow-y: auto;
}

/* URL Display Mirror */
.url-display-box {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 0.5rem;
}

.url-display-box a {
    color: var(--link-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.instructions-text {
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    opacity: 0.7;
}

/* Website Button Bottom */
.website-footer-section {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.website-btn-container {
    padding: 5px;
    border: 2px solid var(--link-text);
    border-radius: 8px;
    background-color: rgba(52, 152, 219, 0.1);
    cursor: pointer;
}

.website-gif-btn {
    width: 120px;
    height: 60px;
    display: block;
}

/* Form Elements */
input[type="text"],
input[type="number"],
select {
    padding: 8px 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
}

input:focus {
    border-color: var(--primary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background-color: var(--window-bg);
    width: 95%;
    max-width: 650px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 90vh;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}


.modal-close:hover {
    opacity: 1;
}

.modal-tabs {
    display: flex;
    background-color: var(--bg-dark);
    padding: 0 1rem;
    border-bottom: 1px solid var(--input-border);
    flex-shrink: 0;
}

.modal-tab-btn {
    padding: 12px 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}


.modal-tab-btn:hover {
    opacity: 1;
}

.modal-tab-btn.active {
    opacity: 1;
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.modal-body {
    padding: 1.2rem;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

/* Custom scrollbar for webkit */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* Settings Specific Layouts */
.settings-section {
    margin-bottom: 1.2rem;
}

.settings-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}


.settings-section-box {
    background: var(--panel-bg);
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}


.settings-section-box h4 {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}


.settings-section-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section-col {
    display: flex;
    flex-direction: column;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.settings-grid-single {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}


.settings-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.section-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 1rem;
}


.section-note.italic {
    font-style: italic;
}

.section-note.blue-note {
    color: #4da3ff;
}

.status-label {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.status-green {
    color: #2ecc71;
    font-weight: bold;
}

.status-gray {
    color: #95a5a6;
    font-weight: bold;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

/* Utility Classes */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.large-modal {
    max-width: 800px;
    width: auto;
    min-width: 600px;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-suffix input {
    flex: 1;
}

.input-with-suffix span {
    font-size: 0.85rem;
    color: var(--text-dim);
}


.input-with-btn {
    display: flex;
    gap: 5px;
}

.input-with-btn input {
    flex: 1;
}

.readonly-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    cursor: default;
    color: #95a5a6 !important;
}

.btn-icon {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group input[type="range"] {
    flex: 1;
}

.slider-group span {
    font-size: 0.85rem;
    width: 35px;
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.dense-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 0.8rem;
}

.dense-row .form-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.dense-row label {
    margin-bottom: 0;
    white-space: nowrap;
}

.dense-row input[type="number"],
.dense-row select {
    padding: 4px 8px;
}

.btn.primary-flat {
    background-color: #2980b9;
    color: white;
    /* Contrast */
    font-weight: bold;
}


.btn.primary-flat:hover {
    background-color: #3498db;
}

.modal-container.tiny-modal {
    max-width: 400px;
    height: auto;
    max-height: 85vh;
    flex-direction: column;
    overflow: hidden;
    /* Ensure content clips for scrolling */
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    /* Take remaining space */
    min-height: 0;
    /* Crucial for nested flex scrolling */
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--input-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.btn-app.tertiary {
    background-color: transparent;
    border: 1px solid var(--input-border);
    color: var(--text-main);
}


.btn-app.tertiary:hover {
    background-color: var(--panel-bg);
}


/* Video Grid Wall Styles */
.grid-page {
    margin: 0;
    padding: 10px;
    background-color: #000;
    overflow: hidden;
    height: 100vh;
}

.video-grid {
    display: grid;
    gap: 10px;
    width: 100%;
    height: 100%;
}

.video-item {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video List Actions */
.video-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--input-bg);
    margin-bottom: 5px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: background-color 0.2s;
    position: relative;
}

.video-list-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.video-info {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.video-number {
    font-weight: bold;
    color: var(--primary);
    margin-right: 10px;
    min-width: 25px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.platform-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
    line-height: 1;
}

.platform-youtube {
    background: #ff0000;
    color: white;
}

.platform-twitch {
    background: #9146ff;
    color: white;
}

.platform-tiktok {
    background: #000;
    color: #fff;
    border: 1px solid #fe2c55;
}

.platform-vimeo {
    background: #1ab7ea;
    color: white;
}

.platform-dailymotion {
    background: #0062ff;
    color: white;
}

.vid-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-tag {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 10px;
    opacity: 0.8;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}


.options-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;

    padding: 2px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    opacity: 0.7;
    line-height: 1;
}

.options-btn:hover {
    background-color: var(--panel-bg);
    opacity: 1;
}


/* Dropdown Menu */
.options-dropdown {
    position: absolute;
    right: 35px;
    /* Position to the left of the button */
    /* Position to the left of the button */
    top: 0;
    transform: none;
    background-color: var(--window-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 220px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    padding: 5px 0;
    max-height: 300px;
    overflow-y: auto;
}

/* Custom Scrollbar for Dropdown */
.options-dropdown::-webkit-scrollbar {
    width: 6px;
}

.options-dropdown::-webkit-scrollbar-track {
    background: var(--input-bg);
}

.options-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.options-dropdown::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.options-dropdown.active {
    display: flex;
}

.dropdown-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: background-color 0.2s;

    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background-color: var(--primary);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--input-border);
    margin: 4px 0;
}

.dropdown-header {
    padding: 5px 15px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: bold;

    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* --- Advanced Monitoring & Log Viewer --- */
.log-viewer {
    background-color: #0d1117;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    color: #e6edf3;
    border-left: 3px solid transparent;
    padding-left: 8px;
}

.log-entry.system {
    color: #8b949e;
    border-left-color: #8b949e;
}

.log-entry.info {
    color: #58a6ff;
    border-left-color: #58a6ff;
}

.log-entry.warning {
    color: #d29922;
    border-left-color: #d29922;
}

.log-entry.error {
    color: #f85149;
    border-left-color: #f85149;
}

.log-entry.success {
    color: #3fb950;
    border-left-color: #3fb950;
}

.log-viewer::-webkit-scrollbar {
    width: 6px;
}

.log-viewer::-webkit-scrollbar-track {
    background: transparent;
}

.log-viewer::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
}

.log-viewer::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

.btn-block {
    display: block;
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-dim);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);

}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary);
}

.user-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.text-center {
    text-align: center;
}

/* Admin Panel Styles */
.user-list-container {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.user-table th,
.user-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--input-border);
}

.user-table th {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    font-weight: 600;
}

.user-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-free {
    background-color: #95a5a6;
    color: white;
}

.badge-subscribed {
    background-color: #2ecc71;
    color: white;
}

.badge-creator {
    background-color: #e67e22;
    color: white;
}

.badge-broadcaster {
    background-color: #1abc9c;
    color: white;
}

.badge-partner {
    background-color: #9b59b6;
    color: white;
}

.badge-admin {
    background-color: #e74c3c;
    color: white;
}

.badge-cofounder {
    background-color: #f1c40f;
    color: #2c3e50;
}

.badge-enterprise {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
}

/* Badge Icons */
.badge-icon {
    height: 14px;
    width: auto;
    vertical-align: middle;
    margin-left: 5px;
    display: inline-block;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-main);
}


.type-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Dashboard Welcome Page Styles */
.welcome-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.welcome-splash-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.welcome-splash-gif {
    max-width: 100%;
    width: 250px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(52, 152, 219, 0.3);
}

.welcome-subtitle {
    color: var(--text-muted);

    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.welcome-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.glass-panel-dashboard {
    background: var(--panel-bg);

    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-panel-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.welcome-card .card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.feature-list {
    list-style: none;
    margin-top: 1rem;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}


.feature-list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.quick-start-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}



.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}


/* Account Settings Profile Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #2980b9);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.profile-details h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.email-text {
    color: var(--text-muted);

    margin: 0.2rem 0 0.5rem 0;
    font-size: 0.9rem;
}

.account-badges {
    display: flex;
    gap: 0.5rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.security-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.tiny-modal {
    max-width: 400px;
    width: 90%;
}

/* Profile Image Handling */
.profile-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.profile-avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay span {
    font-size: 1.5rem;
}

#cp-onboarding-container {
    transition: opacity 0.3s ease;
}

#cp-benefits-view .welcome-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

#cp-benefits-view .welcome-card {
    text-align: center;
    padding: 2rem;
}

.btn-glow {
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(52, 152, 219, 0.7);
    }

    100% {
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
    }
}

/* Support Ticket Styles */
.support-list-container {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.ticket-item {
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-subtle);
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Chat Styles in Ticket Modal */
.chat-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
}

.badge-success {
    background-color: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge-secondary {
    background-color: #7f8c8d;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge-info {
    background-color: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

/* --- Admin Edit Toggle & Toggle Switches --- */
.switch-label {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Help & Documentation Alignment */
#help.tab-content .glass-panel-dashboard {
    text-align: center;
}

#help.tab-content .glass-panel-dashboard ul,
#help.tab-content .glass-panel-dashboard ol {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
}

.slider.round {
    border-radius: 22px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Global Edit Hiding Logic */
.hide-edit-buttons #editWelcomePageBtn,
.hide-edit-buttons #editCpPageBtn,
.hide-edit-buttons #scheduleMaintenanceBtn,
.hide-edit-buttons #editHelpPageBtn,
.hide-edit-buttons #editPlansBtn,
.hide-edit-buttons #editTeamAppsBtn {
    display: none !important;
}

/* Plans Page Styles - Flat Minimalist Redesign */
#plans.tab-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 10;
}

#plans.tab-content.active {
    display: block !important;
    animation: fadeInFlat 0.3s ease-out;
}

@keyframes fadeInFlat {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.plans-header {
    text-align: left;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.plans-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.plans-header .section-note {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.billing-toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 1.5rem;
    padding: 8px 16px;
    background: var(--bg-dark);
    border-radius: 8px;
    width: fit-content;
    border: 1px solid var(--border-subtle);
}

.billing-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.billing-label.active {
    color: var(--primary);
}

.plans-header .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.plans-header .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.plans-header .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--btn-bg);
    transition: .2s;
    border: 1px solid var(--border-subtle);
}

.plans-header .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-main);
    transition: .2s;
}

.plans-header input:checked+.slider {
    background-color: var(--primary);
}

.plans-header input:checked+.slider:before {
    transform: translateX(22px);
    background-color: white;
}

.plans-header .slider.round {
    border-radius: 4px;
}

.plans-header .slider.round:before {
    border-radius: 2px;
}

.discount-badge {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
    font-weight: 700;
    border: 1px solid rgba(230, 126, 34, 0.3);
}

.pricing-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .pricing-container {
        grid-template-columns: 1fr;
    }
}


.pricing-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle) !important;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.welcome-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.partner-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

.pricing-card.recommended {
    border-color: var(--primary) !important;
    background: rgba(52, 152, 219, 0.05);
}

.pricing-card.broadcaster {
    border-color: #f1c40f !important;
    background: rgba(241, 196, 15, 0.03);
}

.pricing-card.creator {
    border-color: #9b59b6 !important;
}

.recommended-badge,
.tier-badge {
    position: absolute;
    top: -10px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.recommended-badge {
    left: 1.5rem;
    background: var(--primary);
    color: white;
}

.tier-badge {
    right: 1.5rem;
    background: #f1c40f;
    color: #000;
}


.plan-header h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.price {
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price .currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.price .amount {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.price .period {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.benefit-list {
    list-style: none;
    margin-bottom: 2rem;
    flex: 1;
    padding: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.5rem;
}

.benefit-list li {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.benefit-list li.restriction {
    color: var(--text-dim);
}

.benefit-list li.restriction span {
    opacity: 0.5;
}

.benefit-list li span {
    font-size: 0.9rem;
    min-width: 18px;
}

.pricing-card .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card .btn:hover:not(:disabled) {
    background: var(--btn-hover);
    border-color: var(--text-muted);
}

.pricing-card.recommended .btn {
    background: var(--primary);
    color: white;
    border: none;
}

.pricing-card.recommended .btn:hover {
    background: var(--primary-hover);
}

.pricing-card.broadcaster .btn {
    background: #2ecc71;
    color: white;
    border: none;
}

.pricing-card.creator .btn {
    background: #8e44ad;
    color: white;
    border: none;
}

.pricing-card .btn:disabled {
    background: var(--bg-dark);
    color: var(--text-dim);
    cursor: default;
    border: 1px dashed var(--border-subtle);
}

@media (max-width: 768px) {
    .pricing-container {
        grid-template-columns: 1fr;
    }
}

#plans.tab-content.active {
    display: block !important;
    position: relative;
    z-index: 50;
    pointer-events: auto !important;
}

/* Staffroom Link */
.staffroom-link {
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-block;
}

.staffroom-link:hover {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.5));
}

/* Public Profile Edit Trigger */
.edit-info-trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-info-trigger:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.edit-info-trigger .tooltip-text {
    visibility: hidden;
    width: 100px;
    background-color: var(--window-bg);
    color: var(--text-main);
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -50px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    border: 1px solid var(--border-subtle);
    pointer-events: none;
}

.edit-info-trigger:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Partner Cards */
.partner-card {
    text-align: center;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.badge-partner {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-avatar-container.sm {
    width: 80px;
    height: 80px;
}

/* Team Apps Carousel & Gallery */
.card-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.carousel-inner {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.carousel-item img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}

.carousel-item img:hover {
    transform: scale(1.05);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
}

.card-carousel:hover .carousel-prev,
.card-carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev {
    left: 5px;
}

.carousel-next {
    right: 5px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
}

/* Gallery Modal */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 10px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Full Screen Viewer */
.full-screen-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    cursor: pointer;
}

.full-screen-viewer.active {
    display: flex;
}

.full-screen-viewer img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.full-screen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Admin Editor Multi-Image */
.admin-image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.admin-image-item {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.admin-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-container.sm .profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.profile-avatar-container.sm .profile-avatar {
    font-size: 2rem;
    border-radius: 0;
}

/* Small Switch for Modal */
.small-switch {
    width: 32px;
    height: 18px;
}

.small-switch .slider:before {
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
}

.small-switch input:checked+.slider:before {
    transform: translateX(14px);
}

/* Profile Refinements */
.small-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.small-icon-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Toggle Switch */
.switch-label {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* =====================================================
   COMMUNITY HUB STYLES
   ===================================================== */

#community.tab-content {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.community-layout {
    display: flex;
    gap: 24px;
    height: calc(100vh - 210px);
    min-height: 500px;
}

.community-gallery-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.community-chat-column {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 14px;
}

.community-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.community-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.community-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.community-search-input {
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 220px;
    transition: border-color 0.2s;
}

.community-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.community-overlays-grid {
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    padding-right: 6px;
    align-content: start;
}

/* Overlay Card */
.community-overlay-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.community-overlay-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 152, 219, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.community-card-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.community-card-carousel img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.community-card-no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(155, 89, 182, 0.15));
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
}

.community-card-mini-dots {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.community-card-mini-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s;
}

.community-card-mini-dot.active {
    background: white;
}

.community-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.community-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.community-card-actions {
    display: flex;
    gap: 6px;
}

.community-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.community-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.community-empty .community-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Community Chat */
.community-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    min-height: 0;
}

.community-chat-msg {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeInMsg 0.2s ease;
}

.community-chat-msg.mine {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.25);
    align-self: flex-end;
    max-width: 90%;
}

.community-chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.community-chat-msg-user {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primary);
}

.community-chat-msg-time {
    font-size: 0.68rem;
    opacity: 0.5;
}

.community-chat-msg-text {
    line-height: 1.4;
    word-break: break-word;
}

.community-chat-input-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-shrink: 0;
}

.community-chat-textbox {
    flex: 1;
    min-width: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.community-chat-textbox:focus {
    outline: none;
    border-color: var(--primary);
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Community Full-size Carousel (detail modal) */
.community-carousel {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.carousel-track-wrap {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    padding: 8px 14px;
    cursor: pointer;
    z-index: 5;
    border-radius: 6px;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.carousel-btn.carousel-prev {
    left: 8px;
}

.carousel-btn.carousel-next {
    right: 8px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Upload image thumbs preview */
.upload-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-subtle);
}

@media (max-width: 900px) {
    .community-layout {
        flex-direction: column;
        height: auto;
    }

    .community-chat-column {
        max-width: 100%;
        height: 380px;
    }

    .community-overlays-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* AI / Holly Bot Styling */
.community-chat-msg.ai {
    background: rgba(155, 89, 182, 0.15);
    border-left: 3px solid #9b59b6;
}

.community-chat-msg.ai .community-chat-msg-user {
    color: #9b59b6;
    font-weight: bold;
}

.ai-thinking {
    opacity: 0.7;
    position: relative;
}

.ai-thinking::after {
    content: '...';
    display: inline-block;
    animation: thinking 1.5s infinite;
    width: 20px;
    text-align: left;
}

@keyframes thinking {
    0% {
        content: '.';
    }

    33% {
        content: '..';
    }

    66% {
        content: '...';
    }
}