/* ============================================
   玄机·AI 算命 - 完整样式表
   移动优先 PWA 设计
   ============================================ */

:root {
    /* 主色调 - 紫蓝渐变神秘系 */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary: #06b6d4;
    --secondary-light: #67e8f9;
    --accent: #f59e0b;
    --accent-light: #fbbf24;

    /* 背景色 */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1e2a4a;
    --bg-input: #1e293b;

    /* 文字色 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #fbbf24;

    /* 边框/阴影 */
    --border: #334155;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50%;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 安全区域 */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== 全局重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
    background: none;
}

a {
    color: var(--primary-light);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ===== 启动屏 ===== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
    animation: pulse-logo 2s ease-in-out infinite;
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.splash-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: var(--space-xl);
}

.splash-loader {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.loader-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ===== 主应用容器 ===== */
.main-app {
    padding-top: 60px;
    padding-bottom: 70px;
    min-height: 100vh;
    padding-top: calc(60px + var(--safe-top));
    padding-bottom: calc(70px + var(--safe-bottom));
}

/* ===== 顶部导航 ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    padding-top: var(--safe-top);
    transition: var(--transition-normal);
}

.app-header.scrolled {
    background: rgba(15, 15, 35, 0.95);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    height: 60px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-logo i {
    color: var(--primary-light);
    font-size: 1.5rem;
}

.menu-btn, .theme-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.menu-btn:active, .theme-btn:active {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== 侧边菜单 ===== */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    pointer-events: none;
}

.side-menu.open {
    pointer-events: all;
}

.menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.side-menu.open .menu-overlay {
    opacity: 1;
}

.menu-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--bg-secondary);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
}

.side-menu.open .menu-content {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--border);
    font-size: 1.3rem;
    font-weight: 700;
}

.menu-header i {
    color: var(--primary-light);
    font-size: 1.6rem;
}

