/* 摸鱼大作战 - 样式表 */

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

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

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 屏幕切换 */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* 开始界面 */
#start-screen {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

#start-screen h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.5em;
    opacity: 0.9;
    margin-bottom: 40px;
}

.intro {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.intro p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

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

/* 游戏界面 */
#game-screen {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.game-header {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin-bottom: 20px;
    color: white;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
}

.stat-unit {
    font-size: 0.8em;
    opacity: 0.8;
}

/* 危险度条 */
.danger-bar {
    width: 120px;
    height: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 5px auto;
}

.danger-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* 办公室场景 */
.office-scene {
    background: linear-gradient(180deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    min-height: 300px;
}

/* 老板指示器 */
.boss-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.boss-indicator.safe {
    background: #d4edda;
    color: #155724;
}

.boss-indicator.danger {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.boss-icon {
    font-size: 2em;
    display: block;
    text-align: center;
}

.boss-status {
    text-align: center;
    margin-top: 5px;
}

/* 玩家角色 */
.player {
    text-align: center;
    padding: 30px;
    transition: all 0.3s ease;
}

.player-avatar {
    font-size: 5em;
    transition: all 0.3s ease;
}

.player.working .player-avatar {
    animation: type 0.5s infinite;
}

@keyframes type {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.player.slacking .player-avatar {
    animation: relax 1s infinite;
}

@keyframes relax {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.player-action {
    font-size: 1.3em;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 20px;
    display: inline-block;
}

/* 动作面板 */
.actions-panel {
    margin-top: 30px;
}

.actions-panel h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-btn {
    background: white;
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-5px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.action-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.action-risk {
    font-size: 0.8em;
    opacity: 0.8;
}

/* 工作按钮 */
.work-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 30px 60px;
    font-size: 1.5em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.5);
    animation: urgent 0.3s infinite;
    z-index: 100;
}

.work-btn.hidden {
    display: none;
}

@keyframes urgent {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.work-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

/* 道具面板 */
.items-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

.items-panel h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.items-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.item-btn {
    background: white;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.item-btn:hover {
    background: #ffc107;
    color: white;
}

.item-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.item-icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.item-cost {
    font-size: 0.9em;
    color: #ff6b6b;
}

/* 游戏结束界面 */
#gameover-screen {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

#gameover-screen h1 {
    font-size: 2.5em;
    margin-bottom: 40px;
}

.result-stats {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.result-item {
    margin: 20px 0;
}

.result-label {
    display: block;
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.result-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
}

.rank-display {
    font-size: 1.5em;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

/* 教程界面 */
#tutorial-screen {
    background: white;
    border-radius: 20px;
    padding: 40px;
    color: #333;
}

#tutorial-screen h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.tutorial-content {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.tutorial-section {
    margin-bottom: 30px;
}

.tutorial-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.tutorial-section p, .tutorial-section ul {
    line-height: 1.8;
}

.tutorial-section ul {
    list-style: none;
    padding-left: 20px;
}

.tutorial-section li {
    margin: 10px 0;
}

.risk-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 10px;
}

.risk-tag.low {
    background: #d4edda;
    color: #155724;
}

.risk-tag.medium {
    background: #fff3cd;
    color: #856404;
}

.risk-tag.high {
    background: #f8d7da;
    color: #721c24;
}

.risk-tag.extreme {
    background: #343a40;
    color: white;
}

/* 响应式设计 */
@media (max-width: 600px) {
    #start-screen h1 {
        font-size: 2em;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-avatar {
        font-size: 3em;
    }
    
    .work-btn {
        padding: 20px 40px;
        font-size: 1.2em;
    }
}

/* 被抓动画 */
.caught {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 连击效果 */
.combo-text {
    position: absolute;
    font-size: 2em;
    font-weight: bold;
    color: #ffc107;
    animation: comboPop 0.5s ease;
}

@keyframes comboPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}
