/* --- VARIABLES & RESET --- */
:root {
    /* Main Background: Off-White (#f7f6f3) */
    --bg-color: #f7f6f3;         
    
    /* Text: Dark Gray/Black (#202020) */
    --text-color: #202020;
    
    /* Primary Accent: Deep Dark Blue (#000420) - Buttons, Strong Text */
    --accent-pop: #000420;       
    
    /* Secondary Accent: Dark Pale Blue (#111420) - Borders */
    --accent-warm: #111420;      
    
    /* NEW: Pale Bright Blue (#96a9f2) - Highlights, Hovers, Stars */
    --accent-bright: #96a9f2;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.65); 
    --glass-border: rgba(32, 32, 32, 0.1); 
    
    /* Shadows */
    --shadow: 0 8px 32px 0 rgba(0, 4, 32, 0.08);
    
    /* Navbar: Deep Blue with high opacity */
    --island-bg: rgba(0, 4, 32, 0.95); 
}

/* Custom Text Selection Color */
::selection {
    background: var(--accent-bright);
    color: var(--accent-pop);
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: transparent;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100%;
    position: relative;
}

/* --- BACKGROUND TEXTURE --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../asset/texture.png"); /* Make sure filename matches your new image */
    
    /* 1. Stop the image from repeating */
    background-repeat: no-repeat; 
    
    /* 2. Center the image on the screen */
    background-position: center center;
    
    /* 3. 'cover' ensures the image fills the screen without stretching/distorting.
          It will crop the edges slightly if the aspect ratio doesn't match, 
          but keeps the image sharp as long as the file resolution is decent. */
    background-size: cover; 
    
    z-index: -1; 
    pointer-events: none;
    opacity: 0.09;
    filter: invert(100%);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-pop); border-radius: 10px; border: 2px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-bright); }

/* --- UTILITIES --- */
main { width: 90%; max-width: 1400px; margin: 0 auto; }
section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 80px 0; box-sizing: border-box; }

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 3rem;
}

/* --- ANIMATIONS & FLASH --- */
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
.flash-container { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 999; }
.flash-msg {
    background: var(--accent-pop); color: white; padding: 15px 30px;
    border-radius: 30px; font-size: 1rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- DYNAMIC ISLAND NAVBAR (Desktop Default) --- */
.dynamic-island {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 850px;
    background: var(--island-bg);
    padding: 18px 40px;
    border-radius: 60px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    overflow: hidden; 
}

.nav-logo a { color: #fff; font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 30px; transition: 0.3s; }
.nav-item { color: #ccc; font-size: 1rem; font-weight: 500; }
.nav-item:hover { color: var(--accent-bright); transform: scale(1.1); }

.book-btn {
    background: #fff; 
    color: var(--accent-pop); 
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: 0.3s;
}
.book-btn:hover { transform: scale(1.05); background: var(--accent-bright); }

/* --- FOOTER --- */
footer {
    width: 100%; margin-top: auto; padding: 60px 0;
    background: linear-gradient(to top, #e0e0e0, transparent);
    text-align: center;
}
.footer-content { max-width: 600px; margin: 0 auto; padding: 20px; }
.footer-content h3 { margin: 0 0 10px 0; font-size: 1.5rem; color: var(--text-color); }
.socials { margin: 20px 0; }
.socials a { font-size: 1.8rem; margin: 0 15px; color: var(--text-color); transition: 0.3s; }
.socials a:hover { color: var(--accent-bright); transform: scale(1.2); }
.copyright { font-size: 0.9rem; color: #666; }

/* ==========================================================================
   MOBILE DYNAMIC ISLAND LOGIC
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. COLLAPSED STATE */
    .dynamic-island {
        top: 25px; 
        padding: 0 20px; 
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        width: auto; 
        min-width: 140px; 
        max-width: 90%;
        display: flex;
        flex-direction: column; 
        justify-content: center; 
        align-items: center;
        gap: 0;
        cursor: pointer;
        background: var(--island-bg);
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .nav-links, .book-btn {
        opacity: 0;
        pointer-events: none;
        display: none; 
    }
    
    .nav-logo {
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: 100%;
    }

    .nav-logo a {
        pointer-events: none; 
        text-decoration: none;
        color: #fff;
        font-size: 0.95rem; 
        line-height: 1;     
        display: flex;
        align-items: center;
    }
    
    /* Hamburger Icon */
    .nav-logo::after {
        content: '\f0c9'; 
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: 12px;
        font-size: 1rem;
        color: var(--accent-bright);
        transform: scaleX(1.3); 
        transition: transform 0.3s ease;
    }

    /* 3. EXPANDED STATE (Active) */
    .dynamic-island.active {
        width: 85%; 
        height: auto;       
        min-height: auto;
        max-height: 500px; 
        border-radius: 35px; 
        padding: 25px; 
        gap: 20px;
        background: rgba(0, 4, 32, 0.98); 
        justify-content: flex-start; 
    }

    .dynamic-island.active .nav-logo {
        height: auto;
        margin-bottom: 5px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 15px;
        justify-content: center;
    }
    
    .dynamic-island.active .nav-logo a {
         font-size: 1.2rem; 
         color: var(--accent-bright);
    }
    
    .dynamic-island.active .nav-logo::after {
        transform: rotate(90deg) scaleX(1.3); 
    }

    .dynamic-island.active .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        opacity: 1;
        pointer-events: auto;
        width: 100%;
        gap: 15px;
        margin: 0;
    }

    .dynamic-island.active .nav-links a {
        pointer-events: auto; 
        font-size: 1.1rem;
    }
    
    .dynamic-island.active .nav-links .nav-item:active {
        color: var(--accent-bright);
    }

    .dynamic-island.active .book-btn {
        display: flex;
        opacity: 1;
        pointer-events: auto;
        width: 100%;           
        max-width: 100%;       
        margin: 0;        
        box-sizing: border-box; 
        justify-content: center; 
        text-align: center;
        background: #fff;
        color: var(--accent-pop);
    }
}