/* GLOBAL VARIABLES & RESET */
:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #ffd700;
    /* Premium Gold */
    --accent-hover: #ffea70;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 100, 255, 0.03) 0%, transparent 20%);
    color: var(--text-primary);
    color: var(--text-primary);
    min-height: 100vh;
    /* Fallback */
    min-height: 100dvh;
    /* iOS fix */
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* UTILITIES */
.hidden {
    display: none !important;
}

.view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
    /* Ensure scrolling works */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

.view.active {
    opacity: 1;
    pointer-events: all;
    position: relative;
}

/* GLASSMORPHISM */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}

/* LOGIN SCREEN */
#login-view {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

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

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

.brand-header {
    margin-bottom: 2.5rem;
}

/* Logo Styles */
.brand-logo-img {
    max-width: 180px;
    height: auto;
    margin-bottom: 0.5rem;
    filter: brightness(0) invert(1);
}

/* Global View Styles */
.view {
    width: 100%;
    min-height: 100vh;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    position: relative;
    /* Ensure z-index works */
    z-index: 10;
}

.view.active {
    z-index: 100;
    /* Active view always on top */
    pointer-events: auto;
}

.view.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none !important;
    /* Double safety */
    z-index: -1;
}

/* MODULES SELECTION SCREEN */
#modules-view {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.05), transparent 40%);
    overflow-y: auto;
    /* Allow scrolling */
    height: 100%;
    /* Fill container */
    width: 100%;
}

/* Mobile responsive adjustment for Modules View */
@media (max-height: 800px),
(max-width: 768px) {
    #modules-view {
        align-items: flex-start;
        /* Start from top to prevent cutting off top content */
        padding-top: 4rem;
        /* Add top space */
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }
}

.modules-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.modules-header {
    text-align: center;
}

.brand-logo-small {
    height: 40px;
    width: auto;
    margin-bottom: 1.5rem;
}

.modules-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modules-header p {
    color: var(--text-secondary);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.module-card {
    padding: 2.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    cursor: default;
    /* Changed from pointer as per user request */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.module-card:hover {
    /* transform: translateY(-5px); Removed as per user request */
    /* border-color: var(--accent-color); Removed as per user request */
    /* box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1); Removed as per user request */
    border-color: rgba(255, 255, 255, 0.05);
    /* Keep original border */
}

.module-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.module-card.locked:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.module-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.module-icon i {
    width: 32px;
    height: 32px;
}

.module-card.locked .module-icon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.module-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.module-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-module {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--accent-color);
    color: var(--bg-dark);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-module:hover {
    background: #e6c200;
}

.btn-module.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: default;
}

.btn-module.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

#modules-logout-btn {
    color: var(--text-secondary);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#modules-logout-btn:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

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

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

/* Mobile logout button - hidden on desktop */
.mobile-logout-btn {
    display: none;
}

.brand-header p {
    color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: black;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

/* DASHBOARD LAYOUT */
#dashboard-view,
#other-tools-view {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-right: 1px solid var(--glass-border);
    z-index: 10;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    justify-content: center;
    /* Center logo */
}

/* Sidebar Logo Styles - Fixed Sizing to prevent huge overlap */
.sidebar-logo-img {
    max-width: 140px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.desktop-logo {
    display: block;
}

.mobile-logo {
    display: none;
}

.brand-icon-small {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.sidebar-header span {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition);
    font-size: 1rem;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-color);
    font-weight: 500;
}

.nav-item.logout {
    margin-top: auto;
    color: #ff4d4d;
}

.nav-item.logout:hover {
    background: rgba(255, 77, 77, 0.1);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-bar {
    padding: 1.5rem 2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: black;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

/* SECTION TITLES */
.section-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: white;
}

/* CONTENT STYLES */
.tab-content {
    animation: fadeIn 0.4s ease;
}

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

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

.hero-card {
    padding: 3rem;
    border-radius: 24px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #999);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-secondary);
    max-width: 600px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-highlight);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.list-card {
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.list-item {
    display: flex;
    gap: 1.2rem;
    padding: 1.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    align-items: flex-start;
}

.list-item:last-child {
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0;
    padding-bottom: 1.8rem;
}

.success-icon {
    color: #4ade80;
    flex-shrink: 0;
}

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

.list-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    border-radius: 16px;
}

.info-card h3 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card.warning {
    border-left: 4px solid #facc15;
}

.info-card.warning h3 {
    color: #facc15;
}

/* VIDEO RESPONSIVE */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--glass-border);
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* CLICKABLE CARD */
.clickable-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.clickable-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.clickable-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.clickable-card:hover::after {
    transform: translateX(100%);
}

.clickable-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.05);
}

