/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

:root {
    --kanata-blue: #2894FF;
    --kanata-blue-light: #5AAFFF;
    --kanata-blue-dark: #1A6FCC;
    --white: #FFFFFF;
    --gold: #FFD700;
    --gold-light: #FFE44D;
    --light-blue: #87CEEB;
    --sky-gradient-start: #E8F4FF;
    --sky-gradient-end: #B8DCFF;
    --text-dark: #333333;
    --text-light: #666666;
    --primary-blue: #2894FF;
    --dark-blue: #1A6FCC;
    --light-gray: #F5F5F5;
    --cream-white: #F8FBFF;
}

html[lang="zh-CN"] {
    font-family: 'Noto Sans SC', 'Noto Sans JP', 'Roboto', 'Hiragino Sans', sans-serif;
}

h1, h2, .forever-kanata, .counter-number {
    font-family: 'Zen Maru Gothic', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream-white);
    min-height: 100vh;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

/* ==================== */
/* Navigation           */
/* ==================== */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: linear-gradient(135deg,
        rgba(40, 148, 255, 0.95) 0%,
        rgba(26, 111, 204, 0.95) 50%,
        rgba(40, 148, 255, 0.9) 100%);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow:
        0 2px 20px rgba(40, 148, 255, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    min-height: 56px;
    transition: transform 0.3s ease;
}

.site-nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-spacer {
    height: 56px;
}

.site-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.4) 50%,
        transparent 100%);
    opacity: 0.6;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-toggle.active {
    background: rgba(255, 255, 255, 0.25);
}

