* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: #ffd700;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景星空效果 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stars, .twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.stars {
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="0.5" fill="%23ffd700"/><circle cx="80" cy="40" r="0.3" fill="%23fff"/><circle cx="40" cy="60" r="0.4" fill="%23ffd700"/><circle cx="90" cy="80" r="0.2" fill="%23fff"/><circle cx="10" cy="90" r="0.3" fill="%23ffd700"/></svg>') repeat;
    background-size: 200px 200px;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="0.2" fill="%23ffd700" opacity="0.8"/><circle cx="75" cy="75" r="0.3" fill="%23fff" opacity="0.6"/></svg>') repeat;
    background-size: 300px 300px;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 标题样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffed4e;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes goldShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 输入区域样式 */
.input-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.input-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.1);
    max-width: 500px;
    width: 100%;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.input-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #ffd700;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #ffed4e;
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffd700;
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transform: scale(1.02);
}

.start-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 15px;
    color: #000;
    font-size: 1.3rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0%, 100% { transform: translateY(-3px) scale(1.05); }
    50% { transform: translateY(-3px) scale(1.08); }
}

/* 计算器区域样式 */
.calculator-section {
    animation: slideInUp 0.8s ease-out;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: cardGlow 4s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 5px 15px rgba(255, 215, 0, 0.1); }
    50% { box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2); }
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stat-label {
    font-size: 0.9rem;
    color: #ffed4e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffd700;
}

/* 主显示区域 */
.main-display {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.main-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.earnings-label {
    font-size: 1.5rem;
    color: #ffed4e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.earnings-amount {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 2s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.earnings-animation {
    position: relative;
    z-index: 1;
    height: 30px;
}

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

.progress-label {
    text-align: center;
    font-size: 1.2rem;
    color: #ffed4e;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    transition: width 0.5s ease;
    border-radius: 8px;
}

@keyframes progressShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 15px 30px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.pause-btn:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, rgba(255, 165, 0, 0.1) 100%);
}

.reset-btn:hover {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.2) 0%, rgba(255, 69, 0, 0.1) 100%);
}

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

.coin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 50%;
    border: 3px solid #ffed4e;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: coinFall 3s ease-in forwards;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin::before {
    content: '💰';
    font-size: 24px;
    animation: coinSpin 1s linear infinite;
}

@keyframes coinFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* 粒子效果 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: particleFloat 4s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) scale(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .earnings-amount {
        font-size: 2.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
}

/* 特殊效果类 */
.money-burst {
    animation: moneyBurst 0.6s ease-out;
}

@keyframes moneyBurst {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.earnings-glow {
    animation: earningsGlow 1s ease-in-out;
}

@keyframes earningsGlow {
    0%, 100% { text-shadow: 0 0 50px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 80px rgba(255, 215, 0, 0.8); }
}