:root {
    /* Colors inspired by the user's logo */
    --jungle-green: #1E5631;
    --leaf-green: #4A7C35;
    --sunset-orange: #F58F29;
    --sunset-yellow: #FFC107;
    --cream-bg: #FDF8E4;
    --earth-brown: #5D4037;
    --text-dark: #2C3E50;
    --white: #ffffff;

    /* Gradients */
    --sunset-gradient: linear-gradient(180deg, #F58F29 0%, #FFC107 100%);
    --sky-gradient: linear-gradient(180deg, #87CEEB 0%, #FDF8E4 100%);

    /* Night Mode Variables */
    --night-bg: #0f172a;
    --night-gradient: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --star-color: #ffffff;
}

/* Theme Toggle Button */
.theme-btn {
    background: none;
    border: 2px solid var(--jungle-green);
    color: var(--jungle-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.theme-btn:hover {
    background: var(--jungle-green);
    color: var(--white);
    transform: rotate(15deg);
}

/* Navbar Dark Mode */
body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .nav-links a,
body.dark-mode .theme-btn,
body.dark-mode .hamburger {
    color: var(--sunset-yellow);
    border-color: var(--sunset-yellow);
}

body.dark-mode .theme-btn:hover {
    background: var(--sunset-yellow);
    color: var(--night-bg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--cream-bg);
    color: var(--text-dark);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Fredoka', sans-serif;
    /* Friendly, round, slightly playful */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-left: auto;
    /* Pushes menu to the right */
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--jungle-green);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover,
.dropdown:hover .dropbtn {
    color: var(--sunset-orange);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 10px;
    padding: 0.5rem 0;
    top: 100%;
    /* Below the link */
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 1rem;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--cream-bg);
    color: var(--sunset-orange);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s;
}

/* Night Mode Dropdown */
body.dark-mode .dropdown-content {
    background-color: #1e293b;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-content a {
    color: var(--white);
}

body.dark-mode .dropdown-content a:hover {
    background-color: #334155;
    color: var(--sunset-yellow);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--jungle-green);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-top: 60px;
    /* Offset for navbar */
    background: linear-gradient(180deg, #FF9933 0%, #FFD700 60%, #FDF8E4 100%);
    /* Sunset sky */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.sun {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, #FFD700 0%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 1s ease;
    /* Smooth transition for Sun -> Moon */
}

/* Night Mode Overrides */
body.dark-mode {
    background-color: var(--night-bg);
    color: var(--cream-bg);
}

body.dark-mode .hero {
    background: var(--night-gradient) !important;
}

body.dark-mode .sun {
    background: radial-gradient(circle, #E0E0E0 0%, rgba(224, 224, 224, 0) 70%);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 1;
}

/* Masking the sun to make a crescent moon */
body.dark-mode .sun::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 15%;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 50%;
    box-shadow: -15px 10px 0 0 var(--night-bg);
    /* Use night bg color to cut */
    opacity: 0;
    /* Animated in script or keep simple circle for now */
}

/* Constellation Canvas */
#constellationCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

body.dark-mode #constellationCanvas {
    opacity: 1;
}

body.dark-mode .hero-content h1 {
    color: var(--white);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

body.dark-mode .hero-content p {
    color: var(--sunset-yellow);
}

body.dark-mode .services,
body.dark-mode .card,
body.dark-mode .contact {
    background-color: #1e293b;
    color: var(--white);
}

body.dark-mode .card {
    border-bottom-color: var(--sunset-yellow);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    background-color: #334155;
}

body.dark-mode .card h3 {
    color: var(--sunset-yellow);
}

.silhouettes {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
}

.tree {
    position: absolute;
    bottom: 0;
    right: 5%;
    width: 300px;
    height: 300px;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/svgs/solid/tree.svg');
    /* Using FontAwesome SVG or CSS shape fallback */
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.2;
    /* Silhouette */
}

/* CSS Tree fallback */
.tree {
    background: none;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 200px solid var(--jungle-green);
    border-radius: 50px;
}

.tree::after {
    content: '';
    position: absolute;
    top: 50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: var(--jungle-green);
    border-radius: 50%;
}

.hero-content {
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
    /* Enable 3D perspective */
    perspective: 1000px;
    margin-bottom: 5rem;
    /* Shift content up to avoid overlap with walking data */
}

.logo-3d-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-3d {
    width: 450px;
    height: auto;
    /* Attempt to blend white background if present */
    mix-blend-mode: multiply;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    animation: float-3d 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float-3d {

    0%,
    100% {
        transform: translateY(0) rotateY(-5deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-20px) rotateY(5deg) rotateX(-5deg);
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--jungle-green);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.hero-content .highlight {
    color: var(--sunset-orange);
    font-size: 4rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    /* Reduced further to move button up */
    color: var(--earth-brown);
    font-weight: 600;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--jungle-green);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(30, 86, 49, 0.3);
}

.cta-btn:hover {
    transform: translateY(-3px);
    background-color: var(--leaf-green);
}

/* Walking Data Animation Container */
.walking-data-container {
    position: absolute;
    bottom: 1rem;
    /* Lowered from 5vh to avoid overlap */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 100px;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

/* Typing Cursor */
.typing-cursor {
    display: inline-block;
    color: var(--sunset-orange);
    margin-left: 5px;
    animation: blinkCursor 0.7s infinite;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.log {
    position: absolute;
    bottom: 0px;
    width: 100%;
    height: 15px;
    background: var(--earth-brown);
    border-radius: 10px;
}

.walker {
    font-size: 3rem;
    color: var(--jungle-green);
    margin: 0 20px;
    animation: walk-bounce 1s infinite alternate ease-in-out;
    position: relative;
    bottom: 10px;
}

.delay-1 {
    animation-delay: 0s;
    color: var(--sunset-orange);
}

.delay-2 {
    animation-delay: 0.3s;
    color: var(--jungle-green);
}

.delay-3 {
    animation-delay: 0.6s;
    color: #2980b9;
}

@keyframes walk-bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-10px);
    }
}

/* Services Section */
.services {
    padding: 5rem 5%;
    text-align: center;
    background-color: var(--white);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--jungle-green);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--sunset-orange);
    font-weight: 700;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--cream-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-bottom: 5px solid var(--sunset-orange);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-10px);
}

.icon-box {
    font-size: 3rem;
    color: var(--jungle-green);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--earth-brown);
}

