/* style.css */

/* === CSS 变量配置区 === */
:root {
    --primary-color: #3498db;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --action-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-page: linear-gradient(135deg, #f6f8fd 0%, #f1f5f9 100%);
    --bg-card: #ffffff;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
    --shadow-md: 0 8px 20px rgba(37, 99, 235, 0.25);
    --border-radius-lg: 16px;
    --transition-speed: 0.25s;
}

/* === 基础样式 === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-page);
    margin: 0;
    padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 500px;
    margin-top: 4vh;
    position: relative;
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 25px;
}
.header h1 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === 视图丝滑切换动画 === */
.view-step { display: none; width: 100%; }
.view-step.active {
    display: block;
    animation: slideInRight 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
.view-step.slide-back {
    display: block;
    animation: slideInLeft 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-text { animation: textFadeIn 0.3s ease forwards; }
@keyframes textFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* === 选项卡片样式 === */
.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    width: 100%;
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 15px;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    font-size: 17px;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.category-btn:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.category-btn:active {
    transform: scale(0.97);
    border-color: var(--primary-color);
    background: #f8fafc;
}
.icon { font-size: 24px; margin-right: 12px; vertical-align: middle; }
.arrow { color: #cbd5e1; font-size: 18px; transition: transform 0.2s; }
.category-btn:active .arrow { transform: translateX(4px); }

.sub-btn {
    padding: 16px 20px;
    font-size: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
}
.sub-btn .icon { font-size: 20px; margin-right: 10px; }

/* === 评论卡片样式 === */
.review-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    text-align: center;
    border: 1px solid #f1f5f9;
}
.review-text {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 20px;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
    min-height: 90px;
    display: flex;
    align-items: center;
}
.action-row { display: flex; justify-content: space-between; margin-bottom: 25px; }

.change-btn, .back-btn { 
    background: none; border: none; font-size: 14px; 
    cursor: pointer; padding: 8px 5px; transition: opacity 0.2s; 
    -webkit-tap-highlight-color: transparent;
}
.change-btn:active, .back-btn:active { opacity: 0.6; }
.back-btn { color: #94a3b8; }
.change-btn { color: var(--primary-color); font-weight: bold; }

.primary-action-btn {
    display: block; width: 100%; color: white; text-align: center;
    border: none; padding: 16px; border-radius: 12px; font-size: 16px;
    font-weight: bold; cursor: pointer; text-decoration: none;
    box-sizing: border-box; transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}
.primary-action-btn:active { transform: translateY(2px); }

.copy-btn { background: var(--primary-gradient); box-shadow: var(--shadow-md); }
.copy-btn:active { box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }
.copy-btn.success { background: var(--success-gradient); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25); }
.goto-btn { background: var(--action-gradient); margin-top: 25px; box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25); }

.top-back-btn {
    display: inline-block; background: #e2e8f0; color: #475569; border: none;
    padding: 8px 18px; border-radius: 20px; font-size: 14px; font-weight: bold;
    cursor: pointer; margin-bottom: 20px; transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.top-back-btn:active { background: #cbd5e1; }

/* === 首页专属底部 === */
.home-footer {
    margin-top: 40px; padding-top: 25px; border-top: 1px dashed #cbd5e1;
    text-align: center; width: 100%;
}
.qr-box img {
    width: 120px; height: 120px; border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08); margin-bottom: 10px;
    background: #fff; padding: 6px; box-sizing: border-box;
}
.qr-box p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* === 提示框 Toast === */
#toast {
    visibility: hidden; min-width: 140px; background-color: rgba(15, 23, 42, 0.85);
    color: #fff; text-align: center; border-radius: 30px; padding: 12px 24px;
    position: fixed; z-index: 999; left: 50%; bottom: 60px;
    transform: translateX(-50%); font-size: 14px; font-weight: 500;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#toast.show { visibility: visible; animation: toastFadeIn 0.3s, toastFadeOut 0.3s 2.5s; }
@keyframes toastFadeIn { from {bottom: 20px; opacity: 0; transform: translateX(-50%) scale(0.9);} to {bottom: 60px; opacity: 1; transform: translateX(-50%) scale(1);} }
@keyframes toastFadeOut { from {bottom: 60px; opacity: 1; transform: translateX(-50%) scale(1);} to {bottom: 20px; opacity: 0; transform: translateX(-50%) scale(0.9);} }

/* === 备案信息 === */
.beian-info {
    width: 100%; margin-top: auto; padding: 30px 0 10px; font-size: 12px;
    color: #94a3b8; text-align: center; line-height: 1.8;
}
.beian-link { color: inherit; text-decoration: none; display: inline-block; margin: 0 5px; transition: color 0.2s; }
.beian-link:hover { color: var(--primary-color); }
.beian-icon { height: 16px; width: auto; vertical-align: text-bottom; margin-right: 4px; }