/* ===== Real Simulation - Main Styles ===== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a14;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Content Wrapper (sits above background) */
.content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(ellipse at center, rgba(15,15,26,0.7) 0%, rgba(10,10,20,0.9) 100%);
}

/* Header */
header {
    text-align: center;
    padding: 4rem 1rem 2.5rem;
    background: linear-gradient(180deg, rgba(233,69,96,0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(233,69,96,0.2);
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #e94560, #ff6b81, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(233,69,96,0.3));
    letter-spacing: 2px;
}

header p {
    font-size: 1.2rem;
    color: #8888aa;
    letter-spacing: 1px;
}

/* Game Grid */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Staggered fade-in for cards */
.game-card {
    opacity: 0;
    animation: cardFadeIn 0.5s ease forwards;
}
.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Game Card */
.game-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(42, 42, 74, 0.5);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.25), 0 0 80px rgba(233, 69, 96, 0.1);
    border-color: rgba(233, 69, 96, 0.5);
}

.game-thumbnail {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.game-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.game-card:hover .game-thumbnail::after {
    left: 100%;
}

.tetris-thumb {
    background: linear-gradient(135deg, #0f3460, #533483);
}

.magnet-thumb {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
}

.airfoil-thumb {
    background: linear-gradient(135deg, #1e8449, #27ae60);
}

.game-card h2 {
    padding: 1rem 1.2rem 0.4rem;
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 700;
}

.game-card p {
    padding: 0 1.2rem 0.8rem;
    color: #8888aa;
    font-size: 0.9rem;
    line-height: 1.4;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #e94560, #ff6b81);
    color: white;
    padding: 0.55rem 1.6rem;
    margin: 0 1.2rem 1.2rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: box-shadow 0.3s, transform 0.2s;
}

.game-card:hover .play-btn {
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    transform: scale(1.05);
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem;
    background: rgba(10, 10, 20, 0.8);
    border-top: 1px solid rgba(233, 69, 96, 0.15);
    color: #555;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Mobile */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }
}
