/* ========================================
   永恒欲望 · Eternal Desire
   赛博指挥中心 - 核心样式
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    /* 主色 */
    --peach: #ffb6c1;
    --peach-deep: #ff8fa3;
    --peach-soft: #e8c4c4;
    --peach-dim: rgba(255, 182, 193, 0.15);
    --peach-border: rgba(255, 182, 193, 0.25);
    
    /* 背景 */
    --bg-deep: #140e11;
    --bg-main: #1f1519;
    --bg-card: rgba(255, 182, 193, 0.06);
    --bg-glass: rgba(255, 182, 193, 0.08);
    
    /* 文字 */
    --text-primary: #f5e6e0;
    --text-secondary: #e8c4c4;
    --text-muted: #a88a8a;
    
    /* 功能色 */
    --success: #a8e6cf;
    --warning: #ffd3b6;
    --danger: #ff6b8a;
    
    /* 尺寸 */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --header-height: 70px;
    
    /* 动画 */
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition: 0.3s var(--ease);
}

/* 重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 143, 163, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 182, 193, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #140e11 0%, #1f1519 50%, #140e11 100%);
    background-attachment: fixed;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 182, 193, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 182, 193, 0.4);
}

/* ==================== 布局容器 ==================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    margin-bottom: 64px;
    animation: fadeUp 0.7s var(--ease) both;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

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

/* ==================== 顶部导航 ==================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(20, 14, 17, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--peach-border);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--peach);
    letter-spacing: 3px;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--peach-deep);
    text-shadow: 0 0 20px rgba(255, 143, 163, 0.4);
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--peach);
    background: var(--peach-dim);
}

.nav-link.private {
    color: var(--peach-deep);
    border: 1px solid rgba(255, 143, 163, 0.3);
}

.nav-link.private:hover {
    background: rgba(255, 143, 163, 0.15);
    border-color: var(--peach-deep);
}

/* ==================== 英雄区 ==================== */
.hero {
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 143, 163, 0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.greeting {
    font-size: 0.95rem;
    color: var(--peach-soft);
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.4rem;
    font-weight: 400;
    color: var(--peach);
    letter-spacing: 6px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 300;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

/* ==================== 区块标题 ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--peach);
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== 卡片通用 ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.card:hover {
    border-color: rgba(255, 182, 193, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.card-title {
    font-size: 1.1rem;
    color: var(--peach);
    margin-bottom: 12px;
    font-weight: 500;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== 状态仪表盘 ==================== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(255, 182, 193, 0.45);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    color: var(--peach);
    font-weight: 300;
    margin-bottom: 12px;
}

.stat-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stat-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--peach-border);
    background: transparent;
    color: var(--peach);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-btn:hover {
    background: var(--peach-dim);
    border-color: var(--peach);
}

/* 状态输入区 */
.status-panel {
    background: var(--bg-glass);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius);
    padding: 28px;
}

.status-panel textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.7;
}

.status-panel textarea:focus {
    outline: none;
    border-color: var(--peach);
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.12);
}

.status-panel textarea::placeholder {
    color: var(--text-muted);
}

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--peach-deep), var(--peach));
    color: #1a1215;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 143, 163, 0.35);
}

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

.btn-ghost:hover {
    background: var(--peach-dim);
    border-color: var(--peach);
}

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

.btn-danger:hover {
    background: rgba(255, 107, 138, 0.1);
}

/* ==================== 内容网格 ==================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ==================== 快速入口 ==================== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.quick-item {
    background: var(--bg-glass);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quick-item:hover {
    border-color: var(--peach);
    color: var(--peach);
    transform: translateY(-3px);
    background: rgba(255, 182, 193, 0.1);
}

.quick-icon {
    font-size: 1.6rem;
    opacity: 0.9;
}

.quick-label {
    font-size: 0.9rem;
}

/* ==================== 模式切换 ==================== */
.mode-switcher {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px;
    border-radius: 30px;
    border: 1px solid var(--peach-border);
}

.mode-btn {
    padding: 8px 18px;
    border-radius: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.mode-btn.active {
    background: var(--peach-dim);
    color: var(--peach);
}

.mode-btn:hover:not(.active) {
    color: var(--text-secondary);
}

/* ==================== 已保存状态展示 ==================== */
.saved-box {
    margin-top: 20px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--peach);
    color: var(--text-secondary);
    white-space: pre-wrap;
    display: none;
    line-height: 1.7;
}

.saved-box.show {
    display: block;
    animation: fadeUp 0.4s var(--ease);
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 48px 0 32px;
    border-top: 1px solid var(--peach-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    color: var(--peach);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* ==================== 私密区专用 ==================== */
.private-wrapper {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.password-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-glass);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    text-align: center;
    backdrop-filter: blur(12px);
}

.password-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--peach);
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 400;
}

.password-card p {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.password-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
    transition: var(--transition);
    font-family: inherit;
}

.password-input:focus {
    outline: none;
    border-color: var(--peach);
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.15);
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 12px;
    display: none;
}

.private-content {
    display: none;
    width: 100%;
    max-width: 800px;
    animation: fadeUp 0.6s var(--ease);
}

.private-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

/* ==================== 日记页专用 ==================== */
.journal-form {
    margin-bottom: 40px;
}

.journal-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.journal-item {
    background: var(--bg-glass);
    border: 1px solid var(--peach-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}

.journal-item:hover {
    border-color: rgba(255, 182, 193, 0.4);
}

.journal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.journal-text {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.journal-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-top: 12px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .nav {
        gap: 4px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 70px 16px 50px;
    }
    
    .hero-title {
        font-size: 2.3rem;
        letter-spacing: 3px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.9rem;
    }
    
    .nav-link span {
        display: none;
    }
}

/* ==================== 工具类 ==================== */
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }