:root {
    --sidebar-width: 280px;
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --border-color: #dadce0;
    --text-main: #3c4043;
    --accent: #000;
    --transition-speed: 0.3s;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}


h4{
    font-size: 28px;
}
body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- OVERLAY --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Higher than top-nav */
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    pointer-events: none;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--primary-bg);
    border-right: 1px solid var(--border-color);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001; /* Highest layer */
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* border-bottom: 1px solid var(--border-color); */
}

.sidebar-header span {
    font-weight: 600;
    font-size: 28px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #5f6368;
    display: block; 
}

/* Navigation Links */
.nav-list {
    list-style: none;
    padding: 10px 0;
}

.nav-item a {
    display: block;
    padding: 12px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-size:20px;
}

.nav-item a:hover {
    background-color: var(--secondary-bg);
}

.nav-item.active a {
    background-color: oklab(82.696% -0.07201 -0.05961 / 0.849);
    color: var(--accent);
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
    font-weight: 500;
}

/* --- MAIN WRAPPER --- */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-wrapper.full-width {
    margin-left: 0;
}

/* Top Nav */
.top-nav {
    height: 60px;
    display: flex;
    align-items: center; /* Centers everything vertically */
    padding: 0 15px;
background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);
}

/* The Hamburger Button */
#toggle-menu {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #5f6368;
    padding: 8px;
}

.top-nav-title {
    display: flex;
    align-items: center; /* Centers Icon and Text vertically */
    gap: 12px;           /* Space between icon and text */
    margin-left: 10px;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-main);
    cursor: pointer;      /* Makes it look clickable */
    user-select: none;    /* Prevents text highlighting on click */
}

/* The 40px Icon */
.nav-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

/* Content Body */
.content-body {
    padding: 20px 20px;
    max-width: 1000px;
    margin: 10px auto;
    width: 100%;
    flex-grow: 1; /* Pushes footer down */
}

.main-content{
    font-size: 22px;
    margin-left: 20px;
    p{
        margin: 10px auto;
    }
}

.hero-image {
    width: 100%;
    height: 300px;
    background: #f1f3f4;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.info-card {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

/* --- FOOTER --- */
.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 20px 20px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center; 
    p{
        font-size: 18px;
    }
}

.footer-section { flex: 1; min-width: 250px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; color: #5f6368; font-size: 14px; }
.footer-bottom { 
    width: 100%; text-align: center; border-top: 1px solid #ddd; 
    padding-top: 20px; margin-top: 20px; font-size: 12px; color: #777;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { align-items: center; }
}

@media (max-width: 768px) {
    /* Ensure the 'collapsed' class doesn't keep it hidden when 'active' is added on mobile */
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0) !important;
    }
}

.download-section {
    margin-top: 40px;
    padding: 20px;
}

.download-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-main);
}

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow wrapping on small mobile */
    gap: 15px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.app-icon.dark-bg {
    background-color: #1a1a1a;
}

.app-info {
    display: flex;
    flex-direction: column;
}

.app-info .zh {
    font-size: 18px;
    font-weight: 600;
}

.app-info .en {
    font-size: 14px;
    color: #5f6368;
}

.store-buttons {
    display: flex;
    gap: 10px;
}

.btn-store img {
    height: 40px; /* Standard height for store badges */
    width: auto;
    transition: transform 0.2s;
}

.btn-store:hover img {
    transform: scale(1.05);
}

/* Mobile Tweak */
@media (max-width: 480px) {
    .download-row {
        justify-content: center;
        text-align: center;
    }
    .app-brand {
        flex-direction: column;
        width: 100%;
    }
    .store-buttons {
        justify-content: center;
    }
}

.main-banner {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
    display: block;
    
    /* Subtle Fade: Transparent only at the very edges (0-3% and 97-100%) */
    mask-image: linear-gradient(to bottom, 
        transparent 0%, 
        black 3%, 
        black 97%, 
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(to bottom, 
        transparent 0%, 
        black 3%, 
        black 97%, 
        transparent 100%
    );
    
    margin: 0; 
}

.main-banner::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-image: url('sim-banner.png');
    background-size: cover;
    background-position: center bottom;
    transform: scale(1.2); 
    transform-origin: center;
    z-index: -1;
}

/* Optional: Add a subtle inner shadow for extra "depth" */
.main-banner::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, transparent 15%, transparent 85%, rgba(255,255,255,0.2) 100%);
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-banner {
        height: 300px;
        /* Adjust fade for smaller screens */
        mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    }
}