/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Fredericka+the+Great&display=swap');

/* Root Variables - Jungle Theme Colors */
:root {
    --jungle-primary: #2E7D32;
    --jungle-secondary: #4CAF50;
    --jungle-accent: #66BB6A;
    --jungle-light: #C8E6C9;
    --jungle-dark: #1B5E20;
    --wood-brown: #8D6E63;
    --earth-brown: #6D4C41;
    --tropical-yellow: #FFC107;
    --leaf-green: #8BC34A;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: linear-gradient(135deg, var(--jungle-light) 0%, var(--white) 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Jungle Header/Navbar */
.jungle-navbar {
    background: linear-gradient(135deg, var(--jungle-primary), var(--jungle-secondary));
    padding: 15px 0;
    box-shadow: 0 4px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Logo */
.jungle-logo {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2.5rem;
    color: var(--white);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.jungle-logo::before {
    content: "🌿";
    font-size: 2rem;
    animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, var(--wood-brown), var(--earth-brown));
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Search Bar */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar {
    width: 200px;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--white);
    border-radius: 25px;
    background: var(--white);
    transition: all 0.3s ease;
    outline: none;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-bar:focus {
    border-color: var(--jungle-secondary);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--jungle-secondary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-btn:hover {
    background: var(--jungle-primary);
    transform: translateY(-50%) scale(1.1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 200px;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow);
    padding: 10px 0;
    margin-top: 10px;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-content a:hover {
    background: var(--jungle-light);
    color: var(--jungle-primary);
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--jungle-primary), var(--jungle-secondary));
    padding: 60px 0;
    text-align: center;
    color: var(--white);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Games Grid */
.games-section {
    margin: 40px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--jungle-primary);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--jungle-secondary), var(--jungle-accent));
    border-radius: 2px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Game Card */
.game-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 1;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.game-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.game-card:hover .game-overlay {
    transform: translateY(0);
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.game-category {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--jungle-accent);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--jungle-secondary), var(--jungle-accent));
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--shadow);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

/* Footer Content Section */
.footer-content-section {
    background: linear-gradient(135deg, var(--jungle-primary), var(--jungle-dark));
    color: var(--white);
    padding: 60px 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--jungle-light);
}

.footer-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.footer-content a {
    color: var(--jungle-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Main Footer */
.main-footer {
    background: var(--jungle-dark);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--jungle-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Game Page Styles */
.game-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    color: var(--jungle-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.game-iframe-container {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    margin-bottom: 30px;
    text-align: center;
}

.game-iframe {
    width: 100%;
    max-width: 800px;
    height: 600px;
    border: none;
    border-radius: 15px;
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--jungle-secondary), var(--jungle-accent));
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.game-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.info-section {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow);
}

.info-section h3 {
    color: var(--jungle-primary);
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section p {
    line-height: 1.8;
    color: var(--dark-gray);
}

/* Legal Pages Styling */
.legal-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.legal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    line-height: 1.8;
    margin-bottom: 40px;
}

.legal-content h2 {
    color: var(--jungle-primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Fredericka the Great', cursive;
}

.legal-content h3 {
    color: var(--jungle-secondary);
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid var(--jungle-light);
    padding-bottom: 10px;
    font-weight: 600;
}

.legal-content h4 {
    color: var(--jungle-dark);
    font-size: 1.2rem;
    margin: 25px 0 12px 0;
    font-weight: 600;
}

.legal-content p {
    margin-bottom: 15px;
    color: var(--dark-gray);
    text-align: justify;
}

.legal-content ul, .legal-content ol {
    margin: 15px 0 15px 30px;
    color: var(--dark-gray);
}

.legal-content li {
    margin-bottom: 8px;
}

.legal-content a {
    color: var(--jungle-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.legal-content a:hover {
    color: var(--jungle-primary);
    text-decoration: underline;
}

.legal-content strong {
    color: var(--jungle-dark);
    font-weight: 600;
}

.contact-info, .contact-guidelines {
    background: var(--jungle-light);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 4px solid var(--jungle-secondary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--jungle-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--jungle-primary);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--jungle-dark);
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .search-bar {
        width: 150px;
        font-size: 14px;
    }
    
    .search-bar:focus {
        width: 200px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .game-info {
        grid-template-columns: 1fr;
    }
    
    .game-iframe {
        height: 400px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .jungle-logo {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .search-bar {
        width: 120px;
        font-size: 13px;
    }
    
    .search-bar:focus {
        width: 180px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .game-iframe {
        height: 300px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--jungle-light);
    border-radius: 50%;
    border-top-color: var(--jungle-secondary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Categories Filter - Inline Style */
.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px 0;
    justify-content: center;
}

.category-tag {
    background: var(--white);
    color: var(--jungle-primary);
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--jungle-light);
    position: relative;
    overflow: hidden;
}

.category-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.category-tag:hover::before {
    left: 100%;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.15);
    border-color: var(--jungle-secondary);
    color: var(--jungle-secondary);
}

.category-tag.active {
    background: linear-gradient(135deg, var(--jungle-secondary), var(--jungle-accent));
    color: var(--white);
    border-color: var(--jungle-secondary);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.25);
}

.category-tag.active:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
}

/* Responsive Categories Filter */
@media (max-width: 768px) {
    .categories-filter {
        gap: 10px;
        padding: 15px 0;
    }
    
    .category-tag {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .categories-filter {
        gap: 8px;
        padding: 10px 0;
    }
    
    .category-tag {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.hidden { display: none; }
.visible { display: block; }

/* Legal Pages Responsive */
@media (max-width: 768px) {
    .legal-page {
        padding: 0 15px;
        margin: 20px auto;
    }

    .legal-content {
        padding: 25px 20px;
    }

    .legal-content h2 {
        font-size: 2rem;
    }

    .legal-content h3 {
        font-size: 1.3rem;
    }

    .breadcrumb {
        flex-wrap: wrap;
        padding: 12px 15px;
        font-size: 0.8rem;
    }
}