/* Breakout Game - losmochOS Style */

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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
    user-select: none;
}

/* Terminal Header - Estilo losmochOS */
.terminal-header {
    background: linear-gradient(180deg, #004400 0%, #002200 100%);
    border-bottom: 2px solid #00ff00;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    position: relative;
    z-index: 100;
}

.terminal-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.terminal-label {
    color: #00aa00;
    font-weight: bold;
}

.terminal-value {
    color: #00ff00;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.terminal-buttons {
    display: flex;
    gap: 10px;
}

.terminal-buttons button {
    background: linear-gradient(180deg, #006600 0%, #004400 100%);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.terminal-buttons button:hover {
    background: linear-gradient(180deg, #008800 0%, #006600 100%);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.terminal-buttons button:active {
    transform: scale(0.95);
}

/* Game Container */
#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 50px);
    background: radial-gradient(ellipse at center, #001100 0%, #000000 100%);
}

/* Canvas */
#game-canvas {
    border: 2px solid #00ff00;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 150px);
    cursor: none;
}

/* Controls */
.controls {
    background: rgba(0, 68, 0, 0.8);
    border: 1px solid #00aa00;
    border-radius: 5px;
    padding: 10px 20px;
    margin-top: 10px;
    text-align: center;
}

.control-info p {
    margin: 5px 0;
    font-size: 14px;
}

.control-info strong {
    color: #00ff00;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, #003300 0%, #001100 100%);
    border: 2px solid #00ff00;
    border-radius: 10px;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.4),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h2 {
    color: #00ff00;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.modal-content p {
    margin: 10px 0;
    font-size: 16px;
    color: #00dd00;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.modal-buttons button {
    background: linear-gradient(180deg, #006600 0%, #004400 100%);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    min-width: 120px;
}

.modal-buttons button:hover {
    background: linear-gradient(180deg, #008800 0%, #006600 100%);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

.modal-buttons button:active {
    transform: translateY(0);
}

/* Particles Container */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
    animation: particleExplode 0.8s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Game Stats */
#game-over-stats p,
#level-stats p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 10px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 3px;
}

#game-over-stats span,
#level-stats span {
    color: #00ff00;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-header {
        font-size: 12px;
        padding: 6px 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .terminal-info {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .terminal-buttons {
        gap: 8px;
    }
    
    .terminal-buttons button {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    #game-canvas {
        width: calc(100vw - 20px);
        height: calc(100vh - 180px);
        margin: 10px;
    }
    
    .controls {
        padding: 8px 15px;
        margin: 5px;
    }
    
    .control-info p {
        font-size: 12px;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-buttons button {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .terminal-info {
        font-size: 10px;
        gap: 10px;
    }
    
    .terminal-value {
        min-width: 30px;
    }
    
    #game-canvas {
        border-width: 1px;
    }
    
    .control-info p {
        font-size: 10px;
        margin: 3px 0;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1s infinite;
}

/* Victory celebration */
.celebration {
    animation: celebrate 2s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.2); }
    75% { transform: scale(1.1) rotate(-5deg); }
}

/* Power-up effects */
.powerup-effect {
    position: absolute;
    color: #ffff00;
    font-weight: bold;
    font-size: 20px;
    animation: powerupFloat 2s ease-out forwards;
    pointer-events: none;
    z-index: 999;
}

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