@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    --bg-cream: #FFFDF0;
    --yellow-lemon: #FFE66D;
    --green-mint: #4ECDC4;
    --pink-peach: #FFB6B9;
    --purple-lavender: #C3B1E1;
    --blue-sky: #87CEEB;
    --orange-coral: #FF8C69;
    --shadow-light: rgba(255, 255, 255, 0.8);
    --shadow-dark: rgba(163, 177, 198, 0.5);
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka One', cursive;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--bg-cream);
    padding: 20px 0;
    box-shadow: 0 2px 20px var(--shadow-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--yellow-lemon), var(--pink-peach), var(--green-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 24px;
    background: var(--bg-cream);
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 
        12px 12px 24px var(--shadow-dark),
        -12px -12px 24px var(--shadow-light);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.categories-section {
    padding: 40px 0;
}

.categories-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.categories-bubbles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.category-bubble {
    padding: 15px 30px;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    animation: float 3s ease-in-out infinite;
    text-decoration: none;
    color: var(--text-primary);
}

.category-bubble:nth-child(1) {
    background: var(--yellow-lemon);
    animation-delay: 0s;
}

.category-bubble:nth-child(2) {
    background: var(--green-mint);
    animation-delay: 0.5s;
}

.category-bubble:nth-child(3) {
    background: var(--pink-peach);
    animation-delay: 1s;
}

.category-bubble:nth-child(4) {
    background: var(--purple-lavender);
    animation-delay: 1.5s;
}

.category-bubble:nth-child(5) {
    background: var(--blue-sky);
    animation-delay: 2s;
}

.category-bubble:nth-child(6) {
    background: var(--orange-coral);
    animation-delay: 2.5s;
}

.category-bubble:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.games-section {
    padding: 40px 0;
}

.games-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.game-card {
    background: var(--bg-cream);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: bounceIn 0.6s ease-out;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        15px 15px 30px var(--shadow-dark),
        -15px -15px 30px var(--shadow-light);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.game-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail {
    transform: scale(1.05);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.game-tag {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-cream);
    box-shadow: 
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
}

.play-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--yellow-lemon), var(--pink-peach));
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    text-decoration: none;
    display: block;
    text-align: center;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
}

.play-button:active {
    transform: scale(0.95);
}

footer {
    background: var(--bg-cream);
    padding: 40px 0;
    margin-top: 60px;
    box-shadow: 0 -2px 20px var(--shadow-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--green-mint);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.game-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.game-detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-detail-title {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--yellow-lemon), var(--pink-peach), var(--green-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-detail-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.game-detail-category {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--green-mint);
    color: white;
    font-weight: 600;
}

.game-frame-container {
    background: var(--bg-cream);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        15px 15px 30px var(--shadow-dark),
        -15px -15px 30px var(--shadow-light);
    margin-bottom: 40px;
    position: relative;
}

.game-frame-wrapper {
    position: relative;
    width: 100%;
    min-height: 500px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2C3E50;
    border-radius: 16px;
    overflow: hidden;
}

.game-frame {
    border: none;
    display: block;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    gap: 30px;
}

.game-overlay-image {
    max-width: 80%;
    max-height: 60%;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 4px rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.game-overlay-hidden {
    display: none;
}

.play-now-button {
    padding: 20px 60px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--yellow-lemon), var(--pink-peach));
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -8px -8px 16px rgba(255, 255, 255, 0.1);
}

.play-now-button:hover {
    transform: scale(1.1);
}

.close-game-button {
    padding: 10px 30px;
    border: 2px solid white;
    border-radius: 20px;
    background: transparent;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.close-game-button:hover {
    background: white;
    color: var(--text-primary);
}

.game-instructions {
    background: var(--bg-cream);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
    margin-bottom: 40px;
}

.game-instructions h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.game-instructions p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.instruction-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.related-games {
    margin-top: 60px;
}

.related-games-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.related-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--yellow-lemon), var(--pink-peach), var(--green-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content {
    background: var(--bg-cream);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
}

.page-content h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.page-content h3 {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.page-content ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.page-content li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.contact-info {
    background: var(--bg-cream);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 
        inset 5px 5px 10px var(--shadow-dark),
        inset -5px -5px 10px var(--shadow-light);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.contact-info a {
    color: var(--green-mint);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    color: var(--pink-peach);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .search-box {
        width: 100%;
        max-width: 400px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .game-detail-title {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }

    .categories-bubbles {
        gap: 15px;
    }

    .category-bubble {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-detail-title {
        font-size: 1.5rem;
    }
}
