/* qqbot/app.css - 多主题支持 */
:root {
    --wc-radius-sm: 10px;
    --wc-radius-md: 16px;
    --wc-radius-lg: 20px;
    --wc-radius-xl: 28px;
    --wc-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
    --wc-shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
    --wc-rotate: 0.4deg;
    --wc-ease: cubic-bezier(0.25, 0.8, 0.25, 1.2);
    --wc-duration: 0.3s;
}

/* 主题 1：暖陶（默认） */
body[data-theme="default"] {
    --wc-bg: #f5f0eb;
    --wc-surface: #ffffff;
    --wc-accent: #c84628;
    --wc-accent-hover: #a33820;
    --wc-text: #1a1a1a;
    --wc-text-sub: #8b7355;
    --wc-input-bg: #faf7f2;
    --wc-border: #e0d5c1;
    --wc-shadow-lg: 0 8px 40px rgba(60, 40, 20, 0.12);
}

/* 主题 2：蓝白（极简） */
body[data-theme="blue"] {
    --wc-bg: #f3f7fa;
    --wc-surface: #ffffff;
    --wc-accent: #2563eb;
    --wc-accent-hover: #1d4ed8;
    --wc-text: #0f172a;
    --wc-text-sub: #64748b;
    --wc-input-bg: #f8fafc;
    --wc-border: #e2e8f0;
    --wc-shadow-lg: 0 8px 40px rgba(15, 23, 42, 0.1);
}

/* 主题 3：极简绿（清新） */
body[data-theme="green"] {
    --wc-bg: #f2fcf5;
    --wc-surface: #ffffff;
    --wc-accent: #16a34a;
    --wc-accent-hover: #15803d;
    --wc-text: #064e3b;
    --wc-text-sub: #64748b;
    --wc-input-bg: #f0fdf4;
    --wc-border: #dcfce7;
    --wc-shadow-lg: 0 8px 40px rgba(6, 78, 59, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* 全局背景和文字加过渡动画 */
html, body {
    height: 100%; overflow: hidden;
    background-color: var(--wc-bg); color: var(--wc-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container { display: flex; width: 400vw; height: 100vh; transition: transform var(--wc-duration) var(--wc-ease); }
.page { width: 100vw; height: 100%; overflow-y: auto; padding-bottom: 90px; -webkit-overflow-scrolling: touch; }
.header { padding: 30px 20px 16px; text-align: center; }
.header h1 { font-size: 22px; font-weight: 600; color: var(--wc-accent); letter-spacing: 1px; transition: color 0.3s; }
.header p { font-size: 13px; color: var(--wc-text-sub); margin-top: 4px; }

.card {
    background: var(--wc-surface); border-radius: var(--wc-radius-lg); box-shadow: var(--wc-shadow-sm);
    padding: 20px; margin: 16px; border: 1px solid var(--wc-border);
    transform: rotate(var(--wc-rotate)); transition: all var(--wc-duration) var(--wc-ease);
}
.card:hover { transform: rotate(0deg) translateY(-2px); box-shadow: var(--wc-shadow-md); }
.card-title { font-size: 14px; font-weight: 600; color: var(--wc-text-sub); margin-bottom: 16px; display: flex; align-items: center; }
.card-title::before { content: ""; display: inline-block; width: 4px; height: 14px; background: var(--wc-accent); border-radius: 2px; margin-right: 8px; transition: background 0.3s; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.stat-box { background: var(--wc-input-bg); border-radius: var(--wc-radius-md); padding: 14px 12px; text-align: center; transition: background 0.3s; }
.stat-val { font-size: 22px; font-weight: 700; color: var(--wc-accent); margin-bottom: 4px; transition: color 0.3s; }
.stat-label { font-size: 12px; color: var(--wc-text-sub); }

.btn { display: block; width: 100%; padding: 14px; border-radius: var(--wc-radius-md); font-size: 15px; font-weight: 500; text-align: center; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--wc-accent); color: #fff; }
.btn-primary:hover { background: var(--wc-accent-hover); }
.btn-outline { background: transparent; color: var(--wc-text); border: 1px solid var(--wc-border); }
.btn-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #f87171; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--wc-text-sub); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px; background: var(--wc-input-bg); border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-md); font-size: 15px; outline: none; color: var(--wc-text); transition: 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--wc-accent); box-shadow: 0 0 0 3px var(--wc-border); }
.form-group textarea { resize: vertical; min-height: 100px; }

.bottom-nav {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 40px); max-width: 400px; background: var(--wc-surface);
    opacity: 0.95; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; justify-content: space-around; padding: 12px 0;
    border-radius: 40px; box-shadow: var(--wc-shadow-lg); border: 1px solid var(--wc-border);
    z-index: 100; padding-bottom: max(12px, env(safe-area-inset-bottom));
    transition: background 0.3s, border-color 0.3s;
}
.nav-item { text-decoration: none; color: var(--wc-text-sub); font-size: 13px; font-weight: 500; display: flex; flex-direction: column; align-items: center; transition: color 0.2s; cursor: pointer; }
.nav-item.active { color: var(--wc-accent); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); z-index: 999; display: none; align-items: flex-end; }
.modal-overlay.show { display: flex; animation: fadeIn 0.3s; }
.modal-content { background: var(--wc-surface); width: 100%; border-radius: var(--wc-radius-xl) var(--wc-radius-xl) 0 0; padding: 24px; transform: translateY(100%); animation: slideUp 0.4s var(--wc-ease) forwards; padding-bottom: max(24px, env(safe-area-inset-bottom)); transition: background 0.3s; }
.modal-title { font-size: 16px; font-weight: 600; color: var(--wc-accent); margin-bottom: 12px; text-align: center; }
.modal-body { font-size: 14px; color: var(--wc-text); line-height: 1.6; margin-bottom: 24px; max-height: 40vh; overflow-y: auto; }
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(26, 26, 26, 0.85); color: #fff; padding: 12px 24px; border-radius: var(--wc-radius-md); font-size: 14px; z-index: 1000; opacity: 0; transition: opacity 0.3s; pointer-events: none; text-align: center; max-width: 80%; }
.toast.show { opacity: 1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { to { transform: translateY(0); } }
.hidden { display: none !important; }
