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

body {
    font-family: 'Roboto', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas {
    display: block;
    background: #000;
    border: 2px solid #333;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.screen.active {
    display: flex;
}

/* Title Screen */
.title-content {
    text-align: center;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #E53935;
    text-shadow: 0 0 20px #FF1744, 0 0 40px #FF1744;
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite;
}

.stone-emoji {
    display: inline-block;
    animation: wobble 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px #FF1744, 0 0 40px #FF1744; }
    50% { text-shadow: 0 0 30px #FF1744, 0 0 60px #FF1744, 0 0 80px #FF5252; }
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 2rem;
}

.high-score-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    color: #FFD700;
    margin-top: 2rem;
}

/* Buttons */
.big-button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #E53935, #C62828);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    transition: all 0.3s ease;
}

.big-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.6);
}

.big-button:active {
    transform: scale(0.98);
}

.small-button {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: #424242;
    color: #fff;
    border: 1px solid #666;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.small-button:hover {
    background: #555;
    border-color: #888;
}

/* Tutorial */
.tutorial-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.tutorial-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #E53935;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #212121;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #333;
}

.step-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #E53935;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 50%;
}

.tutorial-step p {
    font-size: 1.1rem;
    text-align: left;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    z-index: 10;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.score-panel, .combo-panel, .high-score-panel {
    background: rgba(33, 33, 33, 0.9);
    border: 2px solid #424242;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    min-width: 150px;
}

.score-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.score-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.combo-panel {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.combo-panel.active {
    opacity: 1;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.combo-label {
    font-size: 0.8rem;
    color: #888;
}

.combo-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
}

.hud-bottom {
    display: flex;
    justify-content: center;
    gap: 1rem;
    pointer-events: auto;
}

.drop-button {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #E53935, #C62828);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    transition: all 0.3s ease;
}

.drop-button:hover {
    transform: scale(1.05);
}

.icon-button {
    font-size: 1.5rem;
    padding: 1rem;
    background: #424242;
    border: 2px solid #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-button:hover {
    background: #555;
    border-color: #888;
}

/* Settings Panel */
.side-panel {
    position: absolute;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: rgba(33, 33, 33, 0.98);
    border-left: 2px solid #424242;
    z-index: 200;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-panel.active {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #424242;
}

.panel-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #E53935;
}

.close-button {
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
}

.panel-content {
    padding: 1.5rem;
    overflow-y: auto;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item select {
    width: 100%;
    padding: 0.5rem;
    background: #424242;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Game Over */
.game-over-content {
    text-align: center;
    max-width: 600px;
}

.game-over-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #E53935;
    margin-bottom: 2rem;
}

.final-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.stat-item {
    background: #212121;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1rem;
    min-width: 150px;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.new-record {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 1.5rem;
    animation: pulse 1s ease-in-out infinite;
}

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

/* Pause */
.pause-content {
    text-align: center;
}

.pause-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #E53935;
    margin-bottom: 2rem;
}

/* Footer */
.berrry-footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.9rem;
    color: #666;
    z-index: 1000;
}

.berrry-footer a {
    color: #E53935;
    text-decoration: none;
    transition: color 0.3s ease;
}

.berrry-footer a:hover {
    color: #FF5252;
}

.separator {
    margin: 0 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .hud-top {
        flex-direction: column;
        align-items: stretch;
    }
    
    .score-panel, .combo-panel, .high-score-panel {
        min-width: auto;
    }
    
    .drop-button {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .side-panel {
        width: 100%;
        right: -100%;
    }
    
    .stat-item {
        min-width: 100px;
    }
}