:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-back: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --accent: #3b82f6;
    --success: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #ec4899;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 100vh;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(96, 165, 250, 0.2);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.game-card:hover:not(.coming-soon) {
    transform: translateY(-8px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
}

.game-icon {
    width: 80px;
    height: 80px;
    background: var(--card-back);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.icon {
    font-size: 2.8rem;
}

.game-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #f8fafc;
}

.game-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.play-btn {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.game-card:hover:not(.coming-soon) .play-btn {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.coming-soon {
    opacity: 0.6;
    cursor: default;
}

.coming-soon .game-icon {
    background: rgba(255, 255, 255, 0.1);
}

.play-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    box-shadow: none;
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 1rem 0;
    }
    .container {
        height: auto;
        max-height: none;
        padding: 1rem;
        gap: 1.5rem;
    }
    h1 {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }
    .kids-logo {
        max-width: 180px;
    }
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Logo and Footer Styles */
h1.logo-wrapper {
    background: none;
    -webkit-text-fill-color: initial;
    -webkit-background-clip: initial;
    text-shadow: none;
    margin: 0 0 -15px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kids-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kids-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.main-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.main-footer:hover {
    opacity: 1;
}

.main-footer .footer-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.church-logo {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.church-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(59, 130, 246, 0.3)) brightness(1.1);
}

/* Game Badge Styles */
.game-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.game-badge.kids {
    background: linear-gradient(135deg, #fdba74 0%, #f97316 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Back Link Style */
.back-link {
    align-self: flex-start;
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    backdrop-filter: blur(8px);
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    margin-bottom: -0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.back-link:hover {
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(139, 92, 246, 0.5) 100%);
    border-color: rgba(96, 165, 250, 0.8);
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4), 0 0 15px rgba(139, 92, 246, 0.2);
}
