/*
 * Frontend Layout CSS - The Ghost Maps
 */

/* === GLOBAL RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    overflow-x: hidden;
}

/* === LANDING PAGE === */
.landing-page {
    background: var(--ghost-black);
    color: var(--text-white);
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    box-shadow: var(--shadow-lg);
}

.navbar-brand img {
    height: 40px;
    filter: brightness(1.1);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--glow-white);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(32, 41, 56, 0.7) 30%,
        rgba(46, 16, 101, 0.6) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 var(--spacing-md);
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

/* === APP PAGE === */
.app-page {
    background: var(--midnight-blue);
    color: var(--text-bone);
}

.app-container {
    display: flex;
    height: 100vh;
    background: var(--midnight-blue);
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--ghost-black);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    transition: transform var(--transition-normal);
}

.app-main {
    flex: 1;
    position: relative;
    display: flex;
}

.map-container {
    flex: 1;
    position: relative;
    background: var(--ghost-dark);
}

.google-map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1023px) {
    .app-container {
        padding-top: var(--topbar-height);
        padding-bottom: var(--bottom-nav-height);
        flex-direction: column;
    }
    
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: var(--z-modal);
        transform: translateX(-100%);
        max-width: 350px;
        width: 85%;
        box-shadow: var(--shadow-xl);
    }
    
    .app-sidebar.active {
        transform: translateX(0);
    }
    
    .app-main {
        flex: 1;
        width: 100%;
    }
}

/* === MOBILE HEADER === */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--ghost-black);
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    height: 100%;
}

.mobile-menu-toggle,
.mobile-search-toggle,
.mobile-notifications {
    background: none;
    border: none;
    color: var(--text-bone);
    font-size: var(--font-size-lg);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.mobile-menu-toggle:hover,
.mobile-search-toggle:hover,
.mobile-notifications:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ghost-accent);
}

/* === MOBILE BOTTOM NAVIGATION === */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--ghost-black);
    display: flex;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: var(--spacing-sm);
    position: relative;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: var(--ghost-accent);
    text-decoration: none;
}

.mobile-bottom-nav .nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--ghost-accent);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--glow-red);
}

.mobile-bottom-nav .nav-item i {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

.mobile-bottom-nav .nav-item span {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* === LOADING STATES === */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-bone);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--ghost-accent);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    animation: ghostFloat 2s ease-in-out infinite;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin: 0 auto var(--spacing-sm);
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}
