/* GoofyGalaxy - Quirky Games Website Styles */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #F97316;
    --secondary: #EC4899;
    --accent: #22D3EE;
    --light-bg: #FFF7ED;
    --text: #334155;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--light-bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Fredoka One', cursive; color: var(--primary); }
a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--accent); }

/* Navigation */
nav {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}
nav a { color: white; font-weight: 700; font-size: 1.1rem; transition: all 0.3s; }
nav a:hover { color: var(--accent); transform: scale(1.05); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #fff 0%, var(--light-bg) 100%);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.3rem; color: var(--secondary); font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4); color: white; }

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card p { color: #64748b; font-size: 0.95rem; }
.card-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Game Container */
.game-container {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.game-title { font-size: 2.5rem; margin-bottom: 1rem; }
.game-score { font-size: 1.5rem; color: var(--secondary); margin: 1rem 0; }
.game-area {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: var(--radius);
    min-height: 400px;
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
}

/* Article Styles */
.article-content {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}
.article-content h2 { color: var(--primary); margin: 1.5rem 0 0.5rem; }
.article-content p { margin-bottom: 1rem; font-size: 1.1rem; line-height: 1.8; }
.article-content ul { margin: 1rem 0 1rem 2rem; }
.article-content li { margin-bottom: 0.5rem; }

/* Footer */
footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}
footer a { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    nav ul { gap: 1rem; }
    .container { padding: 1rem; }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.badge.new { background: var(--secondary); }
.badge.hot { background: var(--primary); }

/* Form */
input, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Game Over Overlay */
.game-over {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}
.game-over h2 { color: var(--accent); font-size: 2rem; }

/* Mole / Clickable Items */
.mole, .clover, .balloon, .cookie, .coin, .fruit {
    position: absolute;
    cursor: pointer;
    transition: transform 0.1s;
}
.mole:hover, .clover:hover, .balloon:hover, .cookie:hover, .coin:hover, .fruit:hover { transform: scale(1.1); }

/* Sliders/Puzzle specific */
.tile {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}
.tile.empty { background: #e2e8f0; cursor: default; }

/* Memory Game */
.memory-card {
    width: 80px;
    height: 80px;
    perspective: 1000px;
    cursor: pointer;
}
.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.memory-card.flipped .memory-card-inner { transform: rotateY(180deg); }
.memory-card-front, .memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.memory-card-front { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.memory-card-back { background: white; transform: rotateY(180deg); }

/* Snake/Game Canvas */
canvas { border-radius: var(--radius); }

/* Loading */
.loading { text-align: center; padding: 2rem; }
.spinner {
    width: 50px; height: 50px;
    border: 5px solid var(--light-bg);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
