/* Mobile Responsive Styles - Separate File */
/* This file contains only mobile-specific styles that override desktop styles */
/* Media query: max-width 768px for tablets and phones */

@media screen and (max-width: 768px) {
    
    /* ==================== 
       BASE STYLES 
       ==================== */
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    /* ==================== 
       HEADER & NAVIGATION - PREMIUM MOBILE REPAIR
       ==================== */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: var(--nav-bg, rgba(15, 23, 42, 0.9));
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--nav-border, rgba(255, 255, 255, 0.1));
        padding: 5px 0;
    }
    
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        padding: 8px 15px !important;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 100% !important;
        margin: 0 !important;
        height: 60px;
        position: relative;
    }

    .mobile-quick-links {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-left: 10px;
        margin-right: auto;
    }

    .mobile-quick-links .quick-link {
        color: var(--nav-link-color, #ffffff);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 5px 8px;
        transition: opacity 0.3s ease;
    }

    .light-theme .mobile-quick-links .quick-link {
        color: #0f172a;
    }

    .nav-brand {
        flex: 0 0 auto !important;
        display: flex;
        align-items: center;
    }

    .nav-brand .brand-logo {
        height: 32px !important;
        width: auto !important;
    }
    
    /* Theme Toggle - Pinned to the top navbar on mobile */
    #themeToggle {
        display: flex !important;
        visibility: visible !important;
        position: relative !important;
        margin-left: auto !important; /* Pushes toggle to the right */
        margin-right: 15px !important;
        padding: 8px;
        font-size: 1.2rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }

    .light-theme #themeToggle {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
        color: #0f172a;
    }

    /* Hamburger Menu Toggle Button - Far Right */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        cursor: pointer;
        gap: 5px;
        z-index: 1010;
        margin-left: 0 !important;
    }

    .light-theme .mobile-menu-toggle {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;
        background: var(--nav-link-color, #ffffff);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    }

    .light-theme .mobile-menu-toggle span {
        background: #0f172a;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Mobile Sidebar Menu - Modern Glassmorphism */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 320px !important;
        height: 100vh !important;
        background: var(--menu-bg, rgba(10, 14, 39, 0.95)) !important;
        -webkit-backdrop-filter: blur(40px) saturate(200%);
        backdrop-filter: blur(40px) saturate(200%);
        transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
        z-index: 1100 !important;
        box-shadow: 25px 0 60px rgba(0, 0, 0, 0.6) !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 100px 25px 30px !important;
        border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    
    .nav-menu.active {
        transform: translateX(100%) !important;
    }
    
    .nav-links {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px 0 !important;
        gap: 5px !important;
    }
    
    .nav-links li {
        width: 100% !important;
        list-style: none !important;
    }
    
    .nav-link {
        display: block !important;
        padding: 15px 20px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: var(--nav-link-color, #ffffff) !important;
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
    }

    .nav-link:hover, .nav-link.active {
        background: rgba(59, 130, 246, 0.1) !important;
        color: var(--teal-light, #60a5fa) !important;
        padding-left: 25px !important;
    }
    
    /* Mobile Navbar Auth Buttons at the bottom of the menu */
    .mobile-nav-auth {
        display: flex;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 30px 0 !important;
        margin-top: auto !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .mobile-nav-btn {
        width: 100% !important;
        padding: 16px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        border: none !important;
        cursor: pointer !important;
        text-align: center !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-nav-btn.btn-secondary {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .mobile-nav-btn.btn-primary {
        background: var(--teal-primary, #2563eb) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
    }

    .light-theme .mobile-nav-btn.btn-secondary {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Menu Overlay */
    .menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        z-index: 1004 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s ease !important;
    }

    .menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .floating-auth-buttons {
        display: block !important;
        position: fixed !important;
        top: 70px !important; /* Right below fixed navbar (60px + padding) */
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        padding: 12px 15px !important;
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        width: 100% !important;
    }

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

    .light-theme .floating-auth-buttons {
        background: transparent !important;
        border-color: transparent !important;
    }

    .auth-logged-out, 
    .auth-logged-in {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 15px;
        width: 100%;
    }

    .floating-btn {
        flex: 1;
        max-width: 160px;
        padding: 12px !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    
    /* ==================== 
       GUEST PROFILE & CREDITS SUPPORT
       ==================== */
    .mobile-user-profile {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    /* ==================== 
       HERO SECTION 
       ==================== */
    .hero,
    .about-container,
    .contact-container,
    .blog-hero,
    .admin-container {
        padding-top: 220px !important; /* Increased top padding further so it doesn't get hidden */
        min-height: 0;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
        padding: 0 20px;
    }
    
    .hero-cta .btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    /* ==================== 
       CHAT SECTION 
       ==================== */
    .app-layout {
        flex-direction: column;
        height: auto;
    }
    
    #chatInput {
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    #chatInput::placeholder {
        font-size: 0.8rem;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
    }
    

    /* ==================== 
       DEMO SECTION — FULL MOBILE OVERHAUL
       ==================== */

    /* Demo section: remove fixed height, stack vertically */
    .demo-section {
        height: auto !important;
        min-height: 0 !important;
        padding: 10px 0 30px !important;
        display: block !important;
        border: none !important;
        overflow: visible !important;
    }

    .demo-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* ==================== 
       SIDEBAR — HORIZONTAL SCROLLABLE TOOL CARDS
       ==================== */

    /* Full sidebar reset */
    .sidebar,
    #sidebar,
    aside.sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        flex: none !important;
        position: relative !important;
        overflow: visible !important;
        border: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        border-right: none !important;
        border-radius: 0 !important;
        background: rgba(10,14,39,0.98) !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .light-theme .sidebar,
    .light-theme #sidebar {
        background: rgba(240,244,255,0.98) !important;
        border-bottom-color: rgba(0,0,0,0.08) !important;
    }

    /* Sidebar header */
    .sidebar .sidebar-header,
    #sidebar .sidebar-header,
    .sidebar-header {
        padding: 12px 16px !important;
        height: auto !important;
        min-height: 52px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        background: transparent !important;
    }

    /* Sidebar title — always horizontal */
    .sidebar-title,
    .sidebar .sidebar-title,
    #sidebar .sidebar-title,
    aside.sidebar .sidebar-title {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        writing-mode: horizontal-tb !important;
        transform: none !important;
        rotate: 0deg !important;
        text-orientation: mixed !important;
        letter-spacing: 0.3px !important;
        opacity: 1 !important;
        visibility: visible !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .light-theme .sidebar-title,
    .light-theme .sidebar .sidebar-title {
        color: #0f172a !important;
    }

    /* Toggle button */
    .toggle-btn,
    .sidebar .toggle-btn,
    #sidebar .toggle-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 0 !important;
        font-size: 0.95rem !important;
        background: rgba(255,255,255,0.08) !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        border-radius: 8px !important;
        color: #ffffff !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        box-shadow: none !important;
    }

    .toggle-btn:active {
        opacity: 0.7 !important;
        transform: scale(0.95) !important;
    }

    .light-theme .toggle-btn {
        background: rgba(0,0,0,0.06) !important;
        border-color: rgba(0,0,0,0.12) !important;
        color: #0f172a !important;
    }

    /* Tools section */
    .tools-section,
    .sidebar .tools-section,
    #sidebar .tools-section {
        padding: 10px 16px 14px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    /* Tools label */
    .tools-label,
    .sidebar .tools-label,
    #sidebar .tools-label {
        display: block !important;
        font-size: 0.65rem !important;
        color: rgba(255,255,255,0.45) !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        margin-bottom: 8px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Tools list — horizontal scroll */
    .tools-list,
    .sidebar .tools-list,
    #sidebar .tools-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding: 2px 2px 8px !important;
        flex-wrap: nowrap !important;
    }

    .tools-list::-webkit-scrollbar,
    .sidebar .tools-list::-webkit-scrollbar,
    #sidebar .tools-list::-webkit-scrollbar {
        display: none !important;
    }

    /* Individual tool item — vertical card */
    .tool-item,
    .sidebar .tool-item,
    #sidebar .tool-item {
        flex: 0 0 auto !important;
        width: 120px !important;
        min-width: 120px !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 14px 8px !important;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 12px !important;
        cursor: pointer !important;
        text-align: center !important;
        transition: all 0.2s ease !important;
        transform: none !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
    }

    .tool-item:active,
    .sidebar .tool-item:active,
    #sidebar .tool-item:active {
        background: rgba(59,130,246,0.2) !important;
        border-color: rgba(59,130,246,0.5) !important;
        transform: scale(0.96) !important;
    }

    .light-theme .tool-item {
        background: rgba(0,0,0,0.04) !important;
        border-color: rgba(0,0,0,0.08) !important;
    }

    /* Tool icon inside card */
    .tool-icon,
    .sidebar .tool-icon,
    #sidebar .tool-icon {
        font-size: 1.4rem !important;
        min-width: unset !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #60a5fa !important;
    }

    .tool-icon svg,
    .sidebar .tool-icon svg,
    #sidebar .tool-icon svg {
        width: 24px !important;
        height: 24px !important;
        stroke: #60a5fa !important;
    }

    /* Tool content (name + desc) */
    .tool-content,
    .sidebar .tool-content,
    #sidebar .tool-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        flex: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Tool name */
    .tool-name,
    .sidebar .tool-name,
    #sidebar .tool-name {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        display: block !important;
        text-align: center !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        white-space: normal !important;
    }

    .light-theme .tool-name { color: #0f172a !important; }

    /* Tool description */
    .tool-description,
    .sidebar .tool-description,
    #sidebar .tool-description {
        font-size: 0.6rem !important;
        color: rgba(255,255,255,0.45) !important;
        display: block !important;
        text-align: center !important;
        line-height: 1.2 !important;
        margin-top: 2px !important;
    }

    /* Collapsed state: just hide tools section */
    .sidebar.collapsed,
    #sidebar.collapsed {
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
    }

    .sidebar.collapsed .sidebar-header,
    #sidebar.collapsed .sidebar-header {
        border-bottom: none !important;
    }

    .sidebar.collapsed .tools-section,
    #sidebar.collapsed .tools-section {
        display: none !important;
        visibility: hidden !important;
    }

    .sidebar.collapsed::after,
    #sidebar.collapsed::after,
    aside.sidebar.collapsed::after {
        display: none !important;
        content: none !important;
    }

    .sidebar.collapsed .sidebar-title,
    #sidebar.collapsed .sidebar-title {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        writing-mode: horizontal-tb !important;
        transform: none !important;
        rotate: 0deg !important;
    }

    /* ==================== 
       CHAT CONTAINER — MOBILE
       ==================== */
    .chat-container {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        height: auto !important;
        min-height: 430px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .chat-header {
        padding: 12px 16px !important;
        position: relative !important;
        text-align: left !important;
    }

    .chat-title {
        font-size: 1.1rem !important;
        text-align: left !important;
    }

    .chat-subtitle {
        font-size: 0.78rem !important;
        text-align: left !important;
    }

    .header-actions {
        position: absolute !important;
        top: 12px !important;
        right: 16px !important;
    }

    .expand-btn {
        display: none !important;
    }

    .chat-messages {
        padding: 15px !important;
        height: 320px !important;
        min-height: 280px !important;
        overflow-y: auto !important;
    }

    .message {
        max-width: 90% !important;
        padding: 10px 13px !important;
        font-size: 0.87rem !important;
    }

    .chat-input-container {
        padding: 10px 12px !important;
        position: relative !important;
        bottom: unset !important;
        left: unset !important;
        right: unset !important;
    }

    .chat-input-wrapper {
        padding: 8px 12px !important;
    }

    /* ==================== 
       TOOL CONTAINERS — MOBILE
       ==================== */
    .tool-container,
    .phishing-container,
    .email-container,
    .virus-container {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        height: auto !important;
        min-height: 430px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .tool-view-header {
        padding: 12px 16px !important;
    }

    .tool-header-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .tool-title-section h2 {
        font-size: 1.1rem !important;
    }

    .tool-title-section p {
        font-size: 0.78rem !important;
    }

    .back-to-chat-btn {
        align-self: flex-start !important;
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
    }

    .tool-interaction-area {
        padding: 14px 16px !important;
    }

    .scan-input-area {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .scan-input {
        width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.9rem !important;
        padding: 12px 14px !important;
    }

    .scan-btn {
        width: 100% !important;
        padding: 13px 20px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
    }

    .scan-results-dashboard {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 10px 0 !important;
    }

    .scan-score {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .score-circle {
        width: 100px !important;
        height: 100px !important;
    }

    .score-val {
        font-size: 1.8rem !important;
    }

    .vendors-list {
        max-height: 250px !important;
        overflow-y: auto !important;
        width: 100% !important;
    }

    .vendor-item {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
    }

    /* Tool header (inside tool containers) */
    .tool-header {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: left !important;
        padding: 12px 16px !important;
    }

    .tool-title h2 {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }

    .tool-title p {
        font-size: 0.8rem !important;
        margin: 3px 0 0 0 !important;
    }

    /* ==================== 
       LOCKED TOOL OVERLAY 
       ==================== */
    .locked-tool-overlay {
        left: 0 !important;
        padding: 20px !important;
    }
    
    .locked-content {
        padding: 30px 20px !important;
        max-width: 100% !important;
        margin: 0 15px !important;
    }
    
    .lock-icon {
        font-size: 36px !important;
    }
    
    .locked-content h3 {
        font-size: 1.2rem !important;
    }
    
    .locked-content p {
        font-size: 0.88rem !important;
    }
    
    .locked-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    
    .locked-actions .btn {
        width: 100% !important;
    }

    /* ==================== 
       TOOL CARDS / GRID (other sections)
       ==================== */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 15px;
    }

    .tool-card {
        padding: 20px;
    }
    
    /* ==================== 
       AI MODELS SECTION - ENHANCED MOBILE STYLES
       ==================== */
    .ai-models-section {
        padding: 40px 10px;
        overflow-x: hidden;
    }
    
    .ai-models-heading {
        font-size: 1.5rem;
        margin-bottom: 30px;
        padding: 0 10px;
        line-height: 1.3;
    }
    
    .ai-models-wrapper {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 10px;
        max-width: 100%;
    }
    
    .ai-models-column {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .ai-models-card {
        padding: 15px 15px 15px 50px;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ai-models-card h3 {
        font-size: 16px;
        margin: 0 0 4px 0;
    }
    
    .ai-models-tag {
        font-size: 11px;
        padding: 3px 8px;
        margin: 4px 0;
    }
    
    .ai-models-card p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .ai-models-icon {
        left: 12px;
        width: 24px;
        height: 24px;
    }
    
    .ai-models-center {
        display: none;
    }
    
    /* Show single column layout on mobile */
    .ai-models-wrapper > * {
        width: 100%;
        max-width: 100%;
    }
    
    /* ==================== 
       COMPARISON SECTION 
       ==================== */
    .comparison-section {
        padding: 60px 15px;
    }
    
    .comparison-heading {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .comparison-wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
    }
    
    .comparison-column {
        max-width: 100%;
    }
    
    .column-header h3 {
        font-size: 1.1rem;
    }
    
    .metric-item {
        padding: 10px 15px;
    }
    
    .metric-label span {
        font-size: 0.85rem;
    }
    
    .metric-value {
        font-size: 0.9rem;
    }
    
    /* ==================== 
       FOOTER 
       ==================== */
    .main-footer {
        padding: 40px 15px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-column h4 {
        margin-bottom: 10px;
    }
    
    .footer-column ul li {
        margin-bottom: 8px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* ==================== 
       MODALS & OVERLAYS 
       ==================== */
    .modal-content {
        width: 95%;
        max-width: 100%;
        margin: 20px;
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    /* ==================== 
       FORMS (LOGIN/SIGNUP) 
       ==================== */
    .auth-container {
        padding: 100px 15px 40px;
        min-height: auto;
    }
    
    .auth-box {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .auth-header h2 {
        font-size: 1.6rem;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    /* ==================== 
       ADMIN PANEL 
       ==================== */
    .admin-container {
        padding: 80px 15px 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-header h1 {
        font-size: 1.5rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .admin-table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 600px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    /* ==================== 
       CHAT SUGGESTIONS 
       ==================== */
    .chat-suggestions {
        padding: 10px 15px;
        gap: 8px;
    }
    
    .suggestion-chip {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* ==================== 
       SCROLLBAR HIDE ON MOBILE 
       ==================== */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    /* ==================== 
       TOUCH OPTIMIZATIONS 
       ==================== */
    .btn,
    .action-btn,
    .nav-link,
    .tool-card,
    .suggestion-chip {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent zoom on input focus for iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 16px;
    }
}

/* ==================== 
   SMALL PHONES (max-width: 480px)
   ==================== */
@media screen and (max-width: 480px) {
    
    .hero-title {
        font-size: 1.7rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .ai-models-heading,
    .comparison-heading {
        font-size: 1.5rem;
    }
    
    .message {
        max-width: 95%;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .tool-title h2 {
        font-size: 1.3rem;
    }
    
    .floating-auth-buttons {
        bottom: 15px;
        right: 10px;
    }
    
    .floating-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .locked-content {
        padding: 25px 15px;
    }
    
    .locked-content h3 {
        font-size: 1.1rem;
    }
    
    .lock-icon {
        font-size: 32px;
    }
}

/* ==================== 
   ADDITIONAL MOBILE FIXES
   ==================== */
@media screen and (max-width: 768px) {
    
    /* Ensure floating auth buttons stay visible and properly sized */
    .floating-auth-buttons {
        max-width: calc(100% - 20px);
        box-sizing: border-box;
    }
    
    .auth-logged-out,
    .auth-logged-in {
        max-width: 100%;
    }
    
    /* AI Models extra fixes */
    .ai-models-section {
        width: 100vw;
        max-width: 100%;
    }
    
    .ai-models-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .ai-models-card {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Prevent horizontal scroll on mobile */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Ensure all containers respect mobile viewport */
    .hero-content,
    .demo-container,
    .chat-container,
    .phishing-container,
    .email-container,
    .virus-container {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for navbar on very small screens */
    @media screen and (max-width: 360px) {
        .navbar {
            padding: 10px;
        }
        
        .nav-brand .brand-link {
            font-size: 1.2rem;
        }
        
        .floating-btn {
            padding: 8px 10px;
            font-size: 0.75rem;
        }
        
        .ai-models-heading {
            font-size: 1.3rem;
        }
    }
}

/* ==================== 
   LANDSCAPE ORIENTATION 
   ==================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    
    .hero {
        padding: 80px 15px 40px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .chat-messages {
        height: calc(100vh - 140px);
    }
    
    .floating-auth-buttons {
        flex-direction: row;
        bottom: 10px;
    }
    
    .sidebar {
        max-height: 70vh;
    }
}

/* ==================== 
   TOUCH DEVICE OPTIMIZATIONS
   ==================== */
@media (hover: none) and (pointer: coarse) {
    
    .btn:hover,
    .action-btn:hover,
    .nav-link:hover {
        transform: none;
    }
    
    .tool-card:hover {
        transform: translateY(-2px);
    }
    
    /* Increase touch targets */
    .nav-link,
    .btn,
    .action-btn {
        padding: 12px 16px;
    }
}

/* ==================== 
   FINAL MOBILE FIXES - Extra small screens
   ==================== */
@media screen and (max-width: 768px) {
    
    /* Ensure floating auth buttons stay at top under navbar, matching our earlier definition */
    .floating-auth-buttons {
        bottom: auto !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Make auth buttons stack better on very small screens */
    @media screen and (max-width: 400px) {
        .auth-logged-out {
            flex-direction: row; /* One line as requested */
            gap: 6px;
        }
        
        .auth-logged-in {
            flex-wrap: nowrap !important;
            justify-content: center;
            gap: 10px;
        }
        
        .floating-btn {
            width: auto;
            flex: 1;
            text-align: center;
        }
    }
    
    /* AI Models - ensure proper mobile layout */
    .ai-models-wrapper {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }
    
    .ai-models-column {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .ai-models-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
