:root {
    --nav-height: 64px;
    --nav-bg: rgba(0, 0, 0, 0.7);
    --nav-bg-solid: rgba(0, 0, 0, 0.92);
    --overlay-blue: rgba(0, 102, 204, 0.75);
    --text-white: #ffffff;
    --text-light: #e0e0e0;
    --accent-blue: #0066cc;
    --transition-speed: 0.35s;
    --font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: #0a0a0a;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.navbar.scrolled {
    background-color: var(--nav-bg-solid);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    z-index: 1002;
}

.nav-logo-img {
    height: 22px;
    width: auto;
    display: block;
}

.nav-logo:hover {
    color: #fff;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: 6px;
    letter-spacing: 0.5px;
    position: relative;
    white-space: nowrap;
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    border-radius: 1px;
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    width: calc(100% - 36px);
}

.nav-links a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-links a.active::after {
    width: calc(100% - 36px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    border-radius: 6px;
    transition: background-color var(--transition-speed) ease;
}

.hamburger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger .bar {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.35s ease;
    transform-origin: center;
}

.hamburger.open .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    width: 26px;
}

.hamburger.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    width: 26px;
}

/* Grid Section */
.grid-section {
    margin-top: var(--nav-height);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, calc((100vh - var(--nav-height)) / 2));
    gap: 0px;
    background-color: #0a0a0a;
}

.grid-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
}

.grid-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--overlay-blue);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    z-index: 1;
    pointer-events: none;
}

.grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: inherit;
    transform: scale(1);
    transition: transform 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.grid-item:hover::after {
    transform: scale(1.06);
}

.grid-item:hover::before {
    opacity: 1;
}

.grid-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.grid-item:hover .grid-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.grid-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.grid-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 18px;
    max-width: 320px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.grid-content .btn {
    display: inline-block;
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 30px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.grid-content .btn:hover {
    background-color: #fff;
    color: var(--accent-blue);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.grid-item .badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition-speed) ease;
    pointer-events: none;
}

.grid-item:hover .badge {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(0, 102, 204, 0.5);
}

/* Responsive Design */
@media (max-width: 1023px) and (min-width: 768px) {
    .grid-section {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, calc((100vh - var(--nav-height)) / 3));
    }

    .grid-content h3 {
        font-size: 1.3rem;
    }

    .grid-content p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .grid-content .btn {
        padding: 8px 22px;
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) {
    :root {
        --nav-height: 56px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: var(--nav-bg-solid);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 12px 16px;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.35s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 14px 18px;
        font-size: 1rem;
        text-align: center;
        border-radius: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    .hamburger {
        display: flex;
    }

    .grid-section {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 52vh);
        gap: 0;
    }

    .grid-item:hover::after {
        transform: scale(1.03);
    }

    .grid-content h3 {
        font-size: 1.25rem;
    }

    .grid-content p {
        font-size: 0.85rem;
        margin-bottom: 14px;
        max-width: 260px;
    }

    .grid-content .btn {
        padding: 8px 24px;
        font-size: 0.82rem;
    }

    .grid-item .badge {
        top: 12px;
        left: 12px;
        font-size: 0.68rem;
        padding: 3px 10px;
    }
}

@media (max-width: 400px) {
    .grid-section {
        grid-template-rows: repeat(6, 48vh);
    }

    .grid-content h3 {
        font-size: 1.1rem;
    }

    .grid-content p {
        font-size: 0.78rem;
        margin-bottom: 10px;
    }

    .grid-content .btn {
        padding: 7px 18px;
        font-size: 0.75rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .grid-item::before {
        opacity: 0.45;
    }

    .grid-content {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .grid-item:hover::after {
        transform: scale(1);
    }

    .grid-item:active::before {
        opacity: 0.7;
    }

    .grid-item:active::after {
        transform: scale(1.04);
    }
}

/* Footer */
.site-footer {
    background-color: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-copyright a:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 1400px) {
    .grid-content h3 {
        font-size: 1.8rem;
    }

    .grid-content p {
        font-size: 1.05rem;
        max-width: 360px;
    }

    .grid-content .btn {
        padding: 12px 34px;
        font-size: 0.95rem;
    }
}