/* =============================
     Mobile Responsive Enhancements
     ============================= */
@media (max-width: 900px) {
    .hero-section-full {
        grid-template-columns: 1fr;
        padding: 32px 8px;
        gap: 24px;
    }
    .hero-visual {
        display: none;
    }
    .screen {
        padding: 24px 4px;
    }
    .screen-container {
        max-width: 100vw;
        padding: 0 2vw;
    }
    .app-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }
    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 80vw;
        max-width: 340px;
        z-index: 2000;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        box-shadow: var(--shadow-lg);
        height: 100vh;
        border-right: 1px solid var(--gray-200);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .map-wrapper {
        min-height: 60vh;
        height: 60vh;
    }
    .mobile-menu-btn {
        display: block;
        position: absolute;
        left: 16px;
        top: 16px;
        z-index: 3000;
        background: var(--primary);
        color: var(--white);
        border-radius: 50%;
        width: 48px;
        height: 48px;
        box-shadow: var(--shadow);
        border: none;
        font-size: 1.5rem;
    }
    .sidebar-header {
        padding: 16px 12px;
    }
    .sidebar-content {
        padding: 12px;
    }
    .nav-panel {
        border-radius: var(--radius);
    }
    .steps-list {
        max-height: 120px;
    }
    .map-controls {
        bottom: 16px;
        right: 16px;
        left: auto;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .main-nav {
        height: 54px;
        padding: 0 4px;
    }
    .brand-name {
        font-size: 1rem;
    }
    .user-status {
        font-size: 0.7rem;
    }
    .btn-primary, .btn-secondary, .btn-hero {
        font-size: 1rem;
        padding: 14px 8px;
        min-width: 120px;
    }
    .selection-card, .feature-card {
        padding: 16px;
        font-size: 0.95rem;
    }
    .card-icon {
        width: 40px;
        height: 40px;
    }
    .card-content h3 {
        font-size: 1.1rem;
    }
    .map-wrapper {
        min-height: 45vh;
        height: 45vh;
    }
    .nav-arrow {
        width: 60px;
        height: 60px;
    }
    .nav-arrow-container {
        bottom: 80px;
    }
    .steps-list {
        max-height: 80px;
    }
}
/* ============================================
   PRMSU Campus Navigator - Enhanced Styles
   Modern, Clean UI with Navigation Features
   ============================================ */

