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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #a0a0c0;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.score-board {
    display: flex;
    gap: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.9rem;
    color: #a0a0c0;
    margin-bottom: 5px;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: #4dffea;
    text-shadow: 0 0 10px rgba(77, 255, 234, 0.5);
}

.controls {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-start {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: white;
}

.btn-pause {
    background: linear-gradient(45deg, #ff8a00, #e52e71);
    color: white;
}

.btn-reset {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.game-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
}

#gameCanvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 700px;
    height: 438px;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.right-panel {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.ad-label {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ad-banner {
    background: linear-gradient(45deg, #1a3a5f, #2a4a7f);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ad-placeholder {
    color: #a0a0c0;
    text-align: center;
}

.ad-placeholder p:first-child {
    font-size: 1.2rem;
    color: #4dffea;
    margin-bottom: 5px;
}

.btn-premium {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #000;
    font-weight: bold;
    width: 100%;
}

.btn-premium:hover {
    background: linear-gradient(45deg, #ff8c00, #ffd700);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* 广告区域样式 */
.ad-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.ad-section h3 {
    color: #4dffea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ad-container {
    margin-bottom: 15px;
}

.ad-label {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-banner {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ad-placeholder i {
    font-size: 2rem;
    color: #4dffea;
}

.ad-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-ad-control {
    flex: 1;
    padding: 10px;
    background: linear-gradient(45deg, #1a3a5f, #2a4a7f);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-ad-control:hover {
    background: linear-gradient(45deg, #2a4a7f, #3a5a9f);
    transform: translateY(-2px);
}

.ad-stats-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
}

.ad-stats-container h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.ad-stats div {
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.btn-small {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 广告已去除样式 */
.ad-removed-message {
    color: #00ff88;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.premium-shop {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-shop h3 {
    color: #4dffea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.shop-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.item-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.item-info p {
    color: #a0a0c0;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.btn-buy {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 176, 155, 0.3);
}

.instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions h3 {
    color: #4dffea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #4dffea;
    padding-left: 15px;
}

.instructions i {
    width: 20px;
    margin-right: 10px;
    color: #ffd700;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #ffd700;
    z-index: 100;
    min-width: 300px;
}

.game-over h2 {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.game-over p {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: #a0a0c0;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hint {
    color: #ffd700;
    margin-top: 10px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .game-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 700px;
    }
    
    .right-panel {
        flex: 1 1 320px;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .container {
        padding: 25px;
    }
    
    #gameCanvas {
        max-width: 100%;
    }
    
    .right-panel {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .game-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .score-board {
        justify-content: space-around;
    }
    
    .game-container {
        flex-direction: column;
    }
    
    #gameCanvas {
        width: 100%;
        height: 350px;
    }
    
    .instructions {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .score-board {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    #gameCanvas {
        height: 280px;
    }
}