﻿/* 主题变量定义 */
:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --container-bg: #ffffff;
    --primary-color: #20a53a;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: #178030;
    --border-color: #dee2e6;
    --font-family-mono: "SF Mono", "Roboto Mono", "Fira Code", "Consolas",
        "Menlo", monospace;
    --star-color: #ffffff;
    --star-opacity: 0.8;
    --star-blur: 1px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --container-bg: #1e1e1e;
        --primary-color: #30c04a;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --hover-color: #38d058;
        --border-color: #333;
        --star-color: #e0e0e0;
        --star-opacity: 0.9;
        --star-blur: 1.5px;
    }
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-family-mono);
    font-size: 0.95em;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at 10% 20%,
            rgba(32, 165, 58, 0.05) 0%,
            transparent 20%),
        radial-gradient(circle at 90% 80%,
            rgba(32, 165, 58, 0.05) 0%,
            transparent 20%);
    position: relative;
    overflow-x: hidden;
}

/* 星星背景容器 */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* 星星样式 */
.star {
    position: absolute;
    background: var(--star-color);
    border-radius: 50%;
    filter: blur(var(--star-blur));
    opacity: var(--star-opacity);
    animation: shootingStar linear infinite;
    will-change: transform;
    box-shadow: 0 0 5px 1px var(--star-color);
}

@keyframes shootingStar {
    from {
        transform: translateX(0) translateY(0);
        opacity: var(--star-opacity);
    }

    to {
        transform: translateX(100vw) translateY(50vh);
        opacity: 0;
    }
}

/* 主要内容容器 */
.container {
    width: 90%;
    max-width: 800px;
    margin: 5% auto;
    background-color: var(--container-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-color);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
    border: 1px solid var(--border-color);
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg,
            var(--primary-color),
            #4dabf7,
            var(--primary-color));
    background-size: 200% 100%;
    animation: gradientFlow 3s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 标题样式 */
h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    animation: underlineExpand 1.5s ease forwards;
}

@keyframes underlineExpand {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

h3 {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.9;
}

/* 列表样式 */
ul {
    padding-left: 1.5rem;
    list-style-type: none;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--hover-color);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* 时间显示样式 */
#info-time {
    display: block;
    margin-top: 2rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
}

/* 漂浮装饰元素 */
.floating-icons {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    body {
        font-size: 1em;
    }
}