
/* --- CUSTOM PAGE SCROLLBAR (Webkit Browsers) --- */

/* Define the width of the scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* Style the draggable handle of the scrollbar */
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

/* Style the background track of the scrollbar */
::-webkit-scrollbar-track {
    background: #111;
}

/* Change handle color when hovered */
::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* --- 3. TYPOGRAPHY & LOGOS --- */




/* Apply the special 'Original Surfer' font to specific span elements */
.logo span,
.footer-text span {
    font-family: var(--font-special);
    font-weight: 400;
}

/* Logo container layout */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    letter-spacing: -3px;
}

/* Footer text branding layout */
.footer-text {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    letter-spacing: -1px;
}

/* Individual letter coloring for the 'CHUN' logo */
.logo span:nth-child(2) { color: #ffd700; } /* C - Gold */
.logo span:nth-child(3) { color: #ff6347; } /* H - Tomato */
.logo span:nth-child(4) { color: #00bfff; } /* U - DeepSkyBlue */
.logo span:nth-child(5) { color: #adff2f; } /* N - GreenYellow */

/* Individual letter coloring for the 'ARKY' footer text */
.footer-text span:nth-child(2) { color: #ff5555; } /* A */
.footer-text span:nth-child(3) { color: #55ff55; } /* R */
.footer-text span:nth-child(4) { color: #ff7f50; } /* K */
.footer-text span:nth-child(5) { color: #ffff55; } /* Y */

/* Styling for the duck emoji in the header */
.header-duck {
    font-size: 1.2rem;
    margin-right: 1px;
    cursor: default;
    user-select: none;
    position: relative;
    top: -2px;
}

/* Styling for the swan emoji in the footer */
.footer-swan {
    font-size: 1.2rem;
    margin-right: 2px;
    cursor: default;
    user-select: none;
    position: relative;
    top: 0px;
}

/* --- 4. HEADERS --- */

/* Main top navigation bar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed; /* Keep at top of screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.9); /* Translucent black */
    z-index: 1000; /* Ensure it stays above content */
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Center menu links in the main header */
.header-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex: 2;
}

.header-menu a {
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Icons/Utilities on the right side of header */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Date and Time displays in the header */
.header-date,
.header-time {
    color: #aaa;
    font-size: 0.8rem;
     flex: 1;                /* Occupies equal side space */
    font-family: var(--font-sans);
}

/* Flexbox distribution for header components */
.header-date,
.header-time,
.header-menu {
    flex: 1;
}

.header-date { text-align: left; }
.header-time { text-align: right; }

/* Sub-header bars (secondary navigation) */
.header21,
.header22 {
     display: flex;          /* FIX: Added flex to enable horizontal alignment */
    align-items: center;    /* FIX: Centers items vertically within the 40px bar */
    position: fixed;
    top: 50px; /* Sits exactly below the main header */
    left: 0;
    z-index: 999;
    width: 100%;
    height: 40px;
    padding: 0 25px;
    box-sizing: border-box;
    /* Sophisticated layered background with top/bottom border gradients */
/* --- NEW 3D BACKGROUND --- */
            background:
                /* Top edge highlight */
                linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent) top / 100% 1px no-repeat,
                /* Bottom edge shadow */
                linear-gradient(to right, transparent, rgba(0, 0, 0, 0.8), transparent) bottom / 100% 1px no-repeat,
                /* Main 3D body gradient (lighter on top, darker on bottom) */
                linear-gradient(to bottom, rgba(70, 70, 70, 0.95) 0%, rgba(35, 35, 35, 0.95) 40%, rgba(15, 15, 15, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            /* --- NEW 3D SHADOWS --- */
            box-shadow: 
                0 4px 8px rgba(0, 0, 0, 0.1), /* Drop shadow for depth */
                inset 0 1px 3px rgba(255, 255, 255, 0.1); /* Inner highlight for bevel */
    color: #ffffff;
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px);
}

.header21 { justify-content: space-between; }
.header22 { justify-content: center; }

/* Links within the secondary header */
.header21 a {
    padding: 0 10px;
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.header21 a:hover { opacity: 1; }

/* Generic navigation link styling */
.nav-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 5px;
    text-transform: none;
    opacity: 0.8;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links-container {
    display: flex;
    gap: 15px;
}

/* Hover effect for navigation links */
.nav-link:hover {
    color: #fff;
    text-decoration: none;
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); /* Glow effect */
}

/* Specific overrides for the second version of the sub-header links */
.header22 .nav-links-container {
    display: flex;
    gap: 8px;
}

.header22 .nav-link {
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s ease;
}

.header22 .nav-link:hover { opacity: 1; }

/* --- ICONS --- */

/* Standard SVG icon styling */
.icon-svg {
    width: 28px;
    height: 28px;
    fill: white;
    cursor: pointer;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.icon-svg:hover { opacity: 1; }

/* --- 5. SIDEBAR & SEARCH POPUPS --- */

/* Hidden-by-default side navigation drawer */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #222;
    z-index: 5000; /* High z-index to stay above everything */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    padding: 50px 20px;
    box-sizing: border-box;
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.4s ease; /* Smooth slide-in */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Section titles within the sidebar */
.menu-title {
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 1px;
    border-top: 1px solid #333;
    padding-top: 10px;
    margin-bottom: 0px;
    font-weight: bold;
    transform-origin: left center;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Hover animation for sidebar categories */
.menu-title:hover {
    opacity: 0.8;
    color: rgba(255, 252, 127, 1); /* Yellow tint on hover */
    transform: scale(1.1);
    cursor: pointer;
}

/* Sub-items within sidebar categories */
.menu-subtitle {
    color: #fff;
    font-family: var(--font-sans);
    font-weight: bold;
    font-size: 0.8rem;
    padding-left: 10px;
    padding-bottom: 5px;
    display: block;
    margin: 0;
}

/* State class to show the sidebar */
.sidebar.active { transform: translateX(0); }

/* Sidebar close button position */
.close-sidebar {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.8;
    cursor: pointer;
}

/* Thin scrollbar specifically for the sidebar */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

/* Full-screen search overlay container */
.search-modal-container {
    display: none; /* Controlled by JS */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 6000;
    justify-content: center;
    align-items: center;
}

/* Centered search input box */
.search-box {
    background: #222;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #444;
    width: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Styling for the search button */
.search-submit-btn {
    padding: 8px 10px;
    background: linear-gradient(to bottom, #444, #222);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    font-weight: bold;
    border-radius: 0px;
    transition: all 0.3s ease;
    display: inline-block;
}

.search-submit-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.8);
}

/* --- 6. FOOTERS --- */

/* Secondary bottom nav (appears above main footer) */
.footer2 {
    position: fixed;
    bottom: 50px;
    left: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 40px;
    padding: 0 24px;
    box-sizing: border-box;

               /* --- NEW 3D BACKGROUND --- */
            background:
                linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent) top / 100% 1px no-repeat,
                linear-gradient(to right, transparent, rgba(0, 0, 0, 0.8), transparent) bottom / 100% 1px no-repeat,
                linear-gradient(to bottom, rgba(70, 70, 70, 0.95) 0%, rgba(35, 35, 35, 0.95) 40%, rgba(15, 15, 15, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

            /* --- NEW 3D SHADOWS --- */
            box-shadow: 
                0 -4px 8px rgba(0, 0, 0, 0.5), /* Upward drop shadow for bottom bar */
                inset 0 1px 3px rgba(255, 255, 255, 0.05);

    color: #ffffff;
    opacity: 0; /* Hidden by default */
    transform: translateY(20px); /* Slide down effect */
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Active state for footer2 (controlled by scroll-depth JS) */
.footer2.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.footer2 .nav-link {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-sans);
    text-decoration: none;
    text-transform: none;
    flex: 1;
    transition: opacity 0.3s ease-out;
}

.footer2 .nav-link:hover {
    opacity: 1;
    transform: scale(1.00);
    cursor: pointer;
}

/* Column alignment for footer2 links */
.footer2 .nav-link:nth-child(1) { text-align: left; }
.footer2 .nav-link:nth-child(2) { text-align: center; }
.footer2 .nav-link:nth-child(3) { text-align: right; }

/* Main bottom bar footer */
footer.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* State class to show the main footer bar */
footer.bottom-bar.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Absolute positioning for footer sub-sections */
.bottom-left { position: absolute; left: 20px; }
.bottom-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.bottom-right {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 'Back to Top' button styling */
.footer-top-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.footer-top-btn:hover { transform: translateY(-5px); }

.bottom-right .nav-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

/* Small uppercase text for buttons */
.button-text {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- 7. RESPONSIVE DESIGN --- */

/* Mobile view adjustments (Tablets and smaller) */
@media (max-width: 768px) {
    /* Swap which sub-header is shown */
    .header21 { display: none !important; }
    .header22 { display: flex; }
    /* Increase top padding to account for mobile header stack */
}

/* Desktop view adjustments */
@media (min-width: 769px) {
    .header22 { display: none; }
}

/* --- HIDE SCROLLBAR IN FULL SCREEN --- */

/* Browser-specific instructions to hide scrollbars during full-screen mode */

/* Modern browsers (Firefox, Chrome, Edge) */
:fullscreen {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Legacy Edge */
    overflow-y: scroll; /* Maintain functionality while hiding bar */
}

/* Chrome, Safari, Opera webkit-specific scrollbar hiding */
:fullscreen::-webkit-scrollbar {
    display: none;
}

