:root {
    --bg-color: #FFFFFF;
    --accent-color: #FFD600;
    --text-main: #000000;
    --text-muted: #888888;
}

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

body {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle, #E0E0E0 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.bg-blob {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.blob-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, #FFD60022 0%, transparent 70%);
}

.blob-bottom {
    bottom: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #FF3CAC15 0%, transparent 70%);
}

.header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo .accent {
    color: var(--accent-color);
}

.rainbow-line {
    height: 3px;
    width: 120px;
    margin: 8px auto 0;
    background: linear-gradient(90deg, #FFD600, #FF3CAC, #667EEA);
    border-radius: 2px;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.random-btn {
    background-color: var(--accent-color);
    color: #000000;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(255, 214, 0, 0.3);
}

.random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 214, 0, 0.4);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    text-decoration: none;
    color: var(--text-main);
    background-color: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-top {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.card-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.2) 2px, transparent 2px);
    background-size: 20px 20px;
    pointer-events: none;
}

.emoji {
    font-size: 80px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: transform 0.2s ease;
}

.card:hover .emoji {
    transform: scale(1.1);
}

.card-bottom {
    padding: 1.5rem;
    background-color: #FFFFFF;
}

.card-bottom h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.card-bottom p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

.footer {
    background-color: #F5F5F5;
    padding: 1.5rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-weight: 600;
}

.footer-content a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-content a:hover {
    color: var(--text-main);
}

.kofi-btn {
    background-color: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: var(--text-main) !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.kofi-btn:hover {
    background-color: #F0F0F0;
}

/* Responsive Grid - Locked to 3 columns per user request */

/* Game pages styles */
.game-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1rem;
}

.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.7);
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.back-link:hover {
    color: rgba(0, 0, 0, 1);
    transform: translateX(-4px);
}

.game-container {
    max-width: 800px;
    margin: auto;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.game-share-btn {
    margin-top: 2rem;
    padding: 0.8rem 1.5rem;
    background-color: rgba(0,0,0,0.1);
    color: #000;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.game-share-btn:hover {
    background-color: rgba(0,0,0,0.2);
}

.gemini-error {
    color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 600;
}

/* Mobile specific fixes */
@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }
    .back-link {
        top: 1rem;
        left: 1rem;
        font-size: 1rem;
    }
}