:root {
    /* Colors */
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #FFB800;
    --accent-hover: #E5A600;
    --accent-light: #FFF3CD;
    --blue: #3B82F6;
    --blue-light: #DBEAFE;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* Spacing & Sizing */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --nav-height: 64px;
    --sidebar-width: 380px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 100%;
    background: var(--gray-50);
    color: var(--gray-900);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Navigation Bar
   ============================================ */
.main-nav {
    background: var(--white);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.user-status {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.nav-btn.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    margin-bottom: 24px;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Join Lobby Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.modal.hidden {
    pointer-events: none;
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--gray-900);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-group input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.input-group .btn-primary {
    padding: 12px 24px;
    white-space: nowrap;
    flex-shrink: 0;
}

.help-text {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin: 0;
}

/* Input Styles */
.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    width: 100%;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--gray-200);
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.btn-hero {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-hero:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section-full {
    min-height: calc(100vh - var(--nav-height));
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 60px;
    gap: 60px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero-content {
    max-width: 560px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.hero-content h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-preview {
    width: 400px;
    height: 400px;
    background: var(--gray-100);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.map-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
}

.dot-1 { background: var(--blue); top: 30%; left: 25%; animation-delay: 0s; }
.dot-2 { background: var(--accent); top: 50%; left: 60%; animation-delay: 0.5s; }
.dot-3 { background: var(--success); top: 70%; left: 35%; animation-delay: 1s; }

.map-line {
    position: absolute;
    top: 38%;
    left: 30%;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--accent));
    transform: rotate(25deg);
    border-radius: 2px;
}

.nav-arrow-preview {
    position: absolute;
    top: 45%;
    left: 55%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--accent);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   Screen Layout
   ============================================ */
.screen {
    display: none;
    min-height: calc(100vh - var(--nav-height));
    padding: 60px 40px;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

.screen.full-bleed {
    padding: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen-container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1rem;
    color: var(--gray-500);
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.back-btn:hover {
    border-color: var(--gray-300);
    color: var(--gray-900);
    transform: translateY(-50%) translateX(-4px);
}

/* ============================================
   Cards
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.selection-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.selection-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon.blue {
    background: var(--blue-light);
    color: var(--blue);
}

.card-icon.amber {
    background: var(--accent-light);
    color: var(--accent);
}

.card-icon.green {
    background: #d1fae5;
    color: #10b981;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
}

.card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.selection-card:hover .card-arrow {
    background: var(--primary);
    color: var(--white);
    transform: translateX(4px);
}

/* Feature Cards */
.feature-card {
    flex-direction: column;
    gap: 16px;
}

.feature-card .card-icon {
    width: 64px;
    height: 64px;
}

.feature-card .card-content h3 {
    font-size: 1.4rem;
}

.feature-card .card-content p {
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.feature-card .card-arrow {
    align-self: flex-end;
}

/* ============================================
   App Layout (Solo Mode)
   ============================================ */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: calc(100vh - var(--nav-height));
}

.sidebar {
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    padding: 16px 20px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h3 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.2);
}

.icon-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.icon-btn.danger:hover {
    background: var(--danger);
    color: var(--white);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Search */
.search-container {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    pointer-events: none;
}

#location-search {
    width: 100%;
    padding: 12px 44px 12px 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

#location-search:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    position: absolute;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-submit:hover {
    background: var(--primary-light);
}

/* Results */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.result-item:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Navigation Panel */
.nav-panel {
    display: none;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.nav-panel.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-panel-header {
    padding: 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-destination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-destination svg {
    color: var(--accent);
}

.nav-destination h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.route-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Current Instruction */
.current-instruction {
    padding: 20px;
    background: var(--accent);
    display: flex;
    align-items: center;
    gap: 16px;
}

.instruction-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.instruction-text {
    flex: 1;
}

.instruction-main {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.instruction-distance {
    font-size: 0.85rem;
    color: var(--primary);
    opacity: 0.8;
}

/* Steps */
.steps-container {
    padding: 16px;
}

.steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
}

.steps-count {
    color: var(--gray-400);
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.step-item.active {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
}

.step-icon {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    flex-shrink: 0;
}

.step-item.active .step-icon {
  background: var(--accent);
  color: var(--primary);
  }

.step-item.completed {
  opacity: 0.5;
  background: var(--gray-50);
}

.step-item.completed .step-icon {
  background: var(--success);
  color: white;
}

.step-text {
    flex: 1;
    line-height: 1.4;
    color: var(--gray-700);
}

.step-distance {
    font-size: 0.75rem;
    color: var(--gray-400);
    white-space: nowrap;
}

/* ============================================
   Map
   ============================================ */
.map-wrapper {
    position: relative;
    background: var(--gray-200);
}

.map {
    width: 100%;
    height: 100%;
}

.map canvas {
    z-index: 1 !important;
}

/* Navigation Arrow Overlay */

@keyframes blink-marker {
    0%, 100% { 
        opacity: 1;
        filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.8));
    }
    50% { 
        opacity: 0.5;
        filter: drop-shadow(0 0 1px rgba(59, 130, 246, 0.4));
    }
}

.user-marker-blink {
    animation: blink-marker 1.2s ease-in-out infinite;
}

/* Map Controls */
.map-controls {
    position: absolute;
    right: 20px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.map-btn {
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
    padding: 0;
    font: unset;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    min-width: 50px;
    min-height: 50px;
}

.map-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255,168,0,0.2);
}

.map-btn:active {
    transform: scale(0.95);
}

.map-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.map-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.map-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    color: inherit;
    fill: none;
    stroke: currentColor;
    display: block;
}

.map-btn span {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: inherit;
}

#start-nav-btn {
    width: auto !important;
    padding: 0 12px !important;
    gap: 6px !important;
    background: #ff6b35 !important;
    color: white !important;
    border-color: #ff6b35 !important;
    font-weight: 700 !important;
    min-width: 60px !important;
    height: 50px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 150 !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
    font-size: 12px !important;
}

#start-nav-btn:hover {
    background: #ff5722 !important;
    color: white !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4) !important;
    transform: translateY(-2px) !important;
}

