/* ============================================
   我的个人网站 - 样式表
   支持浅色/深色主题切换
   ============================================ */

/* ---------- 主题变量 ---------- */
:root {
    /* 浅色主题（默认） */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* 深色主题 */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #312e81;
}

/* ---------- 全局样式 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* ---------- 按钮样式 ---------- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.9);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-btn,
.menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.theme-btn:hover,
.menu-btn:hover {
    background-color: var(--bg-hover);
}

.menu-btn {
    display: none;
}

/* ---------- 英雄区域 ---------- */
.hero {
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    color: white;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.avatar-emoji {
    font-size: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: var(--primary);
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 20%; left: 10%; }
.floating-icon:nth-child(2) { top: 60%; left: 15%; }
.floating-icon:nth-child(3) { top: 30%; right: 10%; }
.floating-icon:nth-child(4) { top: 70%; right: 15%; }
.floating-icon:nth-child(5) { top: 50%; left: 50%; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ---------- 页面标题 ---------- */
.page-header {
    padding: 60px 20px;
    text-align: center;
    background: var(--gradient-primary);
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ---------- 功能卡片 ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.feature-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.feature-link:hover {
    text-decoration: underline;
}

/* ---------- 文章卡片 ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.post-card,
.blog-post-card {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.post-card:hover,
.blog-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.post-link,
.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.post-link:hover,
.read-more:hover {
    text-decoration: underline;
}

.view-more {
    text-align: center;
}

/* ---------- 数据统计 ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item {
    padding: 24px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- 博客布局 ---------- */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

.blog-main {
    order: 1;
}

.blog-sidebar {
    order: 2;
}

.sidebar-widget {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.category-list,
.archive-list {
    list-style: none;
}

.category-list li,
.archive-list li {
    margin-bottom: 8px;
}

.category-list a,
.archive-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    display: block;
    transition: all 0.2s;
}

.category-list a:hover,
.category-list a.active,
.archive-list a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tag:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.post-category {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.blog-post-card {
    margin-bottom: 24px;
}

.pagination {
    text-align: center;
    margin-top: 32px;
}

.page-number {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background-color: var(--primary);
    color: white;
    font-size: 0.9rem;
}

/* ---------- 留言板 ---------- */
.comment-form {
    max-width: 600px;
    margin: 0 auto 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comments-list {
    max-width: 600px;
    margin: 0 auto;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.comment-avatar {
    font-size: 2rem;
    flex-shrink: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.comment-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ---------- 工具箱 ---------- */
.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: var(--bg-hover);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

.tool-card {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 0 auto;
}

.tool-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.tool-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 番茄钟 */
.pomodoro-timer {
    text-align: center;
    margin-bottom: 24px;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.timer-status {
    color: var(--text-secondary);
    font-size: 1rem;
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.timer-modes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mode-btn:hover {
    background-color: var(--bg-hover);
}

.mode-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.pomodoro-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pomodoro-stats .stat-item {
    text-align: center;
    padding: 0;
}

.stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 待办清单 */
.todo-input {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.todo-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.todo-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.todo-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.filter-btn.clear-btn {
    margin-left: auto;
    color: var(--danger);
}

.filter-btn.clear-btn:hover {
    background-color: #fee2e2;
}

.todo-list {
    list-style: none;
    margin-bottom: 16px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.todo-text {
    flex: 1;
    color: var(--text-primary);
}

.todo-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
}

.todo-delete:hover {
    color: var(--danger);
}

.todo-footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

/* 备忘录 */
.note-input {
    margin-bottom: 24px;
}

.note-input input,
.note-input textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 10px;
    resize: vertical;
}

.note-input input:focus,
.note-input textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.notes-list {
    display: grid;
    gap: 12px;
}

.note-item {
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    position: relative;
}

.note-item h4 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.note-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.note-item .note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.note-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.note-delete:hover {
    color: var(--danger);
}

.note-tip {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 20px;
}

/* 计算器 */
.calculator {
    max-width: 320px;
    margin: 0 auto;
}

.calc-display {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: right;
}

.calc-history {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 20px;
    margin-bottom: 4px;
}

.calc-result {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s;
}

.calc-btn:hover {
    background-color: var(--bg-hover);
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-func {
    background-color: var(--primary-light);
    color: var(--primary);
}

.calc-op {
    background-color: var(--primary);
    color: white;
}

.calc-op:hover {
    background-color: var(--primary-hover);
}

.calc-zero {
    grid-column: span 2;
}

.calc-equals {
    background: var(--gradient-primary);
    color: white;
}

/* 记账本 */
.account-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.summary-amount {
    font-size: 1.4rem;
    font-weight: 700;
}

.summary-item.income .summary-amount {
    color: var(--success);
}

.summary-item.expense .summary-amount {
    color: var(--danger);
}

.summary-item.balance .summary-amount {
    color: var(--primary);
}

.account-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.account-form select,
.account-form input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.account-form select {
    width: 80px;
}

.account-form input[type="number"] {
    width: 120px;
}

.account-form input[type="text"] {
    flex: 1;
    min-width: 120px;
}

.account-list h3 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.account-list ul {
    list-style: none;
}

.account-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.record-info {
    flex: 1;
}

.record-desc {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.record-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.record-amount {
    font-weight: 600;
    margin-right: 12px;
}

.record-amount.income {
    color: var(--success);
}

.record-amount.expense {
    color: var(--danger);
}

.record-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.record-delete:hover {
    color: var(--danger);
}

/* ---------- 关于页面 ---------- */
.about-profile {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 48px;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-big {
    font-size: 6rem;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.profile-tagline {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 14px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-text h3,
.about-skills h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.skill-item {
    margin-bottom: 16px;
}

.skill-name {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.skill-bar {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s;
}

/* 时间线 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left::before {
    right: -8px;
}

.timeline-item.right::before {
    left: -8px;
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 兴趣爱好 */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.hobby-card {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.hobby-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hobby-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.hobby-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.hobby-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 联系方式 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-card {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 网站信息 */
.site-info-card {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ---------- 页脚 ---------- */
.footer {
    background-color: var(--bg-secondary);
    padding: 48px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 968px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        order: 2;
    }
    
    .about-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-badges {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left !important;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 12px;
        right: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .account-summary {
        grid-template-columns: 1fr;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .pomodoro-stats {
        gap: 20px;
    }
    
    .calc-btn {
        padding: 12px;
        font-size: 1rem;
    }
}