/* About Section */
.about {
    padding: 5rem 5%;
    background-color: var(--leaf-green);
    /* Green background shift */
    color: var(--white);
    display: flex;
    justify-content: center;
}

.about-content {
    display: flex;
    align-items: center;
    max-width: 1000px;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--sunset-yellow);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.circle-graphic {
    width: 250px;
    height: 250px;
    background: var(--sunset-orange);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: var(--cream-bg);
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.1);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 30px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Contact */
.contact {
    padding: 5rem 5%;
    text-align: center;
    background-color: var(--earth-brown);
    color: var(--cream-bg);
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--sunset-yellow);
}

.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border-radius: 10px;
    border: none;
    font-family: inherit;
}

.submit-btn {
    padding: 1rem;
    background-color: var(--sunset-orange);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background-color: #d67a1f;
}

/* Footer */
footer {
    padding: 2rem;
    background-color: #3e2b25;
    color: var(--cream-bg);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.socials a {
    color: var(--cream-bg);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--sunset-orange);
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add JS toggle later */
    }

    .hamburger {
        display: block;
    }
}

/* --- 3D & Animation Upgrade --- */

/* Global 3D Card Tilt */
.card {
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    /* Super fast for mouse movement */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:hover {
    /* Lift up slightly on hover before tilt takes over */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
    z-index: 10;
}

.icon-box {
    transform: translateZ(20px);
    /* Pop out icon */
    transform-style: preserve-3d;
}

.card h3,
.card p {
    transform: translateZ(10px);
    /* Pop out text slightly */
}

/* Home Parallax Elements */
.hero-content {
    /* Ensure content stays on top of parallax layers */
    position: relative;
    transform-style: preserve-3d;
}

.hero-bg .silhouettes {
    /* Separate layers for parallax */
    transform-style: preserve-3d;
}

/* Data Pipes (Integration) */
.pipe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.3;
}

.pipe {
    position: absolute;
    width: 200px;
    height: 10px;
    background: linear-gradient(90deg, transparent, var(--sunset-orange), transparent);
    animation: flowPipe 3s linear infinite;
    transform: rotate(-45deg);
    box-shadow: 0 0 10px var(--sunset-orange);
}

