/* EpicVault - Cartoon Doodle Style CSS */

:root {
    --primary-yellow: #FFE135;
    --primary-orange: #FF6B35;
    --primary-blue: #87CEEB;
    --light-pink: #FFB6C1;
    --light-green: #98FB98;
    --dark-text: #2C3E50;
    --white: #FFFFFF;
    --black: #000000;
    --shadow: 4px 4px 0px rgba(0,0,0,0.2);
    --border-thick: 3px solid #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background-color: #FFFEF0;
    background-image: radial-gradient(#FFE4B5 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--dark-text);
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-orange) 100%);
    border-bottom: var(--border-thick);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark-text);
}

.logo-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.logo-text {
    font-family: 'Righteous', cursive;
    font-size: 1.8rem;
    text-shadow: 2px 2px 0px var(--white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 700;
    padding: 8px 16px;
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 25px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.nav-menu a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    background: var(--primary-blue);
}

.nav-search input {
    padding: 10px 15px;
    border: 2px solid var(--black);
    border-radius: 25px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    width: 200px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #FFE4E1 0%, #E0FFFF 50%, #F0FFF0 100%);
    padding: 30px 20px;
    text-align: center;
    border-bottom: var(--border-thick);
}

.hero-content h1 {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px var(--primary-yellow);
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 15px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.stat-item {
    background: var(--white);
    padding: 10px 20px;
    border: var(--border-thick);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.stat-number {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.stat-label {
    font-size: 0.8rem;
}

/* Floating Meme Ranking */
.floating-ranking {
    position: fixed;
    right: 20px;
    top: 100px;
    width: 180px;
    background: var(--white);
    border: var(--border-thick);
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow);
    z-index: 999;
    max-height: 400px;
    overflow-y: auto;
}

.floating-ranking h3 {
    font-family: 'Righteous', cursive;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border-bottom: 2px dashed #ddd;
    font-size: 0.8rem;
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank-number {
    font-family: 'Righteous', cursive;
    font-size: 1rem;
    color: var(--primary-orange);
}

.rank-stars {
    color: var(--primary-yellow);
    font-size: 0.7rem;
}

/* Main Content */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.games-section {
    flex: 1;
}

.section-title {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    margin: 25px 0 15px;
    padding: 8px 16px;
    background: var(--primary-yellow);
    border: var(--border-thick);
    border-radius: 15px;
    display: inline-block;
    box-shadow: var(--shadow);
}

/* Games Grid - Compact Layout */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.games-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.game-card {
    border: var(--border-thick);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark-text);
    display: block;
    position: relative;
}

.game-card:hover {
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
}

.game-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-bottom: 2px solid var(--black);
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.game-thumb.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.game-thumb.lazy.loaded {
    opacity: 1;
}

.game-info {
    padding: 8px;
}

.game-title {
    font-family: 'Righteous', cursive;
    font-size: 0.75rem;
    margin-bottom: 3px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-category {
    font-size: 0.6rem;
    background: var(--primary-orange);
    color: var(--white);
    padding: 1px 6px;
    border-radius: 8px;
    display: inline-block;
}

.game-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.btn-play, .btn-like {
    flex: 1;
    padding: 4px 6px;
    border: 2px solid var(--black);
    border-radius: 10px;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.65rem;
}

.btn-play {
    background: var(--light-green);
}

.btn-like {
    background: var(--light-pink);
}

.btn-play:hover, .btn-like:hover {
    transform: scale(1.05);
}

/* Sticker badges */
.sticker-new, .sticker-hot, .sticker-top {
    position: absolute;
    top: -3px;
    right: -3px;
    padding: 3px 6px;
    border: 2px solid var(--black);
    border-radius: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    transform: rotate(15deg);
    z-index: 10;
}

.sticker-new { background: var(--light-green); }
.sticker-hot { background: var(--primary-orange); color: var(--white); }
.sticker-top { background: var(--primary-yellow); }

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 30px 0;
}

.btn-load-more {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #FF8C42 100%);
    color: var(--white);
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    padding: 12px 40px;
    border: var(--border-thick);
    border-radius: 25px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.btn-load-more:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
}

.btn-load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Game Detail Page */
.game-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.game-detail-card {
    background: var(--white);
    border: var(--border-thick);
    border-radius: 25px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.game-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.game-detail-thumb {
    width: 300px;
    height: 225px;
    object-fit: cover;
    border: var(--border-thick);
    border-radius: 20px;
}

.game-detail-info {
    flex: 1;
}

.game-detail-title {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.game-detail-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.game-detail-category, .game-detail-tags {
    background: var(--primary-yellow);
    padding: 5px 15px;
    border: 2px solid var(--black);
    border-radius: 15px;
    font-size: 0.9rem;
}

.game-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.game-detail-instructions {
    background: #F0F8FF;
    padding: 20px;
    border: 2px dashed var(--black);
    border-radius: 15px;
    margin-bottom: 20px;
}

.game-detail-instructions h3 {
    font-family: 'Righteous', cursive;
    margin-bottom: 10px;
}

.btn-play-now {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #FF8C42 100%);
    color: var(--white);
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    padding: 15px 50px;
    border: var(--border-thick);
    border-radius: 30px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.btn-play-now:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.3);
}

/* Play Page */
.play-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.play-title {
    font-family: 'Righteous', cursive;
    font-size: 1.8rem;
}

.btn-back {
    background: var(--white);
    padding: 10px 20px;
    border: var(--border-thick);
    border-radius: 20px;
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 700;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.btn-back:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.game-frame-container {
    background: var(--white);
    border: var(--border-thick);
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.game-frame {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 15px;
    background: #000;
}

/* Policy Pages */
.policy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.policy-card {
    background: var(--white);
    border: var(--border-thick);
    border-radius: 25px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.policy-card h1 {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.policy-card h2 {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--primary-orange);
}

.policy-card p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.policy-card ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.policy-card li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Contact Form */
.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--black);
    border-radius: 10px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    background: var(--primary-yellow);
    padding: 15px 40px;
    border: var(--border-thick);
    border-radius: 25px;
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #BDC3C7;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-yellow);
}

.social-links {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
}

.social-links a {
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495E;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .floating-ranking {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    .nav-menu {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }

    .games-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 6px;
    }

    .game-thumb {
        height: 70px;
    }

    .game-detail-header {
        flex-direction: column;
        align-items: center;
    }

    .game-detail-thumb {
        width: 100%;
        max-width: 300px;
    }

    .game-frame {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .games-grid-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .game-thumb {
        height: 60px;
    }

    .game-title {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .game-frame {
        height: 300px;
    }
}
