/* Mobile Optimization */

/* Hamburger Button - Hidden on Desktop */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

/* Auth User Badge */
/* .navbar-user { ... REMOVED old style ... } */

/* User Profile Pill */
.user-profile-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 4px 6px 4px 15px;
    /* Less padding on right for image */
    gap: 12px;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.user-profile-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-points {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #FBBF24;
    /* Amber/Gold */
    font-size: 0.95em;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 12px;
}

.points-icon {
    font-size: 1.1em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95em;
}

.user-headshot-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #1F2937;
}

@media (max-width: 768px) {

    /* Global Adjustments */
    body {
        padding-top: 70px;
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 1.8em !important;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5em !important;
    }

    /* Navbar Responsive Layout */
    .navbar {
        height: auto !important;
        min-height: 70px;
        padding: 10px 20px;
    }

    .navbar-container {
        flex-wrap: wrap;
        height: auto !important;
    }

    /* Navbar Brand - Keep on left */
    .navbar-brand {
        font-size: 1.4em !important;
    }

    /* Hamburger - Show on right */
    .mobile-menu-btn {
        display: block;
        color: white;
        /* Default to white if inherit fails */
    }

    /* Usually Auth is on the right, we might want to hide it or move it */
    .navbar-auth {
        display: none !important;
        /* Simplify headers for now, or move into menu if needed */
    }

    /* Navbar Menu - Stacked and Hidden */
    .navbar-menu {
        display: none !important;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        align-items: flex-start;
        /* Align left */
    }

    .navbar-menu.mobile-open {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }

    /* Hide desktop version of tour button just in case */
    .tour-desktop-btn {
        display: none !important;
    }

    .navbar-link {
        width: 100%;
        display: block;
        padding: 12px 15px !important;
        background: rgba(255, 255, 255, 0.1);
        /* Slightly more visible */
        border-radius: 10px !important;
        color: #ffffff !important;
        /* Force White Text */
        font-weight: 600;
        text-decoration: none;
    }

    .navbar-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .logout-link {
        color: #FF6B6B !important;
        /* Soft Red */
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Grid System Overrides - Force Single Column */
    .student-grid,
    .quick-actions,
    .student-stats,
    .stats-bar,
    .grid-container,
    .projects-grid,
    .clients-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 15px !important;
    }

    .stats-bar {
        flex-direction: column;
        gap: 20px;
    }

    /* Table Responsiveness */
    .connections-table,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    /* Inputs and Buttons - Touch Friendly */
    button,
    .action-btn,
    .navbar-btn,
    select,
    input {
        min-height: 48px;
        /* Touch target size */
    }

    .search-input {
        width: 100%;
        max-width: none;
    }

    /* Staging / Student Progress Specifics */
    .student-card {
        padding: 15px;
    }

    .student-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columns might fit for stats */
    }

    /* Sidebar logic - HIDE completely on mobile as requested */
    #student-folder-sidebar {
        display: none !important;
    }

    /* Hide Connections Button on mobile */
    .connection-monitor-btn,
    #connectionBtn {
        display: none !important;
    }

    .page-content {
        margin-right: 0 !important;
        padding: 15px;
        width: 100% !important;
    }

    .page-content {
        margin-right: 0 !important;
        padding: 15px;
    }

    /* Unified Video Responsiveness */
    .video-container,
    .video-player-container,
    .youtube-frame,
    .online-player-container {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        overflow: hidden;
        margin-bottom: 20px;
    }

    .video-container iframe,
    .video-container video,
    .video-player-container video,
    .youtube-frame iframe,
    .youtube-frame video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: none;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Hide mobile-only elements on desktop */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}