/* style.css */

/* =========================================
   1. 全局变量 (统一使用橙色主题)
   ========================================= */
:root {
    /* 核心品牌色 - 橙色 */
    --primary: #f97316;
    --primary-hover: #ea580c;

    /* 中性色 */
    --dark: #0f172a;
    --slate: #64748b;
    --light: #f8fafc;
    --white: #ffffff;

    /* 状态色 */
    --danger: #ef4444;
    --success: #10b981;
    --warn: #f59e0b;

    /* 字体 */
    --font-main: 'Inter', sans-serif;
}

/* =========================================
   2. 基础重置 (Reset & Base)
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 链接基础样式 */
a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* =========================================
   3. 通用组件 (UI Components)
   ========================================= */

/* 按钮 */
.btn, .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px; /* 圆角风格 */
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3); /* 橙色阴影 */
    font-size: 1rem;
}

.btn:hover, .submit-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.4);
}

.btn:disabled, .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 输入框 */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    /* 橙色聚焦光环 */
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* 加载动画 (Spinner) */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   4. 页面特定样式 (Page Specifics)
   ========================================= */

/* Login & Reset Password 容器 */
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin: auto; /* 居中 */
}

/* Success & Cancel 页面容器 */
.status-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(circle at center, #fff7ed, #ffffff); /* 橙色系淡渐变 */
}

.icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.icon-box.success { background: #dcfce7; color: var(--success); }
.icon-box.warn { background: #fef3c7; color: var(--warn); }

/* Account 页面导航 */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Account 页面卡片 */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 2rem auto;
    width: 90%;
}

/* 消息提示框 */
.msg {
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none; /* 默认隐藏 */
}
.msg.error { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; display: block; }
.msg.success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; display: block; }