/* css/style.css */
:root {
    --accent: #66CCFF;
    --text: #ffffff;
    --side-bg: #FFFFFF;
    --side-text: #000000;
    --side-border: rgba(0,0,0,0.1);
    --hero-overlay: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

body.dark-mode {
    --side-bg: #121212;
    --side-text: #E0E0E0;
    --side-border: rgba(255,255,255,0.15);
    --hero-overlay: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.85));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; font-family: 'Noto Sans SC', sans-serif; min-height: 100vh; }

.hero-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--hero-overlay),
                url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?q=80&w=2074&auto=format&fit=crop') center/cover no-repeat;
    z-index: 1;
    filter: blur(0px);
    transition: filter 0.5s ease;
}

.page-container {
    position: relative; z-index: 2; height: 100dvh; padding: 2rem 4rem;
    display: flex; flex-direction: column; justify-content: space-between;
    color: var(--text);
    max-width: 1400px; margin: 0 auto;
}

.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.logo {
    font-weight: 900; font-size: 1.4rem; color: #fff; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
}
.logo-icon { font-size: 1.8rem; }
.menu-btn { font-weight: 700; cursor: pointer; opacity: 0.7; transition: 0.2s; font-size: 0.95rem; letter-spacing: 1px; }
.menu-btn:hover { opacity: 1; }

.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

#mainHeroText {
    max-width: 70%;
    margin: 0 auto;
    word-break: break-word;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

#mainHeroText .author {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.6em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1em;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1000px;
    width: 100%;
    flex-shrink: 0;
    padding: 1.5rem 0 1rem;
    margin: 0 auto;
    justify-items: center;
}

.grid-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
    padding-left: 1.2rem;
    align-items: flex-start;
    text-decoration: none;
    transform: none !important;
    margin: 0 !important;
}

.grid-item:hover {
    border-left-color: var(--accent);
    box-shadow: 0 0 20px rgba(102, 204, 255, 0.1);
}

.grid-item .main {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 900;
    display: flex; align-items: center; gap: 8px;
    color: #fff;
}
.grid-item .sub {
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    opacity: 0.7;
    margin-top: 4px;
    color: #fff;
}
.arrow { font-size: 1.2rem; opacity: 0.8; }

aside {
    position: fixed; top: 0; right: -100%; width: 450px; max-width: 85vw; height: 100%;
    background: var(--side-bg); color: var(--side-text); padding: 3rem 2.5rem;
    z-index: 1000; display: flex; flex-direction: column;
    transition: right 0.55s cubic-bezier(0.8, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
    isolation: isolate;
}
body.sidebar-open aside { right: 0; }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}
.mode-toggle {
    font-size: 0.8rem; font-weight: 700; cursor: pointer;
    border: 1px solid var(--side-text); padding: 4px 14px;
    border-radius: 20px; opacity: 0.6;
}
.close-btn {
    font-weight: 900; cursor: pointer; font-size: 1.8rem; line-height: 1;
}

.side-nav { list-style: none; margin: 2.5rem 0; flex: 1; }
.side-nav li { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; cursor: pointer; transition: 0.2s; }
.side-nav li:hover { color: var(--accent); transform: translateX(-4px); }

.sidebar-footer {
    border-top: 1px solid var(--side-border); padding-top: 1rem; font-size: 0.8rem; opacity: 0.6;
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none; z-index: 900;
    transition: opacity 0.4s ease;
}
body.sidebar-open .overlay { opacity: 1; pointer-events: auto; }
body.sidebar-open .hero-bg {
    filter: blur(6px);
}

.site-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    opacity: 0.35;
    letter-spacing: 1px;
    padding-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.4;
}

.footer-left .icp,
.sidebar-footer .icp {
    color: #66CCFF;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-left .icp:hover,
.sidebar-footer .icp:hover {
    color: #88DDFF;
}

@media (max-width: 600px) {
    .page-container { padding: 1.5rem; min-height: 100vh; }
    .bottom-grid { grid-template-columns: 1fr; gap: 0.6rem; padding: 1rem 0; }
    .grid-item {
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 0.6rem 0;
        align-items: center;
        text-align: center;
    }
    .grid-item:hover { border-left-color: rgba(255, 255, 255, 0.25); border-bottom-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
}

/* Cookie 横幅样式 */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    padding: 1.2rem 2rem;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease-out;
    min-height: 60px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    flex: 1;
    min-width: 0;
}

.cookie-content p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

.cookie-content a {
    color: #66CCFF;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-content a:hover {
    color: #88DDFF;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--accent);
    color: #000;
}

.cookie-btn-primary:hover {
    background: #88DDFF;
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
    }

    .cookie-content p {
        font-size: 0.8rem;
    }

    .cookie-actions {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }

    .cookie-btn {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.7rem;
    }
}