@keyframes flowPipe {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(-45deg);
    }

    100% {
        transform: translateX(200%) translateY(200%) rotate(-45deg);
    }
}

/* Shield (Governance) */
.shield-container {
    perspective: 800px;
    width: 200px;
    height: 200px;
    position: absolute;
    right: 10%;
    top: 20%;
    opacity: 0.6;
}

.shield-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateShield 10s linear infinite;
}

.shield-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: var(--sunset-yellow);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    backface-visibility: visible;
}

@keyframes rotateShield {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* Floating Cubes (Marketplace) */
.cube-wrap {
    perspective: 800px;
    position: absolute;
    width: 100px;
    height: 100px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(-20deg);
    animation: spinCube 8s linear infinite;
}

.cube div {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(30, 86, 49, 0.4);
    /* Jungle Green Transparent */
    border: 2px solid var(--sunset-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(30, 86, 49, 0.2);
}

.cube .front {
    transform: translateZ(50px);
}

.cube .back {
    transform: rotateY(180deg) translateZ(50px);
}

.cube .right {
    transform: rotateY(90deg) translateZ(50px);
}

.cube .left {
    transform: rotateY(-90deg) translateZ(50px);
}

.cube .top {
    transform: rotateX(90deg) translateZ(50px);
}

.cube .bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

@keyframes spinCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Cloud Depth (Cloud Mod) */
.cloud-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cloud-item {
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    filter: blur(1px);
    animation: floatCloud linear infinite;
}

@keyframes floatCloud {
    from {
        transform: translateX(100vw);
    }

    to {
        transform: translateX(-200px);
    }
}

/* --- The Signal Fire (Contact FX) 🔥 --- */
@keyframes blast {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(255, 107, 107, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

.blast-effect {
    animation: blast 0.5s ease-out;
    background-color: var(--jungle-green) !important;
    color: white !important;
}

/* Success Message Override */
.contact-form.success input,
/* --- Phase 9: Royal Polish 👑 --- */

/* 1. Preloader ☀️ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    /* Topmost */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.loader-content {
    text-align: center;
    color: var(--sunset-orange);
}

.pulse-logo {
    width: 150px;
    animation: pulse 1.5s infinite;
    margin-bottom: 1rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* 2. Cookie Jar 🍪 */
.cookie-jar {
    position: fixed;
    bottom: -100px;
    /* Hidden initially */
    left: 20px;
    right: 20px;
    /* Full width on mobile */
    max-width: 400px;
    /* Limited on desktop */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .cookie-jar {
    background: rgba(30, 41, 59, 0.95);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.cookie-jar.show {
    bottom: 20px;
}

.cookie-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cookie-btns {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.cookie-btn:hover {
    transform: scale(1.05);
}

.cookie-btn.accept {
    background: var(--jungle-green);
    color: white;
}

.cookie-btn.reject {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
}

body.dark-mode .cookie-btn.reject {
    color: #aaa;
    border-color: #555;
}

/* 3. Back to Top ☝️ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--sunset-orange);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9990;
    /* Below cookie, above content */
    opacity: 0;
    visibility: hidden;
    /* Prevent clicking when hidden */
    transform: translateY(20px);
    transition: all 0.3s;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--sunset-yellow);
    transform: translateY(-5px);
}

/* Adjustments for mobile to avoid overlap */
@media (max-width: 768px) {
    .cookie-jar {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .back-to-top {
        bottom: 90px;
        /* Above bottom bar/nav if any */
    }
}

/* 3D Rings (Data Integration) */
.integration-wrapper {
    position: absolute;
    top: 50%;
    left: 80%;
    /* Positioned to the right */
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    perspective: 1000px;
    z-index: 1;
    opacity: 0.8;
}

.ring-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid transparent;
    border-top: 10px solid var(--sunset-orange);
    border-bottom: 10px solid var(--jungle-green);
    transform-style: preserve-3d;
    animation: spinRing 10s linear infinite;
    box-shadow: 0 0 20px rgba(245, 143, 41, 0.5);
}

.ring-3d:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top: 10px solid var(--sunset-yellow);
    border-bottom: 10px solid var(--earth-brown);
    animation-direction: reverse;
    animation-duration: 7s;
}

.ring-3d:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top: 10px solid var(--white);
    border-bottom: 10px solid var(--leaf-green);
    animation-duration: 5s;
}

/* Core Orb */
.core-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--sunset-yellow), var(--sunset-orange));
    border-radius: 50%;
    box-shadow: 0 0 30px var(--sunset-yellow);
    animation: pulseCore 2s infinite ease-in-out;
}

@keyframes spinRing {
    0% {
        transform: rotateX(60deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(60deg) rotateZ(360deg);
    }
}

@keyframes pulseCore {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

@media (max-width: 768px) {
    .integration-wrapper {
        left: 50%;
        top: 20%;
        width: 200px;
        height: 200px;
        opacity: 0.4;
    }
}

/* --- Circle of Data Section --- */
.circle-section {
    padding: 5rem 5%;
    text-align: center;
    background-color: var(--cream-bg);
    overflow: hidden;
}

body.dark-mode .circle-section {
    background-color: var(--night-bg);
}

.circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem;
}

.circle-diagram {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    animation: rotateDiagram 60s linear infinite;
    /* Slow rotation */
}

/* Segments */
.circle-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s;
    overflow: hidden;
}

/* Coloring and Positioning */
.segment-1 {
    background-color: var(--jungle-green);
    top: 0;
    left: 0;
    border-radius: 100% 0 0 0;
}

.segment-2 {
    background-color: var(--sunset-orange);
    top: 0;
    left: 50%;
    border-radius: 0 100% 0 0;
}

.segment-3 {
    background-color: var(--earth-brown);
    top: 50%;
    left: 50%;
    border-radius: 0 0 100% 0;
}

.segment-4 {
    background-color: var(--sunset-yellow);
    top: 50%;
    left: 0;
    border-radius: 0 0 0 100%;
}

/* Content inside segments */
.segment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    transform: rotate(45deg);
    /* Counter-rotate if needed, depends on segment */
    pointer-events: none;
}

