/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 启动页样式 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

.splash-content {
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 2rem;
}

.splash-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.salary-input {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 16px;
    color: #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.salary-input h3 {
    margin-bottom: 1.5rem;
    color: #2a5298;
}

.input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.start-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 主应用样式 */
.main-app {
    min-height: 100vh;
    padding: 1rem;
}

/* 隐蔽模式样式 */
.stealth-mode {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem;
    color: #333;
}

.stealth-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.stealth-header h2 {
    color: #495057;
    margin-bottom: 1rem;
}

.stealth-tabs {
    display: flex;
    gap: 2rem;
}

.stealth-tabs .tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.stealth-tabs .tab.active {
    border-bottom-color: #007bff;
    color: #007bff;
}

.stealth-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-placeholder {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metrics-grid {
    display: grid;
    gap: 1rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metric-card h4 {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #28a745;
}

/* 正常模式样式 */
.normal-mode {
    color: white;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-display {
    font-size: 1.1rem;
    font-weight: 500;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

/* 收入显示区域 */
.income-display {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.income-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.income-card h2 {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.income-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.income-amount:hover {
    transform: scale(1.05);
}

.income-rate {
    opacity: 0.8;
    font-size: 1.1rem;
}

.work-timer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.work-timer h3 {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.timer-display {
    font-size: 2rem;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.work-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #4ade80, #22c55e);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin: 0.25rem;
}

.work-btn:hover {
    transform: translateY(-2px);
}

/* 动画区域 */
.animation-area {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#moneyCanvas {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

.money-jar {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 215, 0, 0.3) 100%);
    border: 3px solid #ffd700;
    border-radius: 0 0 60px 60px;
    overflow: hidden;
}

.jar-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #ffd700, #ffed4e);
    transition: height 0.5s ease;
    height: 0%;
}

.jar-label {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    opacity: 0.8;
    white-space: nowrap;
}

/* 成就系统 */
.achievements {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.achievements h3 {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.achievement-list {
    display: grid;
    gap: 1rem;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.achievement.unlocked {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: scale(1.02);
}

.achievement.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 2rem;
    width: 3rem;
    text-align: center;
}

.achievement-info h4 {
    margin-bottom: 0.25rem;
}

.achievement-info p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 成就弹窗 */
.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

.celebration-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.achievement-details {
    margin: 2rem 0;
}

.achievement-icon-large {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.close-btn {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 999;
    color: #333;
}

.settings-panel.open {
    right: 0;
}

.settings-content h3 {
    margin-bottom: 2rem;
    color: #2a5298;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.shortcut {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

.coin-rain {
    position: fixed;
    font-size: 2rem;
    color: #ffd700;
    pointer-events: none;
    animation: coinRain 3s linear;
    z-index: 999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .income-display {
        grid-template-columns: 1fr;
    }
    
    .stealth-content {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .income-amount {
        font-size: 2rem;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    #moneyCanvas {
        height: 300px;
    }
}

/* 粒子效果样式 */
.particle {
    position: absolute;
    pointer-events: none;
    font-size: 1.5rem;
    color: #ffd700;
    animation: particleFloat 3s ease-out forwards;
}

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

/* 庆祝动画效果 */
@keyframes celebrationBounce {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) translateY(50px);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2) translateY(-20px);
    }
    40% {
        transform: translateX(-50%) scale(1) translateY(0px);
    }
    60% {
        transform: translateX(-50%) scale(1.1) translateY(-10px);
    }
    80% {
        transform: translateX(-50%) scale(1) translateY(0px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8) translateY(-30px);
    }
}

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

@keyframes coinExplosion {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(calc(var(--end-x) - 50vw), calc(var(--end-y) - 50vh)) scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--end-x) - 50vw), calc(var(--end-y) - 50vh)) scale(0.5) rotate(360deg);
    }
}

/* 庆祝文字样式 */
.celebration-text {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: celebrationBounce 3s ease-out forwards, shimmer 1s ease-in-out infinite;
}

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