/* Global Styles */
:root {
    --primary-color: #00AAFF;
    --secondary-color: #FF00AA;
    --tertiary-color: #FFAA00;
    --background-color: #111;
    --text-color: #FFF;
    --border-glow: 0 0 10px 2px var(--primary-color);
    --border-glow-secondary: 0 0 10px 2px var(--secondary-color);
    --border-glow-tertiary: 0 0 10px 2px var(--tertiary-color);
    --border-radius: 5px;
}

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

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-shadow: 0 0 5px var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Game container styles */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Game selection styles */
.game-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
    width: 100%;
}

.game-card {
    background-color: #222;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    width: 280px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--border-glow);
}

.game-preview {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
    border-radius: 5px;
    overflow: hidden;
}

.game-preview svg {
    width: 80%;
    height: 80%;
}

.tetris-preview {
    border: 2px solid var(--primary-color);
    box-shadow: inset 0 0 10px var(--primary-color);
}

.snake-preview {
    border: 2px solid var(--secondary-color);
    box-shadow: inset 0 0 10px var(--secondary-color);
}

.bricks-preview {
    border: 2px solid var(--tertiary-color);
    box-shadow: inset 0 0 10px var(--tertiary-color);
}

.space-invaders-preview {
    border: 2px solid var(--secondary-color);
    box-shadow: inset 0 0 10px var(--secondary-color);
}

.game-card h2 {
    color: var(--tertiary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.game-card p {
    margin-bottom: 1.5rem;
    font-size: 0.7rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.play-button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
    color: #000;
    text-shadow: none;
}

/* Game canvas styles */
canvas {
    border: 2px solid var(--primary-color);
    box-shadow: var(--border-glow);
    background-color: #000;
    margin: 0;
}

/* Tetris specific canvas */
#tetris-canvas {
    border: 2px solid var(--primary-color);
    box-shadow: var(--border-glow);
}

/* Snake specific canvas */
#snake-canvas {
    border: 2px solid var(--secondary-color);
    box-shadow: var(--border-glow-secondary);
}

/* Bricks specific canvas */
#bricks-canvas {
    border: 2px solid var(--tertiary-color);
    box-shadow: var(--border-glow-tertiary);
}

/* Space Invaders specific canvas */
#space-invaders-canvas {
    border: 2px solid var(--secondary-color);
    box-shadow: var(--border-glow-secondary);
}

/* Game info styles */
.game-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 1rem;
}

.game-info div {
    background-color: #222;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0.25rem;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

/* Controls styles */
.controls-info {
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid var(--primary-color);
}

.controls-info h3 {
    color: var(--tertiary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.key {
    display: inline-block;
    background-color: #444;
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    min-width: 30px;
    text-align: center;
    border: 1px solid #666;
}

/* Power-ups styles */
.power-ups-info {
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid var(--secondary-color);
}

.power-ups-info h3 {
    color: var(--tertiary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Enemy info styles */
.enemy-info {
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid var(--secondary-color);
}

.enemy-info h3 {
    color: var(--tertiary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Back button styles */
.back-button {
    display: block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--text-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Logo styles */
.logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

/* High score styles */
.high-score {
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid var(--tertiary-color);
}

.high-score h3 {
    color: var(--tertiary-color);
    margin-bottom: 0.5rem;
}

.high-score span {
    color: var(--secondary-color);
    font-size: 1.5rem;
    text-shadow: 0 0 5px var(--secondary-color);
}

/* Next piece and hold piece styles */
.next-piece-container, .hold-piece-container {
    background-color: #222;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid var(--primary-color);
}

.next-piece-container h3, .hold-piece-container h3 {
    color: var(--tertiary-color);
    margin-bottom: 0.5rem;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #111;
    margin-top: 2rem;
    border-top: 1px solid var(--primary-color);
}

/* Game over overlay */
.game-over-overlay, .level-complete-overlay, .pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content, .level-complete-content, .pause-content {
    background-color: #222;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--border-glow);
}

.game-over-content h2, .level-complete-content h2, .pause-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.game-over-content p, .level-complete-content p, .pause-content p {
    margin-bottom: 1rem;
}

.game-over-content button, .level-complete-content button {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.game-over-content button:hover, .level-complete-content button:hover {
    background-color: var(--text-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Horizontal game layout */
.horizontal-game-layout {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.game-sidebar {
    width: 200px;
    padding: 1rem;
    background-color: #000;
    border-right: 1px solid var(--primary-color);
}

.game-sidebar.right {
    border-right: none;
    border-left: 1px solid var(--primary-color);
}

.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.game-title {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.game-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .game-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .game-card {
        width: 100%;
        max-width: 350px;
    }
    
    canvas {
        max-width: 100%;
        height: auto;
    }
    
    .game-info {
        flex-direction: column;
    }
    
    .game-info div {
        margin-bottom: 0.5rem;
    }
    
    .horizontal-game-layout {
        flex-direction: column;
    }
    
    .game-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--primary-color);
    }
    
    .game-sidebar.right {
        border-left: none;
        border-top: 1px solid var(--primary-color);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .game-controls .key {
        margin-bottom: 0.5rem;
    }
    
    .game-card {
        padding: 1rem;
    }
    
    .game-card h2 {
        font-size: 1rem;
    }
    
    .game-card p {
        font-size: 0.6rem;
    }
    
    .play-button {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Header styles */
header {
    background-color: #111;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--primary-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.header-content h1 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.logo {
    height: 40px;
    margin: 0 10px;
    vertical-align: middle;
}

/* Games container styles */
.games-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}

/* About section preview styles */
.about-section-preview {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
}

.about-section-preview h2 {
    color: var(--tertiary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.about-section-preview p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.about-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.about-button:hover {
    background-color: var(--tertiary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.4);
    color: #000;
    text-shadow: none;
} 