/* SECONDARY BUTTON */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.video-container-full {
    padding: 2rem;
    border-radius: 20px;
    animation: slideUpFade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.video-container-full h2 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

/* --- Animations --- */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.instruction-text {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.instruction-text h3 {
    color: white;
    margin-bottom: 0.5rem;
    margin-top: 2rem;
    font-size: 1.1rem;
}

.instruction-text h3:first-child {
    margin-top: 0;
}

.instruction-text p,
.instruction-text li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.instruction-text ul {
    list-style-position: inside;
    margin-left: 0.5rem;
    margin-bottom: 1.5rem;
}

/* WATCH BUTTON */
.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--accent-color);
    color: black;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-watch:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    background: var(--accent-hover);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    background: #111;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
}



.instruction-text::-webkit-scrollbar {
    width: 6px;
}

.instruction-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.instruction-text::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.instruction-text h3 {
    color: white;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.instruction-text h3:first-child {
    margin-top: 0;
}

.instruction-text p,
.instruction-text li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.instruction-text ul {
    list-style-position: inside;
    margin-left: 0.5rem;
    margin-bottom: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        /* Fix for mobile scroll bounce */
        overscroll-behavior-y: none;
    }

    .content-split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #dashboard-view,
    #other-tools-view {
        flex-direction: column;
        height: 100dvh;
        /* Use dynamic viewport height */
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        position: fixed;
        top: 0;
        z-index: 100;
        background: rgba(5, 5, 5, 0.95);
        padding: 0.8rem 1rem;
        flex-direction: column;
        /* Stack Logo and Nav */
        justify-content: flex-start;
        align-items: stretch;
        gap: 1rem;
    }

    .sidebar-header {
        margin-bottom: 0;
        width: 100%;
        justify-content: space-between;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .desktop-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
        max-height: 32px;
        /* Slightly smaller to fit nicely */
        width: auto;
    }

    /* Mobile logout button */
    .mobile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid rgba(255, 77, 77, 0.3);
        color: #ff4d4d;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        cursor: pointer;
        transition: var(--transition);
        flex-shrink: 0;
    }

    .mobile-logout-btn:hover {
        background: rgba(255, 77, 77, 0.1);
        border-color: #ff4d4d;
    }

    .mobile-logout-btn i {
        width: 20px;
        height: 20px;
    }

    /* Mobile: hide desktop logo, show mobile logo */
    .sidebar-logo-img.desktop-logo {
        display: none !important;
    }

    .sidebar-logo-img.mobile-logo {
        display: block !important;
        height: 40px;
        width: auto;
        max-width: 180px;
        object-fit: contain;
        flex-shrink: 0;
    }

    /* Hide sidebar text/footer items on mobile header */
    .sidebar-footer {
        display: none;
    }

    .sidebar-nav {
        position: static;
        /* Remove from bottom */
        width: 100%;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        margin-top: 0;
        flex-direction: row;
        justify-content: space-around;
        /* Distribute buttons */
        align-items: center;
        border-top: none;
        z-index: 100;
        gap: 0;
    }

    .nav-item {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem;
        background: transparent;
        border-radius: 8px;
        font-size: 0.7rem;
        justify-content: center;
        align-items: center;
        flex: 1;
        max-width: none;
        /* Allow filling space */
    }

    .nav-item i {
        width: 24px;
        height: 24px;
    }

    .nav-item span {
        display: none;
    }

    .nav-item.logout {
        display: flex;
        margin-top: 0;
        color: #ff4d4d;
    }

    .main-content {
        padding: 1rem;
        padding-top: calc(160px + env(safe-area-inset-top));
        /* Increased for taller header */
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
        /* Further increased bottom padding */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .top-bar {
        display: none;
        /* Hide top bar on mobile to save space, or simplify it */
    }

    .hero-card {
        padding: 1.5rem;
        border-radius: 20px;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        /* Single column for cards */
        gap: 1rem;
        padding-bottom: calc(6rem + env(safe-area-inset-bottom));
    }

    .list-card {
        gap: 1rem;
    }

    .list-item {
        padding: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .video-container-full {
        padding: 1rem;
    }

    .instruction-text {
        max-height: none;
        overflow-y: visible;
        padding-bottom: 2rem;
    }

    /* Ensure modal fits */
    .modal-content {
        width: 95%;
        margin: 0 auto;
    }

    /* Login container mobile spacing */
    .login-container {
        margin: 0 1.5rem;
        max-width: calc(100% - 3rem);
        /* Shift slightly up */
        margin-top: -15vh;
    }
}

/* FORCE VISIBILITY FOR OTHER TOOLS VIEW - DEBUG FIX */
#other-tools-view .main-content,
#other-tools-view .content-area {
    opacity: 1 !important;
    visibility: visible !important;
}

#other-tools-view .content-area {
    display: block !important;
    height: 100%;
    width: 100%;
}

/* Only force grid display if it's NOT hidden */
#other-tools-view .grid-container:not(.hidden) {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (min-width: 769px) {
    #other-tools-view .main-content {
        z-index: 50;
        position: relative;
    }
}