.segment-1 .segment-content {
    transform: translate(30%, 30%) rotate(-45deg);
}

.segment-2 .segment-content {
    transform: translate(-30%, 30%) rotate(45deg);
}

.segment-3 .segment-content {
    transform: translate(-30%, -30%) rotate(-45deg);
}

.segment-4 .segment-content {
    transform: translate(30%, -30%) rotate(45deg);
    color: var(--earth-brown);
}

/* Hover Effects */
.circle-segment:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.segment-detail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    /* Wider than center hole */
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 10px;
    z-index: 20;
    color: var(--text-dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .segment-detail {
    background: rgba(30, 41, 59, 0.95);
    color: var(--white);
}

.circle-segment:hover .segment-detail {
    opacity: 1;
}

/* Center Hole/Label */
.circle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-color: var(--cream-bg);
    border-radius: 50%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .circle-center {
    background-color: var(--night-bg);
    color: var(--white);
    border: 2px solid var(--sunset-yellow);
}

.circle-center h3 {
    margin: 0;
    color: var(--jungle-green);
    font-size: 1.5rem;
}

body.dark-mode .circle-center h3 {
    color: var(--sunset-yellow);
}

@keyframes rotateDiagram {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Stop rotation on hover to make reading easier */
.circle-diagram:hover {
    animation-play-state: paused;
}

/* Counter-rotate content so it stays upright? 
   Actually, with the rotation animation, text will spin. 
   Let's remove the segment content rotation compensation or keep it static relative to segment.
   The user will read it as it spins. */

/* --- Simba AI Chat Widget 🦁 --- */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Nunito', sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--sunset-orange), var(--sunset-yellow));
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: bounceIn 2s infinite;
}

/* --- Live Data Stats 📊 --- */
.stats-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 3rem 10%;
    background: linear-gradient(135deg, var(--jungle-green), #2ecc71);
    color: white;
    flex-wrap: wrap;
    gap: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

body.dark-mode .stats-section {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.stat-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .stat-item i {
    color: var(--sunset-yellow);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* --- Newsletter 📩 --- */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 5% 1rem;
    text-align: center;
}

body.dark-mode footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-container h3 {
    color: var(--sunset-yellow);
    margin-bottom: 0.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.newsletter-form input {
    padding: 0.8rem;
    border-radius: 5px;
    border: none;
    flex: 1;
    font-family: inherit;
}

.newsletter-form button {
    background-color: var(--sunset-orange);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--jungle-green);
}

/* --- Language Support (Arabic/RTL) 🌙 --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

.lang-btn {
    background: transparent;
    border: 2px solid var(--jungle-green);
    color: var(--jungle-green);
    font-weight: bold;
    border-radius: 5px;
    padding: 5px 10px;
    margin-right: 10px;
    margin-left: 20px;
    /* Added separation from nav links */
    cursor: pointer;
    font-family: inherit;
    /* Inherits Cairo in RTL */
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--jungle-green);
    color: white;
}

body.dark-mode .lang-btn {
    border-color: var(--sunset-yellow);
    color: var(--sunset-yellow);
}

body.dark-mode .lang-btn:hover {
    background: var(--sunset-yellow);
    color: var(--night-bg);
}

/* RTL Global Overrides */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Nunito', sans-serif;
}

