/* 与主页统一的深色主题变量 */
:root {
    --bg-dark: #0A0A0C;
    --card-bg: rgba(22, 22, 26, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --accent-color: #00F2FE;
    --accent-gradient: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
    --danger: #FF6B6B;
    --success: #00FF66;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

a { color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4%;
}

/* Header — 与主页统一 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 10, 12, 0.4);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 35px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.ai-status {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.ai-status span {
    width: 6px;
    height: 6px;
    background-color: #00FF66;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #00FF66;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.btn {
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,255,255,0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-ghost:hover {
    border-color: rgba(0, 242, 254, 0.3);
    color: var(--accent-color);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    color-scheme: dark;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-color: rgba(255,255,255,0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select option,
.form-select optgroup {
    background-color: #16161a;
    color: #ffffff;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: rgba(0, 242, 254, 0.4);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group { margin-bottom: 16px; }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error { border-color: rgba(255,107,107,0.4); color: var(--danger); }
.toast.success { border-color: rgba(0,255,102,0.3); color: var(--success); }

/* 页脚备案 */
.site-footer {
    border-top: 1px solid var(--card-border);
    padding: 32px 4% 40px;
    text-align: center;
    margin-top: 20px;
}

.site-footer p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--accent-color);
}

.site-footer .divider {
    margin: 0 8px;
    opacity: 0.4;
}

@media (max-width: 900px) {
    .site-header { padding: 16px 5%; flex-wrap: wrap; gap: 10px; }
    .site-header nav { display: none; }
}

/* --- 环境背景：呼吸光晕 + 星光 --- */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform, opacity;
}

.ambient-glow--top {
    width: 55vw;
    height: 55vw;
    max-width: 720px;
    max-height: 720px;
    top: -18%;
    right: -12%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.09) 0%, rgba(0, 242, 254, 0.02) 45%, transparent 70%);
    animation: glow-breathe 9s ease-in-out infinite;
}

.ambient-glow--bottom {
    width: 45vw;
    height: 45vw;
    max-width: 560px;
    max-height: 560px;
    bottom: -10%;
    left: -8%;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.07) 0%, rgba(79, 172, 254, 0.02) 50%, transparent 72%);
    animation: glow-breathe 12s ease-in-out infinite reverse;
    animation-delay: -4s;
}

.ambient-glow--center {
    width: 38vw;
    height: 38vw;
    max-width: 480px;
    max-height: 480px;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 242, 254, 0.04) 0%, transparent 65%);
    animation: glow-breathe-center 14s ease-in-out infinite;
    animation-delay: -2s;
}

@keyframes glow-breathe {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.06); }
}

@keyframes glow-breathe-center {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.1); }
}

.starfield {
    position: absolute;
    inset: 0;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.35);
    opacity: 0;
    animation: star-twinkle ease-in-out infinite;
    will-change: opacity, transform;
}

.star--xs { width: 1px; height: 1px; }
.star--sm { width: 1.5px; height: 1.5px; }
.star--md { width: 2px; height: 2px; box-shadow: 0 0 8px rgba(0, 242, 254, 0.45); }
.star--lg {
    width: 2.5px;
    height: 2.5px;
    background: rgba(0, 242, 254, 0.9);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.55), 0 0 20px rgba(0, 242, 254, 0.15);
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.08; transform: scale(0.85); }
    35% { opacity: 0.35; transform: scale(1); }
    65% { opacity: 0.55; transform: scale(1.15); }
}

body > .main-content,
body > .site-footer {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .ambient-glow,
    .star {
        animation: none !important;
        opacity: 0.25;
    }
}
