/* asset/css/style.css */
:root {
    /* 白天模式默认颜色 */
    --bg-color: #fff;
    --text-color: #1f2328;
    --card-bg: #f6f8fa;
    --border-color: #d0d7de;
    --accent-color: #0969da;
    --secondary-color: #59636e;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --progress-bg: #e9ecef;
    --success-color: #1f883d;
    --warning-color: #d4a72c;
    --menu-bg: rgba(255, 255, 255, 0.98);
    --copyright-collor: #59636e;
}

[data-theme="dark"] {
    --bg-color: #010409;
    --text-color: #f0f6fc;
    --card-bg: #0d1117;
    --border-color: #30363d;
    --accent-color: #4493f8;
    --secondary-color: #9198a1;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.33);
    --progress-bg: #21262d;
    --success-color: #238636;
    --warning-color: #d29922;
    --menu-bg: rgba(1, 4, 9, 0.98);
    --copyright-color: #9198a1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    transition: transform 0.4s ease;
}

/* 移动端菜单 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1001;
    position: fixed;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: center;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--menu-bg);
    backdrop-filter: blur(10px);
    z-index: 1001;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    margin-top: 30px;
}

.mobile-nav li {
    margin-bottom: 25px;
}

.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.3rem;
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent-color);
}

.mobile-nav i {
    width: 30px;
    margin-right: 15px;
}

.close-menu {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    padding: 0;
    margin: 0;
}

.close-menu i {
    margin: 0;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    background: var(--accent-color);
    color: white;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--accent-color);
    z-index: 2;
}

.logo-icon {
    width: 49px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.theme-control {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

/* 太阳月亮切换按钮 */
.theme-icon-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-icon-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.theme-icon-toggle i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
}

.fa-sun {
    color: #ffc107;
}

.fa-moon {
    color: #6c757d;
    transform: translateY(50px);
}

[data-theme="dark"] .fa-sun {
    transform: translateY(-50px);
}

[data-theme="dark"] .fa-moon {
    transform: translateY(0);
}

.hero {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 0;
    animation: fadeIn 1s ease;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 0 auto;
}

.status-container {
    margin-bottom: 40px;
    animation: slideUp 0.8s ease;
}

.status-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.status-badge {
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-container {
    background: var(--progress-bg);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    border-radius: 5px;
    width: 74%;
    animation: progressAnimation 2s ease-in-out;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.card h3 {
    margin: 0;
    color: var(--text-color);
}

.card p {
    color: var(--secondary-color);
    margin: 0;
}

.countdown {
    text-align: center;
    margin: 40px 0;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.8s ease;
}

.countdown h2 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.time-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.time-unit.animated .time-value {
    animation: flip 0.5s ease;
}

.time-label {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.contact {
    text-align: center;
    margin: 40px 0;
    animation: fadeIn 1s ease;
}

.contact a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: var(--copyright-collor);
    width: 100%;
    animation: fadeIn 1s ease;
}

footer a {
    color: var(--copyright-collor);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.3s ease, background 0.3s ease;
    animation: bounce 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
}

/* 添加滚动动画样式 */
.card,
.status-container,
.countdown,
.contact {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.animate-in,
.status-container.animate-in,
.countdown.animate-in,
.contact.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 确保原有动画不受影响 */
.card {
    animation: fadeIn 1s ease;
}

.status-container {
    animation: slideUp 0.8s ease;
}

.countdown {
    animation: slideUp 0.8s ease;
}

.contact {
    animation: fadeIn 1s ease;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressAnimation {
    0% {
        width: 0%;
    }

    100% {
        width: 74%;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes flip {
    0% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        text-align: center;
        padding-top: 70px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .countdown-timer {
        flex-wrap: wrap;
    }

    .time-unit {
        min-width: 60px;
    }

    .time-value {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .theme-control {
        margin-top: 10px;
    }

    .logo {
        margin: 0 auto;
    }

    /* 修复移动端菜单打开时的问题 */
    body.menu-open {
        overflow: hidden;
    }

    .mobile-nav.active~.container {
        transform: translateX(-20%);
        transition: transform 0.4s ease;
    }

    .container.menu-open {
        transform: translateX(-20%);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .countdown-timer {
        gap: 8px;
    }

    .time-unit {
        min-width: 50px;
    }

    .time-value {
        font-size: 1.2rem;
        padding: 8px;
    }

    .card {
        padding: 20px;
    }

    .theme-icon-toggle {
        width: 45px;
        height: 45px;
    }

    .mobile-nav {
        width: 100%;
        padding: 90px 20px 30px;
    }

    .mobile-menu-btn,
    .close-menu {
        top: 20px;
        right: 20px;
    }
}

/* 菜单遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}