.close-menu {
    margin-left: auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.menu-list {
    flex: 1;
    padding: var(--space-sm) 0;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.menu-item.active {
    color: var(--primary-light);
    background: rgba(124, 58, 237, 0.1);
    border-left-color: var(--primary);
}

.menu-item:active {
    background: var(--bg-card);
}

.menu-footer {
    padding: var(--space-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(51, 65, 85, 0.3);
    display: flex;
    justify-content: space-around;
    padding-bottom: var(--safe-bottom);
    height: calc(70px + var(--safe-bottom));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: var(--transition-fast);
    min-width: 56px;
}

.nav-item i {
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.nav-item.active {
    color: var(--primary-light);
}

.nav-item.active i {
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.nav-item:active {
    transform: scale(0.9);
}

/* ===== 页面容器 ===== */
.page-content {
    padding: var(--space-md);
    max-width: 600px;
    margin: 0 auto;
}

.page {
    display: none;
    animation: page-enter 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.page-header h2 i {
    color: var(--primary-light);
    margin-right: var(--space-sm);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 首页 Hero ===== */
.home-hero {
    position: relative;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    margin: -var(--space-md) -var(--space-md) var(--space-lg);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.15) 0%, transparent 100%);
}

.hero-bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 3.5rem;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 按钮通用 ===== */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

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

.btn-secondary:active {
    background: var(--bg-card-hover);
    transform: scale(0.97);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* ===== 首页卡片 ===== */
.home-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.card:active {
    transform: scale(0.95);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: var(--space-sm);
}

.card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== 首页玄机提示 ===== */
.home-tips {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.home-tips h3 {
    font-size: 1rem;
    color: var(--accent-light);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.home-tips p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== 表单通用 ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.form-group label i {
    margin-right: var(--space-xs);
    color: var(--primary-light);
}

.form-row {
    display: flex;
    gap: var(--space-sm);
}

.form-group.half {
    flex: 1;
}

input[type="text"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

select {
    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='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.radio-group {
    display: flex;
    gap: var(--space-md);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    position: relative;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: var(--radius-full);
}

/* ===== 结果卡片 ===== */
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
    border: 1px solid var(--border);
    animation: card-pop 0.4s ease;
}

@keyframes card-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.fortune-star {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.result-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.result-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== 运势详情 ===== */
.fortune-detail {
    margin-bottom: var(--space-lg);
}

.fortune-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    font-size: 0.9rem;
}

.fortune-item:last-child {
    border-bottom: none;
}

.fortune-item span:first-child {
    color: var(--text-secondary);
}

.fortune-item span:last-child {
    font-weight: 600;
    color: var(--primary-light);
}

.fortune-advice {
    background: rgba(124, 58, 237, 0.1);
    border-left: 3px solid var(--primary);
    padding: var(--space-md);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.fortune-lucky {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 0.85rem;
}

.fortune-lucky span {
    background: var(--bg-input);
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--text-secondary);
}

/* ===== 八字排盘 ===== */
.bazi-pan {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.bazi-cell {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    text-align: center;
}

.bazi-cell .gan {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-light);
    display: block;
}

.bazi-cell .zhi {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-light);
    display: block;
}

.bazi-cell .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: var(--space-xs);
}

.bazi-analysis {
    font-size: 0.9rem;
    line-height: 2;
    color: var(--text-secondary);
}

/* ===== 占卜 ===== */
.zhanbu-area {
    text-align: center;
}

.zhanbu-question {
    margin-bottom: var(--space-xl);
}

.zhanbu-trigger {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.zhanbu-circle {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
    position: relative;
    overflow: hidden;
}

.zhanbu-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255,255,255,0.1), transparent 30%);
    animation: rotate-glow 3s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.zhanbu-circle i {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
}

.zhanbu-circle span {
    position: relative;
    z-index: 1;
}

.zhanbu-circle:active {
    transform: scale(0.95);
}

.zhanbu-circle.shaking {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.zhanbu-gua {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.zhanbu-yao {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin-bottom: var(--space-md);
}

.yao-line {
    width: 120px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 3px;
}

.yao-line.yin {
    background: transparent;
    border-top: 6px solid var(--primary-light);
    border-bottom: 6px solid var(--primary-light);
    height: 18px;
}

.zhanbu-jie {
    font-size: 0.9rem;
    line-height: 2;
    color: var(--text-secondary);
}

/* ===== 面相上传 ===== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-bottom: var(--space-md);
}

.upload-area:active {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.upload-area span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.preview-area {
    text-align: center;
    margin-bottom: var(--space-md);
}

.preview-area img {
    max-height: 300px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    object-fit: contain;
}

.preview-area .btn-secondary {
    margin-top: var(--space-sm);
}

.mianxiang-detail {
    font-size: 0.9rem;
    line-height: 2;
    color: var(--text-secondary);
}

/* ===== 历史记录 ===== */
.history-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-btn:active {
    transform: scale(0.95);
}

.history-list {
    margin-bottom: var(--space-lg);
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.history-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border);
}

.history-item .h-type {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.history-item .h-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.history-item .h-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== 关于页面 ===== */
.about-content {
    text-align: center;
}

.about-logo {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
    animation: float 3s ease-in-out infinite;
}

.about-desc {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.about-features {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.about-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.about-feature i {
    font-size: 1.8rem;
    color: var(--primary-light);
}

.about-disclaimer {
    color: var(--accent-light);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

.about-version {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    z-index: 3000;
    opacity: 0;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: #10b981;
}

.toast.error {
    border-color: #ef4444;
}

.toast.info {
    border-color: var(--primary);
}

/* ===== 响应式 - 平板 ===== */
@media (min-width: 768px) {
    .page-content {
        padding: var(--space-lg);
        max-width: 700px;
    }

    .home-hero {
        padding: var(--space-2xl) var(--space-lg);
        border-radius: var(--radius-lg);
        margin: 0 0 var(--space-lg);
    }

    .home-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .card {
        padding: var(--space-xl) var(--space-md);
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .form-row {
        gap: var(--space-md);
    }

    .history-tabs {
        gap: var(--space-sm);
    }
}

/* ===== 响应式 - 桌面 ===== */
@media (min-width: 1024px) {
    .page-content {
        max-width: 800px;
        padding: var(--space-xl);
    }

    .home-hero {
        padding: var(--space-2xl) var(--space-xl);
    }

    .home-cards {
        gap: var(--space-lg);
    }

    .card:hover {
        transform: translateY(-4px);
        border-color: var(--primary);
        box-shadow: var(--shadow-glow);
    }

    .zhanbu-circle:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5);
    }

    .btn-primary:hover {
        box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    }

    .btn-secondary:hover {
        background: var(--bg-card-hover);
    }

    .upload-area:hover {
        border-color: var(--primary-light);
        background: rgba(124, 58, 237, 0.05);
    }

    .menu-item:hover {
        background: var(--bg-card);
        color: var(--text-primary);
    }

    .nav-item:hover {
        color: var(--text-secondary);
    }
}

/* ===== 暗色主题变体（默认即暗色，此为亮色主题备用） ===== */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.light-theme .app-header {
    background: rgba(255, 255, 255, 0.85);
}

body.light-theme .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
}

body.light-theme .home-hero {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%);
}

body.light-theme .home-tips {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.03));
}

body.light-theme .zhanbu-circle {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

body.light-theme .menu-content {
    background: var(--bg-secondary);
}

/* ===== 安全区域适配 ===== */
@supports (padding-top: env(safe-area-inset-top)) {
    .app-header {
        padding-top: env(safe-area-inset-top);
    }
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .main-app {
        padding-top: calc(60px + env(safe-area-inset-top));
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* ===== 打印样式 ===== */
@media print {
    .app-header,
    .bottom-nav,
    .side-menu,
    .toast {
        display: none !important;
    }
    .main-app {
        padding: 0 !important;
    }
    .page {
        display: block !important;
    }
}