.hamburger {
    position: relative;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.nav-left .nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-left .nav-links a {
    display: block;
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.nav-left .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-left .nav-links a:hover {
    color: white;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.nav-left .nav-links a:hover::after {
    width: 60%;
}

/* Nav Right - Submit Button */
.nav-right {
    display: flex;
    align-items: center;
}

.nav-home-link {
    display: block;
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.nav-home-link::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-home-link:hover {
    color: white;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.nav-home-link:hover::after {
    width: 60%;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(26, 47, 94, 0.98);
    backdrop-filter: blur(16px);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, box-shadow 0.3s ease;
    z-index: 1001;
    box-shadow: none;
}

.mobile-nav.open {
    max-height: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.nav-open .site-nav {
    transform: translateY(0) !important;
}

.mobile-nav .nav-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.mobile-nav .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.mobile-nav .nav-links a {
    display: block;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.mobile-nav .nav-links a:hover,
.mobile-nav .nav-links a:active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* ==================== */
/* Main Header          */
/* ==================== */
.main-header {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/kanata-header.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: -1;
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.header-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(40, 148, 255, 0.1) 0%, rgba(26, 111, 204, 0.25) 100%);
}

.header-content {
    text-align: center;
    color: white;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content h1 {
    font-size: 2.8em;
    margin-bottom: 25px;
    font-weight: 700;
    animation: fadeInUp 1.2s ease-out;
    letter-spacing: 0.02em;
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(40, 148, 255, 0.4); }
    50% { box-shadow: 0 0 35px rgba(40, 148, 255, 0.6); }
}

.counter-container {
    background: linear-gradient(135deg, rgba(40, 148, 255, 0.9) 0%, rgba(26, 111, 204, 0.9) 100%);
    padding: 25px 50px;
    border-radius: 15px;
    display: inline-block;
    animation: fadeInUp 1.2s ease-out 0.3s both, gentlePulse 4s ease-in-out infinite 1.5s;
}

.counter-prefix {
    font-size: 0.95em;
    opacity: 0.9;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    font-weight: 300;
}

.counter-number {
    font-size: 3.5em;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.1;
}

#day-counter-number {
    color: white;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(40, 148, 255, 0.3);
}

.counter-unit {
    font-size: 0.4em;
    opacity: 0.95;
    margin-left: 0.15em;
    vertical-align: middle;
    -webkit-text-fill-color: white;
}

/* ==================== */
/* Content Sections     */
/* ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    padding: 80px 0;
}

.content-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--dark-blue);
    text-align: center;
}

/* ==================== */
/* Intro Section        */
/* ==================== */
.intro-section {
    background: #E8F4FF;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '\201C';
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 150px;
    color: rgba(40, 148, 255, 0.12);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    pointer-events: none;
}

.intro-section::after {
    content: '\221E';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    color: rgba(40, 148, 255, 0.08);
    pointer-events: none;
}

.intro-section h2 {
    font-size: 2.2em;
    color: var(--kanata-blue);
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 35px;
}

.intro-section p {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.15em;
    line-height: 2.2;
    color: #555;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ==================== */
/* Article Section      */
/* ==================== */
.article-section {
    background: #F0F6FF;
    padding: 60px 0 80px;
}

.article-section h2 {
    font-size: 2.2em;
    color: var(--kanata-blue);
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 35px;
}

.article-body {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    font-family: 'Noto Sans SC', 'Zen Maru Gothic', sans-serif;
}

.article-body p {
    font-size: 1.05em;
    line-height: 2.2;
    color: #555;
    font-weight: 300;
    margin-bottom: 1.4em;
    text-indent: 2em;
}

.article-body p:first-child {
    font-size: 1.15em;
    color: var(--kanata-blue);
    font-weight: 400;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-signature {
    max-width: 700px;
    margin: 40px auto 0;
    text-align: right;
    font-family: 'Zen Maru Gothic', 'Noto Sans SC', sans-serif;
}

.signature-name {
    font-size: 1.1em;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 4px;
}

.signature-date {
    font-size: 0.9em;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .article-section {
        padding: 40px 0 60px;
    }

    .article-body {
        padding: 0 15px;
    }

    .article-body p {
        font-size: 0.95em;
        line-height: 1.9;
    }

    .article-body p:first-child {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .article-body p {
        font-size: 0.9em;
        text-indent: 1.5em;
    }
}

/* ==================== */
/* ==================== */
/* Footer               */
/* ==================== */
footer {
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
    color: white;
    padding: 50px 0;
    margin-top: 0;
    position: relative;
}

.forever-kanata {
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 35px;
    font-weight: 500;
    letter-spacing: 0.15em;
    padding: 20px 0;
    position: relative;
    background: linear-gradient(90deg, var(--kanata-blue-light), var(--gold), var(--kanata-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forever-kanata::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 250%;
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.credits {
    text-align: center;
    font-size: 0.9em;
    opacity: 0.8;
}

.credits ul {
    list-style: none;
    margin-top: 10px;
}

.credits li {
    margin: 5px 0;
}

.credits a {
    color: var(--kanata-blue-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.credits a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.copyright-notice {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.disclaimer {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 15px;
    line-height: 1.7;
    font-weight: 500;
}

.copyright-text {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.non-commercial {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.55);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.site-source {
    text-align: center;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 20px;
}

.site-source a {
    color: var(--kanata-blue-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-source a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* ==================== */
/* Back to Top          */
/* ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--kanata-blue) 0%, var(--kanata-blue-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(40, 148, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(40, 148, 255, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ==================== */
/* Scroll Reveal        */
/* ==================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.revealed h2 {
    animation: fadeInUp 0.8s ease-out both;
}

.reveal-on-scroll.revealed p {
    animation: fadeInUp 0.8s ease-out 0.12s both;
}

/* ==================== */
/* Feather Effects      */
/* ==================== */
.feather-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.feather {
    position: absolute;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z'/%3E%3Cline x1='16' y1='8' x2='2' y2='22'/%3E%3Cline x1='17.5' y1='15' x2='9' y2='15'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    will-change: transform, opacity;
}

.feather.trail {
    animation: featherTrail 1.5s ease-out forwards;
}

@keyframes featherTrail {
    0% {
        opacity: 0.85;
        transform: scale(0.4) rotate(0deg);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: scale(1.2) rotate(90deg) translateY(50px);
    }
}

/* ==================== */
/* Responsive           */
/* ==================== */
@media (max-width: 768px) {
    .main-header {
        height: 60vh;
        min-height: 400px;
    }

    .header-content h1 {
        font-size: 1.8em;
        padding: 0 15px;
    }

    .counter-container {
        padding: 20px 30px;
    }

    .counter-number {
        font-size: 2.5em;
    }

    .counter-prefix {
        font-size: 0.9em;
    }

    .site-nav {
        padding: 0 12px;
        min-height: 48px;
    }

    .nav-left .nav-links {
        display: none;
    }

    .nav-home-link {
        padding: 16px 18px;
        font-size: 14px;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
        top: 48px;
    }

    .nav-spacer {
        height: 48px;
    }

    .intro-section::before {
        font-size: 100px;
        top: 20px;
    }

    .intro-section h2 {
        font-size: 1.6em;
    }

    .intro-section p {
        font-size: 1em;
        padding: 0 15px;
        line-height: 2;
    }

    .content-section {
        padding: 50px 0;
    }

    .feather {
        width: 16px;
        height: 16px;
    }

    .forever-kanata {
        font-size: 2em;
    }

    .header-bg::before {
        width: 300px;
        height: 300px;
    }

    .intro-section::after {
        font-size: 40px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 480px) {
    .main-header {
        height: 50vh;
        min-height: 350px;
    }

    .header-content h1 {
        font-size: 1.5em;
    }

    .counter-container {
        padding: 15px 25px;
    }

    .counter-number {
        font-size: 2em;
    }

    .counter-prefix {
        font-size: 0.85em;
    }

    .intro-section::before {
        font-size: 70px;
    }

    .feather {
        width: 14px;
        height: 14px;
    }

    .header-bg::before {
        width: 200px;
        height: 200px;
    }

    .intro-section::after {
        font-size: 30px;
        bottom: 15px;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }

    .feather-container {
        display: none;
    }
}