#start-nav-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3) !important;
}

#start-nav-btn.active {
    background: #d84315 !important;
    border-color: #d84315 !important;
}

/* Status Bar */
.status-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: var(--white);
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
}

.status-item.active {
    color: var(--success);
}

.status-item.warning {
    color: var(--warning);
}

.status-item.error {
    color: var(--danger);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    box-shadow: var(--shadow);
    z-index: 60;
}

/* ============================================
   Lobby Card
   ============================================ */
.lobby-card {
    max-width: 420px;
    margin: 60px auto 0;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.lobby-icon {
    color: var(--primary);
    margin-bottom: 24px;
}

.lobby-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.lobby-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.6;
}

.lobby-card .input-wrapper input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 8px;
    font-weight: 600;
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider span {
    background: var(--white);
    padding: 0 16px;
    color: var(--gray-400);
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

/* ============================================
   Marker Labels
   ============================================ */
.marker-label {
    position: absolute;
    transform: translate(-50%, -35px);
    color: #333333;
    font-weight: 500;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 4px;
    border-radius: 2px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: none;
    transition: font-size 0.2s ease;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-section-full {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .app-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        bottom: 0;
        width: var(--sidebar-width);
        z-index: 80;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .screen {
        padding: 40px 20px;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 20px;
    }
    
    .modal-content {
        padding: 32px 24px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .status-bar {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .status-item span {
        display: none;
    }
}

/* Outside Campus Notice */
.outside-campus-notice {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
}

.outside-campus-notice.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.notice-content svg {
    flex-shrink: 0;
}

.notice-content strong {
    color: #FEF08A;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* ============================================
   Buildings Directory Menu
   ============================================ */
.buildings-section {
    min-height: calc(100vh - var(--nav-height));
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.buildings-container {
    max-width: 1400px;
    margin: 0 auto;
}

.buildings-section .section-header {
    margin-bottom: 48px;
}

.buildings-section .section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.buildings-section .section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-top: 12px;
}

.buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    animation: fadeIn 0.5s ease;
}

.building-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.building-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.building-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 3rem;
    overflow: hidden;
}

.building-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.building-image svg {
    opacity: 0.5;
}

.building-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.building-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.3;
}

.building-description {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.building-footer {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.building-btn {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.building-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.building-btn.primary {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    flex: 1.5;
}

.building-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.building-badge {
    display: inline-block;
    background: var(--blue-light);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .buildings-section {
        padding: 40px 20px;
    }
    
    .buildings-section .section-header h2 {
        font-size: 2rem;
    }
    
    .buildings-grid {
        grid-template-columns: 1fr;
    }
    
    .building-image {
        height: 180px;
    }
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   Interactive Mode Styles
   ============================================ */

/* Hide header when in interactive mode */
#interactive-screen .lobby-header {
    display: none;
}

/* Topbar Interactive Styles */
.topbar {
    background: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prmsu {
    color: #f9a602;
    font-weight: 700;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.top-actions input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    transition: all 0.2s ease;
    outline: none;
}

.top-actions input:focus {
    border-color: #f9a602;
    box-shadow: 0 0 0 3px rgba(249, 166, 2, 0.1);
}

.notif {
    border: none;
    background: #f9a602;
    color: #000;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif:hover {
    background: #f89600;
    transform: scale(1.08);
}

/* Main Layout */
.layout {
    display: flex;
    padding: 20px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.card.profile {
    background: linear-gradient(135deg, #f9a602 0%, #fb9800 100%);
    color: white;
}

.card.profile h3 {
    color: white;
    margin-top: 8px;
}

.card.location h3 {
    color: #222;
    margin-top: 8px;
}

.label {
    font-size: 12px;
    color: #888;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.card.profile .label {
    color: rgba(255,255,255,0.9);
}

/* Action Buttons */
.actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actions button {
    width: 100%;
    padding: 12px;
    margin: 0;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #ffd166;
    color: #000;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.actions button:active {
    transform: translateY(0);
}

.actions .danger {
    background: #ff6b6b;
    color: #fff;
}

.actions .danger:hover {
    background: #ff5252;
}

/* Chat Section */
.chat {
    display: flex;
    flex-direction: column;
}

.chat h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-box {
    height: 150px;
    background: #f1f3f6;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-box p {
    margin: 0;
    padding: 6px;
    background: white;
    border-radius: 6px;
    word-break: break-word;
}

.chat-box .system {
    color: #666;
    font-style: italic;
    background: #f0f0f0;
    padding: 6px;
    border-radius: 6px;
}

.chat-input {
    display: flex;
    gap: 8px;
    margin-top: 0;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.chat-input input:focus {
    border-color: #f9a602;
    box-shadow: 0 0 0 3px rgba(249, 166, 2, 0.1);
}

.chat-input button {
    background: #f9a602;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: #000;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chat-input button:hover {
    background: #f89600;
    transform: scale(1.05);
}

.chat-input button:active {
    transform: scale(0.98);
}

/* Map Area */
.map-area {
    flex: 1;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
}

.map-area h2 {
    margin: 0 0 16px 0;
    font-size: 24px;
    color: #222;
}

/* Map Container */
.map-container {
    position: relative;
    flex: 1;
    background: repeating-linear-gradient(
        45deg,
        #f9fafb,
        #f9fafb 10px,
        #eef1f5 10px,
        #eef1f5 20px
    );
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    min-height: 400px;
    transition: transform 0.3s ease;
}

/* Markers */
.marker {
    position: absolute;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 40;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
}

.marker.you {
    background: #f9a602;
    border: 2px solid #fff;
    top: 60%;
    left: 45%;
}

.marker.other {
    background: #3b82f6;
    top: 40%;
    left: 55%;
}

.marker.destination {
    background: #ef4444;
}

.marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Map Controls */


/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.chat-box::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.chat-box::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.chat-box::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.chat-box::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .layout {
        gap: 16px;
        padding: 16px;
    }
    
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
        gap: 16px;
    }
    
    .sidebar {
        width: 100%;
        max-height: auto;
        overflow-y: visible;
        order: 2;
    }
    
    .map-area {
        order: 1;
        min-height: 500px;
    }
    
    .map-container {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .topbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .top-actions {
        width: 100%;
    }
    
    .top-actions input {
        flex: 1;
    }
    
    .layout {
        padding: 12px;
        gap: 12px;
    }
    
    .sidebar {
        gap: 12px;
    }
    
    .map-area {
        padding: 12px;
    }
    
    .card {
        padding: 12px;
    }
    
    .marker {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Animation for modals and toasts */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   LOBBY SCREEN STYLES
   =========================== */

.lobby-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: var(--bg-secondary);
}

.lobby-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 24px;
    z-index: 100;
}

.lobby-topbar .logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lobby-topbar .prmsu {
    color: var(--primary);
    font-weight: 700;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.search-input {
    padding: 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.notif {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.notif:hover {
    background: var(--bg-secondary);
}

.lobby-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    gap: 0;
}

.lobby-sidebar {
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card.profile,
.card.location {
    padding: 16px;
}

.label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card.actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.action-btn {
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-align: left;
}

.action-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.action-btn.danger {
    color: #dc2626;
}

.action-btn.danger:hover {
    background: #dc2626;
    color: var(--white);
    border-color: #dc2626;
}

.card.chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
}

.card h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 12px;
    height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-message {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: 4px;
    margin: 0;
}

.chat-input-group {
    display: flex;
    gap: 8px;
}

.chat-message-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.chat-message-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.chat-send-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.card.members {
    padding: 12px;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--white);
    border-radius: 4px;
    font-size: 13px;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.member-status.online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.member-name {
    color: var(--text-primary);
}

.lobby-map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
}

.lobby-map-area h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.map-container {
    flex: 1;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lobby-map {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    position: relative;
}

.markers-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.marker {
    position: absolute;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.marker.you {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.marker.other {
    color: var(--primary);
    top: 30%;
    left: 60%;
    transform: translate(-50%, -50%);
}

.marker:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.lobby-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: scale(1.1);
}

.lobby-status {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.status-badge,
.participants-badge {
    background: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.dot.connecting {
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Lobby Design */
@media (max-width: 1024px) {
    .lobby-container {
        grid-template-columns: 280px 1fr;
    }
    
    .lobby-sidebar {
        padding: 16px 12px;
    }
    
    .search-input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .lobby-topbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .top-actions {
        width: 100%;
        margin-left: 0;
    }
    
    .search-input {
        width: 100%;
    }
    
    .lobby-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .lobby-sidebar {
        order: 2;
        border-right: none;
        border-top: 1px solid var(--gray-200);
        padding: 12px;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .lobby-map-area {
        order: 1;
        padding: 12px;
        gap: 8px;
    }
    
    .card.chat {
        max-height: 150px;
    }
    
    .chat-box {
        height: 100px;
    }
}

/* ===========================
   INTERACTIVE MODE STYLES
   =========================== */

.lobby-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Header */
.lobby-header {
    background: var(--white);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.logo-text .highlight {
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lobby-code-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid var(--accent);
}

.code-label {
    font-size: 0.85rem;
    color: var(--gray-700);
    font-weight: 500;
}

.code-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}

.copy-btn {
    background: var(--accent);
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--primary);
}

.copy-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.leave-btn {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.leave-btn:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

/* Sidebar */
.sidebar {
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
    width: 380px;
    min-width: 380px;
    flex-shrink: 0;
}

/* Map Section */
.map-section {
    display: flex;
    flex-direction: column;
    background: var(--white);
    flex: 1;
    overflow: hidden;
}

.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.panel-title svg {
    color: var(--accent);
}

/* Lobby Info Panel */
.lobby-info-panel {
    background: var(--white);
    color: var(--gray-900);
}

.lobby-info-panel .panel-title {
    color: var(--gray-900);
    border-bottom-color: var(--gray-200);
}

.lobby-info-panel .panel-title svg {
    color: var(--accent);
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.info-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.host-badge {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-online {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.participants-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 2px solid var(--gray-200);
}

/* Participants Panel */
.participant-count {
    margin-left: auto;
    background: var(--accent);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
}

.participant-item:hover {
    background: var(--accent-light);
    transform: translateX(4px);
}

.participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.participant-status {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.participant-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

/* Lobby Code Panel */
.lobby-code-panel {
    padding: 12px !important;
    text-align: center;
    flex-shrink: 0;
}

.lobby-code-display-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    border-radius: var(--radius-lg);
    margin-top: 12px;
}

.code-value-large {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.copy-btn-large {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn-large:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--white);
}

/* Users Panel */
.users-panel {
    flex-shrink: 0;
    max-height: 150px;
    padding: 12px !important;
}

.users-list {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.users-list::-webkit-scrollbar {
    height: 6px;
}

.users-list::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 3px;
}

.users-list::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.user-box {
    flex-shrink: 0;
    width: 100px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-box:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.user-box.current {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.user-name {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 0.85rem;
    margin-bottom: 6px;
    word-break: break-word;
}

.user-location {
    font-size: 0.7rem;
    color: var(--gray-600);
    line-height: 1.2;
    word-break: break-word;
}

/* Chat Panel */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 12px !important;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px;
    margin-bottom: 8px;
    min-height: 0;
}

.chat-message {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--gray-50);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.system-message {
    background: var(--blue-light);
    border-left: 3px solid var(--blue);
}

.chat-message.user-message {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
}

.message-icon {
    font-size: 1.2rem;
}

.message-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--gray-700);
}

.message-sender {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-left: 8px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.1);
}

.send-btn {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.send-btn:active {
    transform: translateY(0);
}

/* Map Section */
.map-section {
    display: flex;
    flex-direction: column;
    background: var(--white);
    flex: 1;
    overflow: hidden;
}

.map-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
}

.map-title svg {
    color: var(--accent);
}

.map-actions {
    display: flex;
    gap: 12px;
}

.map-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
}

.map-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--primary);
    transform: translateY(-1px);
}

.map-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
}

.map-container {
    flex: 1;
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container #map {
    width: 100%;
    height: 100%;
}

/* Map Controls */
.map-controls {
    position: absolute;
    right: 20px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-700);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.control-btn:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: scale(1.1);
}

/* Active Users Indicator */
.active-users-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.user-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

.user-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.user-dot:nth-child(3) {
    animation-delay: 0.6s;
}

#activeUsersText {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-left: 4px;
}

/* =============================
     ENHANCED MOBILE RESPONSIVE
     ============================= */

/* Tablet Landscape (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 320px;
    }
    
    .hero-section-full {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 32px;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .screen {
        padding: 40px 24px;
    }
    
    .screen-container {
        max-width: 100%;
        padding: 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .app-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-height);
        bottom: 0;
        width: var(--sidebar-width);
        z-index: 2000;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        box-shadow: var(--shadow-lg);
        height: calc(100vh - var(--nav-height));
        border-right: 1px solid var(--gray-200);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .map-wrapper {
        height: calc(100vh - var(--nav-height));
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Interactive Mode Adjustments */
    .lobby-container .main-content {
        display: flex;
        flex-direction: column;
    }
    
    .lobby-container .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: 50vh;
        transform: none;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        overflow-y: auto;
        top: 0;
    }
    
    .lobby-container .map-section {
        flex: 1;
        min-height: 50vh;
    }
    
    .users-list {
        flex-wrap: wrap;
    }
    
    .buildings-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Tablet Portrait & Large Mobile (max-width: 900px) */
@media (max-width: 900px) {
    .hero-section-full {
        padding: 32px 16px;
        gap: 24px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-hero {
        padding: 14px 24px;
        font-size: 0.95rem;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 12px;
    }
    
    .screen {
        padding: 32px 16px;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 20px;
        width: fit-content;
    }
    
    .card-grid.mode-grid {
        grid-template-columns: 1fr;
    }
    
    .selection-card {
        padding: 20px;
    }
    
    .feature-card .card-icon {
        width: 52px;
        height: 52px;
    }
    
    .map-controls {
        right: 12px;
        top: 12px;
        gap: 6px;
    }
    
    .map-btn {
        width: 44px;
        height: 44px;
    }
    
    #start-nav-btn {
        width: auto !important;
        height: 44px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
    }
    
    .status-bar {
        bottom: 16px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .status-item {
        font-size: 0.7rem;
    }
    
    /* Interactive Mode */
    .lobby-header {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .lobby-code-display {
        width: 100%;
        justify-content: center;
    }
    
    .leave-btn {
        width: 100%;
    }
    
    .map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .map-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .buildings-grid {
        grid-template-columns: 1fr;
    }
    
    .building-image {
        height: 180px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }
    
    .main-nav {
        height: var(--nav-height);
        padding: 0;
    }
    
    .nav-container {
        padding: 0 12px;
    }
    
    .brand-name {
        font-size: 0.95rem;
    }
    
    .user-status {
        font-size: 0.65rem;
    }
    
    .logo-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .nav-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Modal */
    .modal-content {
        padding: 32px 20px;
        max-width: 90%;
        margin: 0 20px;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-icon {
        margin-bottom: 16px;
    }
    
    .modal-icon svg {
        width: 56px;
        height: 56px;
    }
    
    /* Hero Section */
    .hero-section-full {
        padding: 24px 12px;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-bottom: 16px;
    }
    
    .hero-features {
        margin-bottom: 24px;
        gap: 8px;
    }
    
    .feature-chip {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    
    .feature-chip svg {
        width: 14px;
        height: 14px;
    }
    
    /* Screens */
    .screen {
        padding: 24px 12px;
    }
    
    .section-header {
        margin-bottom: 32px;
    }
    
    .section-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 12px;
    }
    
    .section-header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Cards */
    .selection-card {
        padding: 16px;
        gap: 12px;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
    }
    
    .card-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .card-content h3 {
        font-size: 1.1rem;
    }
    
    .card-content p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .card-meta {
        font-size: 0.7rem;
    }
    
    .feature-card .card-icon {
        width: 48px;
        height: 48px;
    }
    
    .feature-card .card-content h3 {
        font-size: 1.2rem;
    }
    
    .feature-tags {
        gap: 6px;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .card-arrow {
        width: 32px;
        height: 32px;
    }
    
    .card-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .btn-hero {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .back-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    /* Sidebar */
    .sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar-header {
        padding: 12px 16px;
    }
    
    .sidebar-header h3 {
        font-size: 1rem;
    }
    
    .sidebar-content {
        padding: 16px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    
    .search-container {
        margin-bottom: 16px;
    }
    
    #location-search {
        font-size: 0.85rem;
        padding: 10px 40px 10px 40px;
    }
    
    .search-icon {
        width: 16px;
        height: 16px;
        left: 12px;
    }
    
    .search-submit {
        width: 28px;
        height: 28px;
    }
    
    .result-item {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    /* Navigation Panel */
    .nav-panel-header {
        padding: 12px;
    }
    
    .nav-destination h4 {
        font-size: 0.9rem;
    }
    
    .route-meta {
        font-size: 0.75rem;
    }
    
    .current-instruction {
        padding: 16px;
        gap: 12px;
    }
    
    .instruction-icon {
        width: 40px;
        height: 40px;
    }
    
    .instruction-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .instruction-main {
        font-size: 1rem;
    }
    
    .instruction-distance {
        font-size: 0.8rem;
    }
    
    .steps-container {
        padding: 12px;
    }
    
    .steps-header {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
    
    .steps-list {
        max-height: 150px;
        gap: 6px;
    }
    
    .step-item {
        padding: 10px;
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .step-icon {
        width: 24px;
        height: 24px;
    }
    
    .step-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .step-distance {
        font-size: 0.7rem;
    }
    
    /* Map */
    .map-wrapper {
        height: 55vh;
        max-height: 55vh;
    }
    
    .map-controls {
        right: 8px;
        top: 8px;
        gap: 6px;
    }
    
    .map-btn {
        width: 40px;
        height: 40px;
        border-radius: 6px;
    }
    
    .map-btn svg {
        width: 18px;
        height: 18px;
    }
    
    #start-nav-btn {
        width: auto !important;
        height: 40px !important;
        padding: 0 8px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }
    
    #start-nav-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .status-bar {
        bottom: 12px;
        padding: 6px 10px;
        gap: 6px;
        font-size: 0.7rem;
    }
    
    .status-item svg {
        width: 12px;
        height: 12px;
    }
    
    .mobile-menu-btn {
        left: 12px;
        top: 12px;
        width: 44px;
        height: 44px;
    }
    
    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Interactive Mode */
    .lobby-container {
        height: 100vh;
    }
    
    .lobby-header {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .lobby-code-display {
        width: 100%;
        padding: 6px 12px;
    }
    
    .code-label {
        font-size: 0.75rem;
    }
    
    .code-value {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .copy-btn {
        padding: 4px 6px;
    }
    
    .leave-btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .main-content {
        flex-direction: column;
        height: calc(100vh - var(--nav-height) - 100px);
    }
    
    .lobby-container .sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 40vh;
        padding: 12px;
        gap: 12px;
        order: 2;
    }
    
    .lobby-container .map-section {
        order: 1;
        flex: 1;
        min-height: 40vh;
    }
    
    .panel {
        padding: 12px;
        border-radius: var(--radius);
    }
    
    .panel-title {
        font-size: 0.9rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .panel-title svg {
        width: 16px;
        height: 16px;
    }
    
    /* Lobby Code Panel */
    .lobby-code-panel {
        padding: 10px !important;
    }
    
    .lobby-code-display-large {
        padding: 12px;
        gap: 8px;
    }
    
    .code-value-large {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    
    .copy-btn-large {
        padding: 6px 10px;
    }
    
    /* Users Panel */
    .users-panel {
        padding: 10px !important;
        max-height: none;
    }
    
    .users-list {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .user-box {
        width: 80px;
        padding: 8px;
    }
    
    .user-name {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .user-location {
        font-size: 0.65rem;
    }
    
    /* Chat Panel */
    .chat-panel {
        padding: 10px !important;
    }
    
    .chat-messages {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .chat-message {
        padding: 10px;
        gap: 8px;
    }
    
    .message-text {
        font-size: 0.8rem;
    }
    
    .message-sender {
        font-size: 0.8rem;
    }
    
    .message-time {
        font-size: 0.65rem;
    }
    
    .chat-input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .send-btn {
        padding: 10px 12px;
    }
    
    .send-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Map Section */
    .map-header {
        padding: 12px;
    }
    
    .map-title {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .map-title svg {
        width: 18px;
        height: 18px;
    }
    
    .map-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .map-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.8rem;
        justify-content: center;
    }
    
    .map-container {
        border-radius: var(--radius);
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .map-controls {
        right: 8px;
        top: 8px;
    }
    
    .active-users-indicator {
        bottom: 8px;
        left: 8px;
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    
    .user-dot {
        width: 8px;
        height: 8px;
    }
    
    /* Buildings Directory */
    .buildings-section {
        padding: 32px 12px;
    }
    
    .buildings-container .back-btn {
        margin-bottom: 20px;
    }
    
    .buildings-section .section-header h2 {
        font-size: 1.8rem;
    }
    
    .buildings-section .section-header p {
        font-size: 0.9rem;
    }
    
    .buildings-grid {
        gap: 16px;
    }
    
    .building-card {
        border-radius: var(--radius);
    }
    
    .building-image {
        height: 160px;
    }
    
    .building-content {
        padding: 16px;
    }
    
    .building-name {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .building-description {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .building-footer {
        flex-direction: column;
        gap: 6px;
        padding-top: 12px;
    }
    
    .building-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .building-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    /* Join Lobby Modal */
    .modal .modal-content {
        padding: 24px 16px;
        max-width: 90%;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        gap: 12px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .input-group input {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .input-group .btn-primary {
        width: 100%;
        padding: 10px 20px;
    }
    
    .help-text {
        font-size: 0.75rem;
    }
}

/* Small Mobile (max-width: 600px) */
@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .section-header h1,
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .feature-chip {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .card-content h3 {
        font-size: 1rem;
    }
    
    .feature-card .card-content h3 {
        font-size: 1.1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-hero {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
    
    .sidebar-header h3 {
        font-size: 0.9rem;
    }
    
    .map-btn {
        width: 36px;
        height: 36px;
    }
    
    #start-nav-btn {
        height: 36px !important;
        font-size: 9px !important;
    }
    
    .status-bar {
        bottom: 10px;
        padding: 5px 8px;
        gap: 6px;
    }
    
    .status-item {
        font-size: 0.65rem;
    }
    
    .status-item svg {
        width: 10px;
        height: 10px;
    }
    
    .lobby-code-display-large {
        padding: 10px;
    }
    
    .code-value-large {
        font-size: 1.2rem;
    }
    
    .user-box {
        width: 70px;
        padding: 6px;
    }
    
    .user-name {
        font-size: 0.7rem;
    }
    
    .user-location {
        font-size: 0.6rem;
    }
    
    .map-title {
        font-size: 1rem;
    }
    
    .buildings-section .section-header h2 {
        font-size: 1.6rem;
    }
    
    .building-image {
        height: 140px;
    }
    
    .building-name {
        font-size: 1rem;
    }
}

/* Landscape Mobile (max-height: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section-full {
        min-height: auto;
        padding: 20px 12px;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .sidebar {
        max-height: 100vh;
    }
    
    .map-wrapper {
        height: 100vh;
    }
    
    .steps-list {
        max-height: 100px;
    }
    
    .chat-messages {
        max-height: 120px;
    }
}

/* Very Small Devices (max-width: 360px) */
@media (max-width: 360px) {
    .brand-name {
        font-size: 0.85rem;
    }
    
    .user-status {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .section-header h1,
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .card-content h3 {
        font-size: 0.95rem;
    }
    
    .selection-card {
        padding: 12px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-hero {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .map-controls {
        gap: 4px;
    }
    
    .map-btn {
        width: 32px;
        height: 32px;
    }
    
    #start-nav-btn {
        height: 32px !important;
        padding: 0 6px !important;
        font-size: 8px !important;
    }
    
    .code-value-large {
        font-size: 1rem;
    }
    
    .user-box {
        width: 65px;
    }
}

/* Prevent horizontal scroll on all devices */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .map-btn,
    .control-btn,
    .icon-btn,
    .action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .result-item,
    .step-item,
    .participant-item,
    .building-card {
        min-height: 44px;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .map-wrapper,
    .lobby-container,
    .map-section {
        height: -webkit-fill-available;
    }
}

/* Print styles */
@media print {
    .main-nav,
    .sidebar,
    .map-controls,
    .status-bar,
    .mobile-menu-btn,
    .lobby-header,
    .chat-panel,
    .map-actions {
        display: none !important;
    }
    
    .map-wrapper,
    .map-container {
        height: auto !important;
        page-break-inside: avoid;
    }
}