:root {
    /* Color Palette */
    --clr-bg: #0f1a10;
    --clr-surface: #1f2d1f;
    --clr-surface-light: #2c422c;
    --clr-yellow: #ffd60a;
    --clr-lime: #70e000;
    --clr-brown: #8b5e34;
    --clr-orange: #ff8800;
    --clr-glow: #38b000;
    --clr-text: #e8f5e9;
    --clr-text-muted: #a5d6a7;
    --clr-white: #ffffff;
    --clr-danger: #ff4d4d;

    /* Typography */
    --font-heading: 'Fredoka', 'Baloo Bhai 2', cursive, sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Sizing & Layout */
    --sidebar-collapsed: 80px;
    --sidebar-expanded: 240px;
    --border-radius: 24px;
    --border-radius-blob: 40% 60% 70% 30% / 40% 50% 60% 50%;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Spacing */
    --space-sm: clamp(0.5rem, 1vw, 1rem);
    --space-md: clamp(1rem, 2vw, 2rem);
    --space-lg: clamp(2rem, 4vw, 4rem);
    --space-xl: clamp(4rem, 8vw, 8rem);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-yellow);
    line-height: 1.2;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

p { margin-bottom: 1rem; }
a { color: var(--clr-lime); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--clr-yellow); }

/* Disclaimers */
.hero-disclaimer {
    background-color: var(--clr-danger);
    color: var(--clr-white);
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 100;
    width: 100%;
}

.global-disclaimer {
    background-color: #000;
    border-top: 2px solid var(--clr-surface);
    padding: var(--space-md);
    text-align: center;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

/* Layout System */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-collapsed);
    background-color: var(--clr-surface);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 1000;
    border-right: 4px solid var(--clr-surface-light);
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    overflow: hidden;
}

.sidebar:hover {
    width: var(--sidebar-expanded);
}

.sidebar-logo {
    padding: 20px;
    display: flex;
    align-items: center;
    height: 80px;
    white-space: nowrap;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    transition: var(--transition);
}

.sidebar-logo span {
    font-family: var(--font-heading);
    color: var(--clr-lime);
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
    transform: translateX(10px);
}

.sidebar:hover .sidebar-logo span {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    gap: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--clr-text);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
}

.sidebar-nav a i {
    font-size: 1.5rem;
    min-width: 40px;
    color: var(--clr-yellow);
    transition: var(--transition);
}

.sidebar-nav a span {
    opacity: 0;
    transition: var(--transition);
    font-weight: 600;
    transform: translateX(10px);
}

.sidebar:hover .sidebar-nav a span {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--clr-surface-light);
    color: var(--clr-yellow);
}

.sidebar-nav a:hover i {
    transform: scale(1.2) translateY(-3px);
    color: var(--clr-lime);
}

/* Monkey indicator */
.sidebar-nav a.active::before {
    content: '🐒';
    position: absolute;
    right: 10px;
    font-size: 1.2rem;
    animation: bounce 1s infinite;
    opacity: 0;
}
.sidebar:hover .sidebar-nav a.active::before {
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-collapsed);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Sidebar push behavior on desktop */
@media (min-width: 993px) {
    .sidebar:hover + .main-content {
        margin-left: var(--sidebar-expanded);
    }
}

/* UI Elements */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--clr-yellow);
    color: var(--clr-bg);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-radius: 50px;
    border: 3px solid #d4af37;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #d4af37, 0 10px 20px rgba(0,0,0,0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #d4af37, 0 15px 25px rgba(0,0,0,0.5);
    background: #ffea00;
    color: var(--clr-bg);
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #d4af37;
}

.btn::after {
    content: '🍌';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: var(--transition);
    opacity: 0;
}

.btn:hover::after {
    right: 10px;
    opacity: 1;
    animation: wiggle 0.5s infinite;
}
.btn:hover {
    padding-right: 45px;
}

.jungle-card {
    background: var(--clr-surface);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    border: 2px solid var(--clr-surface-light);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.jungle-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-lime);
    box-shadow: 0 15px 40px rgba(112, 224, 0, 0.1);
}

.organic-blob {
    border-radius: var(--border-radius-blob);
    background: linear-gradient(135deg, var(--clr-surface), var(--clr-surface-light));
}

/* Sections */
section {
    padding: var(--space-xl) var(--space-md);
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(15, 26, 16, 0.7), rgba(15, 26, 16, 0.9)), url('images/dark-jungle-hero-bg.png') center/cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--clr-text);
    margin-bottom: var(--space-md);
    font-weight: 300;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

/* Game Frame */
.game-container {
    background: #000;
    border-radius: var(--border-radius);
    padding: 10px;
    border: 4px solid var(--clr-brown);
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.2);
    position: relative;
    margin: var(--space-lg) auto;
    max-width: 1000px;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: url('images/wooden-monkey-badge.png') center/cover;
    border-radius: 50%;
    border: 3px solid var(--clr-yellow);
    z-index: 10;
}

.responsive-iframe {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: calc(var(--border-radius) - 5px);
}

.responsive-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Single Game Card */
.single-game-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.single-game-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 2px solid var(--clr-lime);
}

/* Forms */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--clr-surface-light);
    background: rgba(31, 45, 31, 0.8);
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--clr-lime);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.2);
}

/* Text Pages */
.text-page-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--clr-surface);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
}

.text-page-content h2 {
    margin-top: var(--space-md);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.text-page-content ul {
    margin-left: 20px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #050a06;
    padding: var(--space-lg) var(--space-md) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: var(--space-md);
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    font-family: var(--font-heading);
    color: var(--clr-yellow);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.footer-col h4 {
    color: var(--clr-white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--clr-text-muted);
}

.footer-links a:hover {
    color: var(--clr-lime);
    padding-left: 5px;
}

.company-info {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* Custom Cursor & Effects */
#jumping-monkey {
    width: 45px;
    height: 45px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🐒</text></svg>');
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
}

.particle {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    animation: fall linear forwards;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes wiggle {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    25% { transform: translateY(-50%) rotate(15deg); }
    75% { transform: translateY(-50%) rotate(-15deg); }
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Layout Fixes --- */

.responsive-flex-item {
    flex: 1 1 300px;
    width: 100%;
    max-width: 100%;
}

.text-page-content {
    word-break: break-word;
    overflow-wrap: break-word;
}
.text-page-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: 70px;
        flex-direction: row;
        bottom: 0;
        top: auto;
        border-right: none;
        border-top: 4px solid var(--clr-surface-light);
        z-index: 1000;
    }
    .sidebar:hover {
        width: 100%;
    }
    .sidebar-logo {
        display: none;
    }
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        align-items: center;
        width: 100%;
    }
    .sidebar-nav a {
        padding: 10px;
        flex-direction: column;
        justify-content: center;
    }
    .sidebar-nav a span {
        opacity: 1;
        font-size: 0.7rem;
        transform: none;
        margin-top: 5px;
    }
    .sidebar-nav a.active::before {
        display: none;
    }
    .main-content {
        margin-left: 0;
        margin-bottom: 70px; /* Space for bottom nav */
    }
    #jumping-monkey {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero { min-height: 70vh; }
    .footer-content { flex-direction: column; }
}

@media (max-width: 576px) {
    section {
        padding: var(--space-lg) var(--space-sm);
    }
    .text-page-content {
        padding: var(--space-md);
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .feature-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .responsive-flex-item {
        flex: 1 1 100%;
    }
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .footer-col {
        min-width: 100%;
    }
}