/* style.css (全新版本) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --text-color-primary: #f5f5f7;
    --text-color-secondary: #a1a1a6;
    --accent-color: #007aff;
    --accent-color-green: #30d158;
    --accent-color-red: #ff453a;
    --border-radius-large: 24px;
    --border-radius-medium: 16px;
    --border-radius-small: 12px;
}

body {
    font-family: var(--font-family);
    /* 使用一张有质感的背景图来增强玻璃效果 */
    background: #1c1c1e url('https://images.unsplash.com/photo-1554147090-e1221a04a025?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed; /* 固定背景，滚动时不移动 */
    color: var(--text-color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
}

/* --- 主要的玻璃质感容器 --- */
.glass-container {
    width: 100%;
    max-width: 900px;
    /* 玻璃质感关键代码 */
    background: rgba(28, 28, 30, 0.65);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.125);
    padding: 2.5rem 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- 头部区域 --- */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    letter-spacing: -1px;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-color-secondary);
}

.dashboard-link, #currencySelector {
    background: rgba(44, 44, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.dashboard-link:hover, #currencySelector:hover {
    background: rgba(58, 58, 60, 0.9);
}

/* --- 数据统计卡片 --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(44, 44, 46, 0.5);
    padding: 1.5rem;
    border-radius: var(--border-radius-medium);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card .icon { font-size: 2rem; margin-bottom: 0.75rem; }
.stat-card .value { font-size: 2.5rem; font-weight: 700; display: block; letter-spacing: -1px; }
.stat-card .label { font-size: 0.9rem; color: var(--text-color-secondary); }

/* --- 主控制按钮 --- */
.main-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.main-controls button {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}
.btn-start { background-color: var(--accent-color); }
.btn-start:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 122, 255, 0.5); }
.btn-stop { background-color: var(--accent-color-red); }
.btn-stop:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 69, 58, 0.5); }
.btn-secondary { background-color: #58585c; }
.btn-secondary:hover { background-color: #6a6a6e; }
.main-controls button:disabled { background-color: #3a3a3c; color: #888; cursor: not-allowed; transform: none; box-shadow: none;}

/* --- 参与者部分 --- */
.section-header {
    margin: 2.5rem 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.template-list, .participant-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-list li, .participant-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(44, 44, 46, 0.5);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-medium);
    margin-bottom: 0.75rem;
    transition: background 0.3s;
}
.template-list li:hover { background: rgba(58, 58, 60, 0.8); }

.template-list li span, .participant-list .role {
    font-weight: 500;
    width: 120px;
    flex-shrink: 0;
}
.salary-input {
    flex-grow: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-color-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-small);
}

.participant-list .details { flex-grow: 1; }
.participant-list .salary { font-size: 0.9rem; color: var(--text-color-secondary); }
.participant-list .actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color-secondary);
    transition: color 0.3s;
}
.participant-list .actions button:hover { color: var(--accent-color-red); }

/* --- 仪表盘表格样式 --- */
#historyTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
    margin-top: 1rem;
}
#historyTable th, #historyTable td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    vertical-align: middle;
}
#historyTable th {
    font-weight: 600;
    color: var(--text-color-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
#historyTable tbody tr {
    background: rgba(44, 44, 46, 0.5);
    transition: background 0.3s;
}
#historyTable tbody tr:hover {
    background: rgba(58, 58, 60, 0.8);
}
#historyTable td:first-child { border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium); }
#historyTable td:last-child { border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0; }
