/* Dashboard Specific Styles */

body {
    background: var(--hover-bg);
    padding: 0;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: transform var(--transition-base);
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-lg);
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: var(--space-6) var(--space-5);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: white !important;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sidebar-header .dark-mode-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
}

.sidebar-header .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s ease;
    display: none;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-light) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.nav-link:hover {
    background: var(--sidebar-hover);
}

.nav-link.active {
    background: var(--sidebar-hover);
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: inherit;
}

.nav-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.nav-link.expanded .nav-arrow {
    transform: rotate(90deg);
}

.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.nav-submenu.show {
    max-height: 500px;
}

.nav-subitem {
    margin: 0;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 50px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-sublink:hover {
    background: var(--sidebar-hover);
    color: var(--text-light) !important;
}

.nav-sublink.active {
    background: var(--sidebar-hover);
    color: var(--text-light) !important;
    border-left: 4px solid var(--primary-color);
    padding-left: 46px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    background: var(--hover-bg);
    min-height: 100vh;
}

.sidebar.collapsed~.main-content {
    margin-left: 0;
}

.content-wrapper {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Welcome Header */
.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-section h1 {
    font-size: 42px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Presentation Button */
.presentation-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.presentation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

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

.info-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

.card-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.minimal-stat-badge {
    background: var(--card-bg);
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    line-height: normal;
    /* Ensure text isn't clipped */
}

.minimal-stat-badge .stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    /* Match user expectation from image */
    letter-spacing: 0.5px;
    font-size: 12px;
}

.minimal-stat-badge .stat-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 20px;
    /* Make value slightly larger/clearer */
    line-height: 1;
}

/* Rounds Section */
.rounds-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
}

.rounds-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.rounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.round-card {
    background: var(--hover-bg);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.round-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.round-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.round-card-header h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.room-id-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
}

.round-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.round-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.round-stat:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 700;
}

.loading-message,
.error-message {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 16px;
}

.error-message {
    color: #e74c3c;
}

.features-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.features-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateX(5px);
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .toggle-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 20px;
    }

    .welcome-section h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .features-section {
        padding: 25px;
    }

    /* Mobile toggle button */
    .mobile-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 999;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 24px;
        cursor: pointer;
        box-shadow: var(--shadow);
        display: none;
    }

    .mobile-toggle.show {
        display: block;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    .sidebar.open~.sidebar-overlay {
        display: block;
    }
}

/* Services Status Section */
.services-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
}

.services-section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--hover-bg);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.service-item.online {
    border-left: 4px solid #10b981;
}

.service-item.offline {
    border-left: 4px solid #ef4444;
}

.service-status {
    font-size: 20px;
    flex-shrink: 0;
}

.service-name {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

@media (max-width: 768px) {
    .services-section {
        padding: 25px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================
   PRESENTATION MODE STYLES
   ============================================ */

/* Presentation Overlay */
.presentation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.presentation-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Close Button */
.close-presentation-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-presentation-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.close-presentation-btn:active {
    transform: scale(0.95);
}

/* Presentation Content */
.presentation-content {
    flex: 1;
    overflow: auto;
    padding: 60px 40px 80px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Presentation Indicator */
.presentation-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
}

#presentationTitle {
    font-size: 24px;
    font-weight: 700;
}

#presentationProgress {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

/* Presentation Panel Styles */
.presentation-panel {
    max-width: 1600px;
    margin: 0 auto;
}

.presentation-panel iframe {
    width: 100%;
    height: calc(100vh - 160px);
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Ensure sections look good in presentation mode */
.presentation-content .rounds-section,
.presentation-content .services-section {
    margin-bottom: 0;
    box-shadow: none;
}

/* Mobile Presentation Mode */
@media (max-width: 768px) {
    .presentation-content {
        padding: 40px 20px 80px;
    }

    .presentation-indicator {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    #presentationTitle {
        font-size: 18px;
    }

    #presentationProgress {
        font-size: 14px;
    }

    .close-presentation-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
        top: 15px;
        right: 15px;
    }

    .presentation-panel iframe {
        height: calc(100vh - 180px);
    }
}