/* Space Invaders Game Component */



/* Game Container */
.space-invaders-game {
    background: #000;
    border-radius: 10px;
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 900px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.space-invaders-game.game-active {
    position: relative;
    min-height: 600px;
    padding-top: 20px;
    padding-bottom: 80px;
}

.space-invaders-game.game-active .aliens-container {
    margin-bottom: 80px;
    margin-top: 30px;
}

.aliens-container {
    margin-bottom: 80px;
}

/* Alien Rows */
.alien-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    animation: alienBob 2s ease-in-out infinite;
}

.alien-row:nth-child(2) {
    animation-delay: 0.3s;
}

.alien-row:nth-child(3) {
    animation-delay: 0.6s;
}

/* Aliens */
.alien {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #00ff00;
    font-size: 14px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer; 
    text-shadow: 0 0 5px #00ff00;
}

.alien-1 {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.alien-2 {
    color: #ff6600;
    text-shadow: 0 0 5px #ff6600;
}

.alien:hover {
    transform: scale(1.2);
    text-shadow: 0 0 10px currentColor;
}

.alien.destroyed {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.alien.hit {
    animation: alienHit 0.5s ease;
}

/* Animations */
@keyframes alienBob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes alienHit {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); background: #ff0000; }
    100% { transform: scale(0); opacity: 0; }
}

/* Game UI */
#gameUI {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin-bottom: 20px;
}

.game-header {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 2px solid #00ff00;
}

.game-score, .game-lives {
    font-size: 18px;
    font-weight: bold;
}

.game-controls {
    margin-top: 15px;
}

.control-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #00ddff;
}

.mobile-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.control-btn {
    background: #333;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 15px 20px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.control-btn:hover, .control-btn:active {
    background: #00ff00;
    color: #000;
    transform: scale(1.1);
}

/* Bullets */
#bulletsContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bullet {
    position: absolute;
    width: 3px;
    height: 10px;
    border-radius: 1px;
}

.player-bullet {
    background: #ffff00;
    box-shadow: 0 0 5px #ffff00;
}

.alien-bullet {
    background: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

/* Play Button */
.play-button-container {
    text-align: center;
    margin: 60px 0;
}

.play-button {
    background: linear-gradient(45deg, #ff6600, #ff9900);
    border: 2px solid #ffaa00;
    color: white;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.8);
    background: linear-gradient(45deg, #ff9900, #ffaa00);
}

.play-button .play-icon {
    margin-right: 10px;
    font-size: 1.2em;
    display: inline-block;
}

/* Spaceship */
.spaceship-container {
    text-align: center;
    margin-top: 40px;
}

.spaceship {
    display: inline-block;
    animation: spaceshipMove 3s ease-in-out infinite alternate;
}

.spaceship-container.game-active {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.1s ease;
}

.spaceship-container.game-active .spaceship {
    animation: none;
}

.spaceship-body {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    color: #00ddff;
    text-shadow: 0 0 10px #00ddff;
    line-height: 0.8;
}

@keyframes spaceshipMove {
    0% {
        transform: translateX(-30px);
    }
    100% {
        transform: translateX(30px);
    }
}

/* Game Over Screen */
#gameOverScreen {
    text-align: center;
    color: #ff0000;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.game-over-content {
    background: rgba(255, 0, 0, 0.1);
    padding: 40px;
    border-radius: 15px;
    border: 3px solid #ff0000;
    box-shadow: 0 0 30px #ff0000;
}

.game-over-content h3 {
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    animation: gameOverPulse 0.8s infinite;
    color: #ffffff;
    text-stroke: 2px #ff0000;
    -webkit-text-stroke: 2px #ff0000;
}

.game-over-content p {
    font-size: 24px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    margin-bottom: 30px;
}

@keyframes gameOverPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

/* Start Message */
.start-message {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #00ff00;
    z-index: 10;
}

.start-message-content h4 {
    margin-bottom: 15px;
    font-size: 24px;
    color: #00ff00;
}

.start-message-content p {
    margin-bottom: 8px;
    font-size: 16px;
    color: #00ddff;
}

.mobile-hint {
    color: #ffaa00;
    font-size: 14px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* SEO Elements */
.seo-tech-list {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tech-keyword {
    display: inline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .alien-row {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .alien {
        font-size: 12px;
        padding: 6px 3px;
        margin: 2px;
    }

    .play-button {
        padding: 15px 25px;
        font-size: 16px;
    }

    .spaceship-body {
        font-size: 16px;
    }
    
    .space-invaders-game.game-active {
        min-height: 600px;
        padding-bottom: 80px;
    }
    
    .space-invaders-game.game-active .aliens-container {
        margin-bottom: 60px;
        margin-top: 15px;
    }
    
    .spaceship-container.game-active {
        bottom: 30px;
    }
    
    .control-info {
        display: none;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .control-btn {
        padding: 12px 15px;
        font-size: 18px;
    }
    
    .start-message {
        padding: 20px;
    }
    
    .start-message-content h4 {
        font-size: 20px;
    }
    
    .start-message-content p {
        font-size: 14px;
    }
    
    .mobile-hint {
        display: block;
    }
}

@media (max-width: 480px) {
    .alien {
        font-size: 10px;
        padding: 4px 2px;
    }

    .play-button {
        padding: 12px 20px;
        font-size: 14px;
    }

    .play-button span:not(.play-icon) {
        display: none;
    }

    .spaceship-body {
        font-size: 14px;
    }
}

@media (min-width: 481px) {
    .mobile-controls {
        display: none;
    }
    
    .mobile-hint {
        display: none;
    }
} 