/* 
 * 游戏助手 - 全局美化样式
 * 暗夜绿主题 - 现代卡片设计
 */

/* ===== 基础样式 ===== */
:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --primary-subtle: #ecfdf5;
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

body {
    background: var(--bg-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d0d9e6;
}

/* ===== 按钮 ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.25s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* ===== 输入框 ===== */
.input-field {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.25s ease;
    outline: none;
}
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
    background: white;
}
.input-field::placeholder {
    color: #94a3b8;
}

/* ===== 标签徽章 ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.badge-green {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.badge-red {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.badge-blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.badge-purple {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}
.badge-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}
.badge-hot {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    border: none;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== 顶部栏 ===== */
.topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

/* ===== 分段标题 ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px;
}

/* ===== 主页头部用户头像 ===== */
.avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

/* ===== 登录页 ===== */
.login-page {
    background: linear-gradient(160deg, #ecfdf5 0%, #f0f9ff 50%, #faf5ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 32px 28px;
    width: 100%;
    max-width: 380px;
}

/* ===== 功能网格 ===== */
.func-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.func-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.func-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}
.func-item:active {
    transform: scale(0.97);
}

/* ===== 加载动画 ===== */
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

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

/* ===== 页面过渡 ===== */
.page-enter {
    animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Toast & Alert ===== */
.toast-success {
    background: var(--primary) !important;
    color: white !important;
    border-radius: 12px !important;
}
.toast-error {
    background: #ef4444 !important;
    color: white !important;
    border-radius: 12px !important;
}

/* ===== 员工卡片网格 ===== */
.emp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.emp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.emp-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
}
.emp-card:active {
    transform: scale(0.95);
}

.emp-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ===== 分割线 ===== */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 16px 0;
}
