* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff1a8c;
    --secondary: #00ffff;
    --accent: #ffcc00;
    --dark: #0a0a1f;
    --darker: #050510;
    --neon-pink: #ff1a8c;
    --neon-blue: #00ffff;
    --neon-green: #00ff99;
    --neon-purple: #cc00ff;
}

body {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1a40 100%);
    color: white;
    font-family: 'Press Start 2P', cursive;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff1a8c' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"), auto;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    background: var(--darker);
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    border-radius: 10px;
    border: 2px solid var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    position: relative;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent);
    text-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green), 0 0 30px var(--neon-green);
    animation: glow 1.5s ease-in-out infinite alternate;
    letter-spacing: 3px;
}

@keyframes glow {
    from { text-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green), 0 0 30px var(--neon-green); }
    to { text-shadow: 0 0 15px var(--neon-green), 0 0 25px var(--neon-purple), 0 0 35px var(--neon-blue); }
}

.subtitle {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 30px;
    text-shadow: 0 0 5px var(--neon-blue);
}

.info-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--neon-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-purple);
    border: 2px solid white;
    transition: all 0.3s;
}

.info-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--neon-purple);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.game-card {
    background: rgba(20, 20, 50, 0.7);
    border: 3px solid var(--primary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px var(--neon-pink);
    height: 250px;
    perspective: 1000px;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 0 20px var(--neon-blue), 0 0 30px var(--neon-pink);
    border-color: var(--secondary);
}

.game-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.game-card:hover .game-card-inner {
    transform: rotateY(180deg);
}

.game-card-front, .game-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-card-front {
    background: rgba(10, 10, 40, 0.8);
}

.game-card-back {
    background: rgba(40, 10, 60, 0.9);
    transform: rotateY(180deg);
    justify-content: space-around;
}

.game-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 3px solid white;
    overflow: hidden;
}

.game-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
}

.game-name {
    font-size: 1rem;
    color: var(--accent);
    text-shadow: 0 0 5px var(--neon-green);
    margin-top: 10px;
}

.game-desc {
    font-size: 0.6rem;
    color: var(--secondary);
    line-height: 1.5;
    padding: 0 10px;
}

.play-button {
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
    color: var(--darker);
    border: none;
    padding: 8px 15px;
    font-family: 'Press Start 2P', cursive;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--neon-green);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a0a2e, #0a1a3a);
    border: 3px solid var(--primary);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 30px var(--neon-pink);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--neon-pink);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid white;
}

.modal-title {
    color: var(--accent);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--neon-green);
}

.about-section {
    background: rgba(10, 15, 30, 0.7);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.about-section h3 {
    color: var(--neon-blue);
    margin-bottom: 10px;
    font-size: 1rem;
}

.about-section p {
    font-size: 0.7rem;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary);
    transition: all 0.3s;
}

.social-link:hover {
    color: var(--neon-green);
    transform: translateY(-5px);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 8px;
    border: 2px solid var(--neon-blue);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 5s) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.pixel-corner {
    position: absolute;
    width: 15px;
    height: 15px;
}

.corner-tl { top: 10px; left: 10px; border-top: 3px solid var(--neon-green); border-left: 3px solid var(--neon-green); }
.corner-tr { top: 10px; right: 10px; border-top: 3px solid var(--neon-green); border-right: 3px solid var(--neon-green); }
.corner-bl { bottom: 10px; left: 10px; border-bottom: 3px solid var(--neon-green); border-left: 3px solid var(--neon-green); }
.corner-br { bottom: 10px; right: 10px; border-bottom: 3px solid var(--neon-green); border-right: 3px solid var(--neon-green); }

@media (max-width: 768px) {
    .title { font-size: 1.8rem; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-content { width: 95%; }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: 1fr; }
}
