/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f0f23 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-decoration::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 165, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 140, 0, 0.05) 0%, transparent 70%);
    animation: bgRotate 30s linear infinite;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 容器 ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== 设置面板 ===== */
.settings-panel {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.95));
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: slideIn 0.6s ease-out;
}

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

.title {
    font-size: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

.subtitle {
    text-align: center;
    color: rgba(255, 215, 0, 0.7);
    font-size: 1rem;
    margin-bottom: 30px;
    letter-spacing: 4px;
}

/* ===== 输入组 ===== */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    color: rgba(255, 215, 0, 0.9);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #ffd700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.input-group input::placeholder {
    color: rgba(255, 215, 0, 0.4);
}

/* ===== 开始按钮 ===== */
.start-btn {
    width: 100%;
    padding: 18px;
    margin-top: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.start-btn:hover::before {
    left: 100%;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.3);
}

.start-btn:active {
    transform: translateY(0);
}

.start-btn span {
    position: relative;
    z-index: 1;
}

/* ===== 展示面板 ===== */
.display-panel {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.95));
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.back-btn {
    display: inline-block;
    color: rgba(255, 215, 0, 0.7);
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.back-btn:hover {
    color: #ffd700;
    transform: translateX(-5px);
}

/* ===== 状态栏 ===== */
.status-bar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.status-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.status-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
}

.status-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 1rem;
}

/* ===== 主显示区 ===== */
.main-display {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.05));
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.main-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.main-display .label {
    color: rgba(255, 215, 0, 0.8);
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.main-display .amount {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ffd700 0%, #ffec8b 30%, #ffd700 50%, #ffaa00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 1;
    letter-spacing: -2px;
    animation: numberGlow 2s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.per-second {
    color: rgba(255, 215, 0, 0.7);
    font-size: 1rem;
    margin-top: 15px;
    position: relative;
    z-index: 1;
}

/* ===== 进度条 ===== */
.progress-section {
    margin-bottom: 30px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffaa00, #ff8c00);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.today-total {
    text-align: center;
    color: rgba(255, 215, 0, 0.6);
    font-size: 0.85rem;
    margin-top: 10px;
}

.today-total span {
    color: #ffd700;
    font-weight: bold;
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.stat-value {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* ===== 金币容器 ===== */
.coin-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.coin {
    position: absolute;
    width: 40px;
    height: 40px;
    font-size: 40px;
    animation: coinFall linear forwards;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes coinFall {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(0) rotate(180deg) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.8);
        opacity: 0;
    }
}

/* ===== 里程碑提示 ===== */
.milestone-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.5);
}

.milestone-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    animation: milestoneBounce 0.5s ease;
}

@keyframes milestoneBounce {
    0% { transform: translate(-50%, -50%) scale(0.5); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== 语言选择器 ===== */
.language-selector {
    text-align: right;
    margin-bottom: 20px;
}

.language-selector select {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    color: #ffd700;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.language-selector select:hover {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.language-selector select option {
    background: #1a1a2e;
    color: #ffd700;
}

/* ===== 响应式设计 ===== */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .settings-panel,
    .display-panel {
        padding: 25px 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .main-display .amount {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-bar {
        flex-direction: column;
    }
}