body.rtl .nav-links {
    margin-left: 0;
    margin-right: auto;
    padding-right: 0;
}

body.rtl .lang-btn {
    margin-right: 0;
    margin-left: 10px;
}

/* Fix direction of lists and flex items */
body.rtl .nav-links li,
body.rtl .services-grid,
body.rtl .footer-content {
    direction: rtl;
}

/* Flip Icons if needed (e.g. arrows) */
body.rtl .fa-arrow-right {
    transform: rotate(180deg);
}

/* Specific component tweaks */
body.rtl .typing-cursor {
    margin-left: 0;
    margin-right: 5px;
}

body.rtl .chat-widget {
    left: 30px;
    right: auto;
}

body.rtl .chat-window {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

/* --- Tech Stack Marquee 🤝 --- */
.tech-marquee {
    background: var(--text-dark);
    padding: 2rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-top: 2px solid var(--jungle-green);
    border-bottom: 2px solid var(--jungle-green);
}

body.dark-mode .tech-marquee {
    background: #0f172a;
    border-color: var(--sunset-yellow);
}

.marquee-content {
    display: inline-block;
    animation: scrollText 20s linear infinite;
}

.marquee-content span {
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 3rem;
    transition: color 0.3s;
}

.marquee-content span i {
    color: var(--jungle-green);
    margin-right: 10px;
}

body.dark-mode .marquee-content span i {
    color: var(--sunset-yellow);
}

.marquee-content span:hover {
    color: white;
    transform: scale(1.1);
}

/* --- The Lion Guard (Team) 🛡️ --- */
.team-section {
    padding: 4rem 10%;
    text-align: center;
    background-color: #f9f9f9;
}

body.dark-mode .team-section {
    background-color: #1e293b;
}

.team-grid {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.team-card {
    background-color: transparent;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    /* Enable 3D effect */
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.team-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* --- Roars of Success (Testimonials) 🗣️ --- */
.testimonials-section {
    padding: 4rem 10%;
    text-align: center;
    background: var(--text-dark);
    color: white;
}

body.dark-mode .testimonials-section {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    width: 300px;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-card h4 {
    color: var(--sunset-yellow);
    margin-bottom: 0.5rem;
}

.stars {
    color: #FFD700;
    /* Gold */
    font-size: 1.2rem;
    display: inline-block;
}



/* --- ROI Hunter (Calculator) 💰 --- */
.roi-section {
    padding: 4rem 10%;
    background: #f8f9fa;
    text-align: center;
}

body.dark-mode .roi-section {
    background: #0f172a;
}

.calculator-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .calculator-container {
    background: #1e293b;
}

.calc-input {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.calc-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.calc-input input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #f9f9f9;
}

body.dark-mode .calc-input input {
    background: #334155;
    border-color: #444;
    color: white;
}

.calc-btn {
    width: 100%;
    padding: 10px;
    background: var(--jungle-green);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.calc-btn:hover {
    background: var(--sunset-orange);
}

.calc-output {
    flex: 1;
    min-width: 250px;
    background: var(--jungle-green);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.savings-display {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* --- Partners of the Pride 🤝 --- */
.partners-section {
    padding: 3rem 10%;
    text-align: center;
    background: white;
}

body.dark-mode .partners-section {
    background: #020617;
}

.logo-carousel {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 2rem;
    opacity: 0.7;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2rem;
    color: #888;
    transition: all 0.3s;
    cursor: pointer;
}

.partner-logo span {
    font-size: 1rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.partner-logo:hover {
    color: var(--jungle-green);
    transform: scale(1.1);
    opacity: 1;
}

.partner-logo:hover span {
    opacity: 1;
}

/* --- Jungle Journal 📰 --- */
.journal-section {
    padding: 4rem 10%;
    background: #f0fdf4;
}

body.dark-mode .journal-section {
    background: #064e3b;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.journal-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

body.dark-mode .journal-card {
    background: #1e293b;
    color: white;
}

.journal-card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 1.5rem;
    text-align: left;
}

.tag {
    background: var(--jungle-green);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.journal-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--sunset-orange);
    font-weight: bold;
    text-decoration: none;
}

/* --- Build Your Totem (Configurator) 🗿 --- */
.configurator-section {
    padding: 4rem 10%;
    background: #f0f0f0;
}

body.dark-mode .configurator-section {
    background: #1e293b;
}

.config-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.dark-mode .config-container {
    background: #334155;
    color: white;
}

.config-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 2rem;
}

.service-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.config-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: background 0.3s;
}

.config-option:hover {
    background: rgba(30, 215, 96, 0.1);
}

.config-option input {
    margin-right: 15px;
    transform: scale(1.5);
    cursor: pointer;
}

.totem-display {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.power-bar-container {
    width: 60px;
    height: 200px;
    background: #ddd;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 4px solid var(--text-dark);
}

.power-bar {
    width: 100%;
    background: linear-gradient(to top, var(--sunset-orange), var(--sunset-yellow));
    position: absolute;
    bottom: 0;
    transition: height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#totem-score {
    font-size: 2rem;
    color: var(--jungle-green);
}

#totem-time {
    font-weight: bold;
    color: #666;
}

body.dark-mode #totem-time {
    color: #aaa;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.card-front {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .card-front {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.05);
}

.card-back {
    background: linear-gradient(135deg, var(--sunset-orange), var(--sunset-yellow));
    color: white;
    transform: rotateY(180deg);
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1.5rem;
    border: 4px solid var(--jungle-green);
}

.team-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.role {
    color: var(--jungle-green);
    font-weight: bold;
}

.join-btn {
    background: white;
    color: var(--sunset-orange);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    margin-top: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

/* --- Data Health Quiz 📝 --- */
.quiz-trigger {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--jungle-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    /* Below chat widget */
    transition: transform 0.3s;
    font-family: inherit;
}

.quiz-trigger:hover {
    transform: scale(1.05);
}

.quiz-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.quiz-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s;
}

body.dark-mode .quiz-content {
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-quiz {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close-quiz:hover {
    color: var(--sunset-orange);
}

.quiz-header h2 {
    color: var(--jungle-green);
    margin-bottom: 0.5rem;
}

.quiz-step {
    display: none;
    animation: fadeIn 0.5s;
}

.quiz-step.active {
    display: block;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: transparent;
    border: 2px solid var(--jungle-green);
    color: var(--text-dark);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    font-family: inherit;
}

body.dark-mode .option-btn {
    color: white;
    border-color: var(--sunset-yellow);
}

.option-btn:hover {
    background: var(--jungle-green);
    color: white;
    transform: translateX(5px);
}

body.dark-mode .option-btn:hover {
    background: var(--sunset-yellow);
    color: var(--night-bg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    font-size: 0.8rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid white;
}

@keyframes bounceIn {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    pointer-events: none;
}

.chat-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

body.dark-mode .chat-window {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header {
    background: linear-gradient(135deg, var(--jungle-green), #2ecc71);
    padding: 1rem;
    display: flex;
    align-items: center;
    color: white;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    font-size: 1.2rem;
}

.chat-title h4 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-title .status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.chat-title .status::before {
    content: '•';
    color: #accf85;
    /* light green */
    margin-right: 3px;
}

.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background-color: #f1f5f9;
    color: #334155;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}

body.dark-mode .message.bot {
    background-color: #334155;
    color: white;
}

.message.user {
    background-color: var(--sunset-orange);
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chat-chip {
    background: transparent;
    border: 1px solid var(--sunset-orange);
    color: var(--sunset-orange);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-chip:hover {
    background: var(--sunset-orange);
    color: white;
}

body.dark-mode .chat-chip {
    border-color: var(--sunset-yellow);
    color: var(--sunset-yellow);
}

body.dark-mode .chat-chip:hover {
    background: var(--sunset-yellow);
    color: var(--night-bg);
}