@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Kalam:wght@300;400;700&family=Lobster&display=swap');

:root {
    --bg-primary: #FDF8F0;
    --bg-secondary: #F5F0E8;
    --card-bg: #FFFBF5;
    --sakura-pink: #F7C5CC;
    --mint-green: #C7E9D0;
    --apricot: #FFE5B4;
    --lavender: #E8D5F2;
    --sky-blue: #D5E8F2;
    --text-dark: #5D4E37;
    --text-medium: #7A6B5A;
    --text-light: #9B8B7A;
    --border-color: #E8DFD5;
    --shadow-soft: rgba(93, 78, 55, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kalam', cursive;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    min-height: 100vh;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E8DFD5' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--sakura-pink) 0%, var(--lavender) 50%, var(--mint-green) 100%);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-soft);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-family: 'Lobster', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-soft);
    border: 3px dashed var(--sakura-pink);
}

.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 12px 50px 12px 25px;
    border: 3px dashed var(--border-color);
    border-radius: 30px;
    background: var(--card-bg);
    font-family: 'Kalam', cursive;
    font-size: 1.1rem;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.search-box:focus {
    border-color: var(--sakura-pink);
    box-shadow: 0 0 20px rgba(247, 197, 204, 0.3);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-medium);
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--sakura-pink);
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--card-bg);
    border: 3px dashed var(--mint-green);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-dark);
    font-family: 'Kalam', cursive;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: var(--mint-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-soft);
}

.categories-section {
    padding: 30px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.categories-title {
    font-family: 'Lobster', cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-tag {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px dashed;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-tag:nth-child(3n+1) {
    border-color: var(--sakura-pink);
}

.category-tag:nth-child(3n+2) {
    border-color: var(--mint-green);
}

.category-tag:nth-child(3n) {
    border-color: var(--apricot);
}

.category-tag:hover {
    transform: translateY(-3px) rotate(-2deg);
    box-shadow: 0 5px 15px var(--shadow-soft);
}

.category-tag.active {
    background: var(--sakura-pink);
    border-style: solid;
}

.games-section {
    padding: 40px 0;
}

.results-count {
    font-family: 'Lobster', cursive;
    font-size: 1.5rem;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 30px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-soft);
    transition: all 0.4s ease;
    position: relative;
    border: 3px solid transparent;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--sakura-pink), var(--mint-green), var(--apricot), var(--lavender));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px) rotate(1deg);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card-inner {
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
}

.game-thumb-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.game-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-thumb {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(247, 197, 204, 0.3) 0%, rgba(199, 233, 208, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(0);
    transition: transform 0.3s ease 0.1s;
}

.game-card:hover .play-icon {
    transform: scale(1);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--lavender);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.game-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

footer {
    background: linear-gradient(135deg, var(--sakura-pink) 0%, var(--lavender) 50%, var(--mint-green) 100%);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-link {
    color: var(--text-dark);
    text-decoration: none;
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.footer-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-soft);
}

.copyright {
    text-align: center;
    font-family: 'Caveat', cursive;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.detail-page {
    padding: 40px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--card-bg);
    border: 3px dashed var(--sakura-pink);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-dark);
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--sakura-pink);
    transform: translateX(-5px);
}

.game-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--card-bg);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow-soft);
    border: 3px dashed var(--border-color);
}

.game-preview {
    position: relative;
}

.game-preview img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow-soft);
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-title {
    font-family: 'Lobster', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.detail-category {
    display: inline-block;
    padding: 8px 20px;
    background: var(--lavender);
    border-radius: 15px;
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: var(--text-medium);
    width: fit-content;
}

.detail-description {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    padding: 20px;
    border-radius: 15px;
    border: 2px dashed var(--border-color);
    font-size: 1.1rem;
    line-height: 1.8;
}

.detail-instructions {
    background: var(--apricot);
    padding: 20px;
    border-radius: 15px;
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--sakura-pink) 0%, var(--lavender) 100%);
    border: none;
    border-radius: 30px;
    color: var(--text-dark);
    font-family: 'Lobster', cursive;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(247, 197, 204, 0.4);
    text-decoration: none;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247, 197, 204, 0.6);
}

.related-section {
    margin-top: 50px;
}

.related-title {
    font-family: 'Lobster', cursive;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(93, 78, 55, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.game-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 20px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 4px dashed var(--sakura-pink);
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--sakura-pink);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--lavender);
}

.game-iframe {
    border: none;
    border-radius: 15px;
    display: block;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    font-family: 'Lobster', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
}

.page-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow-soft);
    border: 3px dashed var(--border-color);
}

.page-card h2 {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    margin-top: 25px;
}

.page-card h2:first-child {
    margin-top: 0;
}

.page-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-medium);
}

.page-card ul {
    list-style: none;
    padding-left: 0;
}

.page-card li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.page-card li::before {
    content: '✿';
    position: absolute;
    left: 0;
    color: var(--sakura-pink);
}

.contact-email {
    display: inline-block;
    padding: 12px 25px;
    background: var(--mint-green);
    border-radius: 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.contact-email:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-soft);
}

.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-results-text {
    font-family: 'Lobster', cursive;
    font-size: 2rem;
    color: var(--text-medium);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .search-container {
        max-width: 100%;
        width: 100%;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .game-detail-container {
        grid-template-columns: 1fr;
    }
    
    .detail-title {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-container {
        gap: 8px;
    }
    
    .category-tag {
        padding: 8px 15px;
        font-size: 1rem;
    }
}
