/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f7e7ce, #d4a5a5, #a3c9e2);
    color: #333;
    position: relative;
}

/* Call to Action Button */
.cta-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #6b4e71;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.cta-btn:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Butterfly Icon Styling */
.butterfly-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    transition: stroke 0.3s ease;
}

.cta-btn:hover .butterfly-icon {
    stroke: #fff;
}

/* Pulse animation for the CTA button */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.03); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
    100% { transform: scale(1); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); }
}

/* Header and Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1100;
}

.navbar h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #6b4e71;
}

.navbar h1 a {
    text-decoration: none;
    color: #6b4e71;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 60%;
}

.nav-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6b4e71;
    color: #fff !important;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    background: #d4a5a5;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* X Share Button */
.x-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto;
    padding: 0.75rem 1.5rem;
    background: #6b4e71;
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.x-btn:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.x-btn .butterfly-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

/* Arcade Page Styles */
.arcade-neon-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a0033, #330066, #4d0099);
    color: #fff;
    text-shadow: 0 0 10px #ff69b4, 0 0 20px #ff69b4;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #ff69b4;
}

.arcade-neon-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/arcade-hero.jpg') center/cover no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.arcade-neon-hero h2, .arcade-neon-hero p, .arcade-neon-hero a {
    position: relative;
    z-index: 2;
}

.arcade-neon-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    animation: neon-flicker 1.5s infinite;
}

.arcade-neon-hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-shadow: 0 0 5px #d4a5a5;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.arcade-game-hall {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: #0d001a;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

.arcade-game-hall h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #ff69b4;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #ff69b4;
}

.instructions-list {
    font-size: 0.9rem;
    line-height: 1.3;
    list-style: none;
    margin: 1rem auto;
    padding: 1rem;
    background: rgba(107, 78, 113, 0.8);
    border: 3px solid #d4a5a5;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

.instructions-list li {
    margin-bottom: 3px;
    padding: 0.5rem 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions-list li strong {
    color: #ff69b4;
}

.rule-icon {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

.game-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border: 4px solid #6b4e71;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 105, 180, 0.6);
}

.game-card h3 {
    font-family: 'Playfair Display', serif;
    color: #ff69b4;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px #ff69b4;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border: 5px solid #ff69b4;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

#gameCanvas, #pongCanvas, #breakoutCanvas, #trailCanvas, #bloomCanvas {
    width: 100%;
    background: #000;
    display: block;
    height: 600px;
}

#gameOver, #pongGameOver, #breakoutGameOver, #trailGameOver, #bloomGameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-shadow: 0 0 10px #ff69b4;
    display: none;
    text-align: center;
    background: rgba(107, 78, 113, 0.9);
    padding: 2rem;
    border-radius: 10px;
    border: 3px solid #ff69b4;
}

.play-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #ff69b4;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 2rem;
    box-shadow: 0 0 10px #ff69b4;
}

.play-btn:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 0 20px #ff69b4;
}

.fullscreen-btn {
    display: block;
    margin: 1rem auto;
    padding: 0.5rem 1rem;
    background: #6b4e71;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    border: none;
    cursor: pointer;
}

.fullscreen-btn:hover {
    background: #ff69b4;
    transform: scale(1.05);
}

/* Pop-out Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.game-modal-content {
    position: relative;
    background: #0d001a;
    border: 5px solid #ff69b4;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.7);
    max-width: 1200px;
    width: 90%;
}

.game-modal-content .game-container {
    max-width: 1200px;
}

.game-modal-content #gameCanvas {
    height: 720px;
}

.game-modal-content #pongCanvas,
.game-modal-content #breakoutCanvas,
.game-modal-content #trailCanvas,
.game-modal-content #bloomCanvas {
    height: 720px;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ff69b4;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
    transition: background 0.3s ease, transform 0.3s ease;
}

.close-btn:hover {
    background: #d4a5a5;
    transform: scale(1.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #6b4e71;
    color: #fff;
}

footer a {
    color: #d4a5a5;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .nav-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
        max-width: 100%;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .x-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .cta-container {
        top: 10px;
        right: 10px;
    }

    .cta-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .butterfly-icon {
        width: 16px;
        height: 16px;
    }

    .arcade-neon-hero h2 {
        font-size: 2.5rem;
    }

    .arcade-neon-hero p {
        font-size: 1.2rem;
    }

    .arcade-game-hall h2 {
        font-size: 2rem;
    }

    #gameCanvas, #pongCanvas, #breakoutCanvas, #trailCanvas, #bloomCanvas {
        height: 400px;
    }

    .game-modal-content {
        width: 95%;
    }

    .game-modal-content .game-container {
        height: 480px;
    }

    .game-modal-content #gameCanvas,
    .game-modal-content #pongCanvas,
    .game-modal-content #breakoutCanvas,
    .game-modal-content #trailCanvas,
    .game-modal-content #bloomCanvas {
        height: 480px;
    }

    #gameOver, #pongGameOver, #breakoutGameOver, #trailGameOver, #bloomGameOver {
        font-size: 2rem;
        padding: 1rem;
    }

    .play-btn {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
    }

    .game-gallery {
        grid-template-columns: 1fr;
    }

    .game-card {
        padding: 1rem;
    }

    .game-card h3 {
        font-size: 1.5rem;
    }

    .fullscreen-btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .close-btn {
        top: -10px;
        right: -10px;
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }

    .instructions-list {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .rule-icon {
        width: 14px;
        height: 14px;
    }
}