:root {
    --slate-black: #0c0e12;
    --slate-gray: #161b22;
    --emerald-green: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.4);
    --cyan-accent: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.4);
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.08);
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--slate-black);
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--emerald-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--emerald-glow);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}


.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

#orb1 {
    background: var(--emerald-green);
    top: -200px;
    left: -200px;
}

#orb2 {
    background: var(--cyan-accent);
    bottom: -200px;
    right: -200px;
}

header {
    padding: 0.8rem 5% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: rgba(12, 14, 18, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 99999 !important;
    border-bottom: 1px solid var(--border-glass) !important;
    transform: translateZ(0);
}


body {
    padding-top: 90px !important;
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
}

.nav-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.accent {
    color: var(--emerald-green);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--emerald-green);
    opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--slate-gray);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        padding: 40px;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

.btn-github {
    background: white;
    color: black !important;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700 !important;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-github:hover {
    transform: scale(1.05);
}

/* Section Title */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, white 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero */
.hero {
    padding: 40px 5% 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 950;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}




.gradient-text {
    background: linear-gradient(90deg, var(--emerald-green), var(--cyan-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.6;
}


.hero-btns {
    display: flex;
    gap: 20px;
}

.btn-primary {
    background: var(--emerald-green);
    color: var(--slate-black);
    padding: 16px 40px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 30px var(--emerald-glow);
    transition: 0.4s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    padding: 16px 40px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--emerald-glow);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--emerald-green);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.logo-container {
    position: relative;
    width: 480px;
    max-width: 100%;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-logo {
    width: 400px;
    max-width: 100%;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 50px var(--emerald-glow));
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
    animation: pulse 4s ease-out infinite;
}

/* Features */
.features {
    padding: 120px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--slate-gray);
    padding: 48px 40px;
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    transition: 0.5s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--x) var(--y), rgba(16, 185, 129, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--emerald-green);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: block;
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: white;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Mission */
.mission {
    padding: 120px 5%;
    background: linear-gradient(180deg, var(--slate-black) 0%, #11151c 100%);
}

.mission-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 80px;
}

.mission-text {
    flex: 1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-areas:
        "badge stats"
        "title stats"
        "desc stats"
        "list stats"
        "btn stats";
    gap: 0 80px;
    align-items: center;
}

.mission-text .badge {
    grid-area: badge;
    justify-self: start;
    width: fit-content;
    margin-bottom: 24px;
}

.mission-text h2 {
    grid-area: title;
    margin-bottom: 20px;
}

.mission-text p {
    grid-area: desc;
    margin-bottom: 32px;
}

.mission-text .mission-stats {
    grid-area: stats;
}

.mission-text .mission-list {
    grid-area: list;
    justify-self: start;
    margin-bottom: 32px;
}

.mission-text a {
    grid-area: btn;
    justify-self: start;
    width: fit-content !important;
    display: inline-flex !important;
}




.badge {
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.mission-text h2 {
    font-size: 3rem;
    margin-bottom: 32px;
    font-weight: 850;
}

.mission-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.mission-list {
    list-style: none;
    display: grid;
    gap: 16px;
}

.mission-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
}


.mission-list li i {
    font-style: normal;
    color: var(--emerald-green);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mission-stats {
    flex: 1;
    display: grid;
    gap: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-val {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--emerald-green);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 8px;
    display: block;
}

/* Tech Stack Pills */
.tech-stack {
    padding: 80px 5%;
    text-align: center;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    transition: 0.3s;
}

.tech-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-green);
    border-color: var(--emerald-green);
    transform: translateY(-3px);
}

/* Documentation & Sidebar Sidebar Styles */
.docs {
    padding: 120px 5%;
}

.docs-wrapper {
    display: flex;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.docs-sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.4s;
    cursor: pointer;
}

.step-item.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--emerald-green);
    color: white;
}

.docs-container {
    flex: 1;
    background: var(--slate-gray);
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.docs-tabs {
    display: flex;
    background: #0c0e12;
    border-bottom: 1px solid var(--border-glass);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 20px 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
    border-right: 1px solid var(--border-glass);
    transition: 0.3s;
    white-space: nowrap;
}

.tab.active {
    background: var(--slate-gray);
    color: var(--emerald-green);
    font-weight: 700;
}

.code-editor {
    padding: 40px;
    background: #0d0f14;
    font-family: 'JetBrains Mono', monospace;
    overflow-x: auto;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    overflow: hidden;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.filename {
    margin-left: 15px;
    color: var(--emerald-green);
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

pre {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.8;
    overflow-x: auto;
    max-width: 100%;
    word-break: break-word;
}

/* Partners */
.partners {
    padding: 120px 5%;
    text-align: center;
}

.partner-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: 0.4s;
    width: 150px;
}

.partner-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    transition: 0.4s;
}

.partner-card span {
    font-weight: 700;
    color: var(--text-white);
    font-size: 1rem;
    text-align: center;
}

.partner-card:hover img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

.partner-card:hover span {
    color: white;
}

/* FAQ */
.faq {
    padding: 120px 5%;
    max-width: 900px;
    margin: 0 auto;
}

.faq-accordion {
    display: grid;
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item summary {
    padding: 24px 32px;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.faq-item summary::after {
    content: '→';
    color: var(--emerald-green);
    transition: 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(90deg);
}

.faq-content {
    padding: 0 32px 32px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Live Kamus */
.live-kamus {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.kamus-container {
    background: var(--slate-gray);
    padding: 60px;
    border-radius: 40px;
    border: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.kamus-info {
    flex: 1;
    text-align: left;
}

.kamus-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.kamus-preview-box {
    flex: 1.2;
    background: rgba(0, 0, 0, 0.2);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border-glass);
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px;
}

.kamus-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 10px 24px;
    border-radius: 100px;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.toggle-btn.active {
    background: var(--emerald-green);
    color: var(--slate-black);
    border-color: var(--emerald-green);
    box-shadow: 0 5px 15px var(--emerald-glow);
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 20px 60px 20px 30px;
    border-radius: 100px;
    color: white;
    font-size: 1.2rem;
    font-family: inherit;
    transition: 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--emerald-green);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px var(--emerald-glow);
}

.search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.5;
}

.kamus-result {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-grid {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border-glass);
    animation: fadeIn 0.4s ease-out;
    text-align: left;
}

.word-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.word-group .from {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emerald-green);
}

.word-group .arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.word-group .to {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.result-examples-dual {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ex-label {
    font-size: 0.75rem;
    color: var(--emerald-green);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px;
}

.ex-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

.ex-text b {
    color: var(--emerald-green);
    font-size: 0.75rem;
    margin-right: 6px;
    font-style: normal;
    text-transform: uppercase;
}


.placeholder-text,
.no-result {
    color: var(--text-muted);
    font-style: italic;
}

.no-result {
    color: #ff5f56;
}

/* Footer */
footer {
    padding: 100px 5% 40px;
    border-top: 1px solid var(--border-glass);
    background: #080a0e;
    text-align: center;
}

.footer-info h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-info p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.socials {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-bottom: 48px;
}

.socials a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.7;
    transition: 0.3s;
}

.socials a:hover {
    opacity: 1;
    color: var(--cyan-accent);
}

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

.copyright a {
    color: var(--emerald-green);
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-wrapper {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        justify-content: flex-start;
    }

    .step-item {
        white-space: nowrap;
        flex: 0 0 auto;
        padding: 16px 20px;
        font-size: 0.85rem;
    }

    .hero-visual {
        display: none !important;
    }

    .hero {
        padding: 10px 5% 30px;
        text-align: center;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 0 auto 30px;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .mission-text {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        margin-top: 60px;
    }

    .mission-text .badge {
        margin-bottom: 20px;
    }

    .mission-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 30px;
    }

    .mission-list li {
        text-align: left;
        font-size: 0.95rem;
    }

    .mission-text a {
        width: fit-content !important;
        margin: 0 auto;
    }


    .mission-stats {
        margin: 20px 0 30px;
    }

    .mission-stats {
        display: flex;
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }

    .stat-card {
        padding: 15px;
        min-width: 0;
        flex: 1;
    }

    .stat-val {
        font-size: 1.8rem;
    }

    .partner-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }

    .partner-card {
        width: 100%;
    }

    .partner-card img {
        height: 80px;
    }

    .partner-card span {
        font-size: 0.9rem;
    }

    .faq-accordion {
        gap: 10px;
    }

    .faq-item summary {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .faq-content {
        padding: 0 20px 20px;
        font-size: 0.9rem;
    }

    .features,
    .mission,
    .docs,
    .partners,
    .faq {
        padding: 40px 5%;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-card h3 {
        font-size: 1.4rem;
    }

    .tech-stack {
        padding: 30px 5%;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }

    .code-editor {
        padding: 20px;
    }

    .tab {
        padding: 14px 18px;
        font-size: 0.8rem;
    }

    .kamus-container {
        padding: 40px 24px;
        gap: 30px;
        border-radius: 24px;
    }
}


@media (max-width: 600px) {
    .kamus-container {
        flex-direction: column;
        padding: 24px 16px;
        gap: 20px;
        text-align: center;
        border-radius: 20px;
    }

    .kamus-info {
        text-align: center;
    }

    .kamus-info .section-title {
        text-align: center !important;
        font-size: 1.5rem;
    }

    .kamus-desc {
        font-size: 0.95rem;
    }

    .kamus-preview-box {
        padding: 20px 12px;
        width: 100%;
        border-radius: 16px;
    }

    .search-box input {
        font-size: 1rem;
        padding: 16px 50px 16px 20px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .mission-text h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .hero-btns {
        flex-direction: column;
    }

    .word-group {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        width: 100%;
    }

    .word-group .arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
    }

    .word-group .from,
    .word-group .to {
        font-size: 1.2rem;
        display: block;
    }

    .glow-orb {
        width: 300px;
        height: 300px;
    }

    .live-kamus {
        padding: 40px 4%;
    }

    .code-editor {
        padding: 16px;
    }

    .tab {
        padding: 12px 14px;
        font-size: 0.75rem;
    }

    .filename {
        font-size: 0.75rem;
    }

    footer {
        padding: 60px 5% 30px;
    }

    .footer-info h3 {
        font-size: 1.5rem;
    }

    .footer-info p {
        font-size: 0.95rem;
    }

    .socials {
        gap: 20px;
    }

    .toggle-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }

    .feature-card {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    .feature-card p {
        font-size: 0.95rem;
    }

    .feature-card .icon {
        font-size: 2.2rem;
    }

    .tech-item {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 12px;
    }

    .docs-container {
        border-radius: 16px;
    }
}

/* Modal Usulan Kosakata */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--slate-gray);
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    padding: 40px;
    transform: translateY(20px);
    transition: 0.3s;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: white;
}

.modal h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 800;
}

.modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--emerald-green);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.form-actions button {
    flex: 1;
    cursor: pointer;
    font-family: inherit;
}

#msg-box {
    margin-top: 20px;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

#msg-box.error {
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
    border: 1px solid rgba(255, 95, 86, 0.2);
    display: block;
}

#msg-box.success {
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    border: 1px solid rgba(39, 201, 63, 0.2);
    display: block;
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-start;
        padding-top: 40px;
        overflow-y: auto;
    }

    .modal {
        padding: 30px 20px;
        border-radius: 20px;
        max-height: none;
        margin-bottom: 40px;
    }

    .modal h3 {
        font-size: 1.5rem;
    }

    .modal p {
        margin-bottom: 20px;
    }
}

/* Contributors Section */
.contributors-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px auto 35px;
    /* Center with margin auto */
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    cursor: pointer;
    transition: 0.3s;
    justify-content: center;
    /* Centered */
    width: fit-content;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contributors-bar:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--emerald-green);
}

.collab-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--emerald-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collab-names {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.collab-more {
    font-size: 0.8rem;
    background: var(--emerald-green);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 700;
}

/* Modal Contributors */
.modal-contributors .modal {
    max-width: 400px;
    text-align: center;
}

.contributor-list {
    margin-top: 20px;
}

.contributor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-glass);
}

.contributor-name {
    font-weight: 600;
    color: white;
}

.contributor-count {
    font-size: 0.85rem;
    color: var(--emerald-green);
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Word of the Day Modal - Premium Popup */
.wotd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wotd-modal.active {
    opacity: 1;
    visibility: visible;
}

.wotd-modal-content {
    background: linear-gradient(135deg, var(--slate-gray) 0%, #1a202c 100%);
    border: 1px solid var(--border-glass);
    border-radius: 40px;
    padding: 60px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.wotd-modal.active .wotd-modal-content {
    transform: scale(1) translateY(0);
}

.wotd-badge {
    color: var(--emerald-green);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.85rem;
    margin-bottom: 25px;
    display: block;
}

.wotd-popup-word {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    margin-bottom: 15px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wotd-popup-meaning {
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 600;
}

.wotd-popup-example {
    font-style: italic;
    color: var(--emerald-green);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.9;
}

.btn-close-wotd {
    background: var(--emerald-green);
    color: var(--slate-black);
    width: 100%;
    padding: 18px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 25px var(--emerald-glow);
}

.btn-close-wotd:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--emerald-glow);
}




/* Wisdom Section (Peribahasa) - Clean & Direct */
.wisdom-section {
    padding: 60px 5%;
    background: transparent;
    text-align: center;
}

.wisdom-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 0;
    background: none;
    border: none;
}

.wisdom-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    color: var(--emerald-green);
    opacity: 0.2;
    line-height: 1;
}

.wisdom-text {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 15px;
    color: white;
    font-style: italic;
    letter-spacing: -1px;
}

.wisdom-meaning {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
}


.wisdom-label {
    color: var(--emerald-green);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 12px;
    display: block;
}


/* Gallery Section */
.gallery-section {
    padding: 100px 0;
    background: var(--slate-black);
    overflow: hidden;
}

.gallery-track {
    display: flex;
    gap: 20px;
    padding: 0 5%;
    animation: scrollGallery 40s linear infinite;
    width: max-content;
}

@keyframes scrollGallery {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.gallery-item {
    width: 350px;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 1px solid var(--border-glass);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 120px;
    /* Space for AI Chat button at 30px */
    width: 60px;
    height: 60px;
    background: var(--emerald-green);
    color: var(--slate-black);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s;
    box-shadow: 0 10px 20px var(--emerald-glow);
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: white;
}

/* Stats Animation Utils */
.stat-val {
    display: inline-block;
}

@media (max-width: 768px) {
    .kamus-actions {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    .kamus-actions a,
    .kamus-actions button {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Folklore Section - Pustaka Dusun */
.folklore-section {
    padding: 80px 5%;
    background: #0f172a;
}

.folklore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.folklore-card {
    background: #1e293b;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.4s;
    cursor: pointer;
}

.folklore-card:hover {
    transform: translateY(-10px);
    border-color: var(--emerald-green);
}

.folklore-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-glass);
}

.folklore-card-body {
    padding: 20px;
}

.folklore-content {
    padding: 25px;
}

.folklore-card h3 {
    margin-bottom: 12px;
    color: white;
}

.folklore-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Skeleton Loading Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #1e293b 4%, #334155 25%, #1e293b 36%);
    background-size: 1000px 100%;
}
.skeleton-card {
    background: #1e293b;
    border-radius: 30px;
    overflow: hidden;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.skeleton-img {
    width: 100%;
    aspect-ratio: 16/9;
}
.skeleton-text {
    height: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.skeleton-text.title {
    height: 20px;
    width: 80%;
}

/* Avatar UI Overlay */
#avatar-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 520px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 35px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: visible;
    /* Changed from hidden to show tooltip */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* ========== 2D Avatar Scene ========== */
.avatar-scene {
    position: relative;
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.18) 0%, rgba(99, 102, 241, 0.12) 50%, rgba(15, 23, 42, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    /* Change to visible for tooltip to pop out */
}

/* Glow ring behind avatar */
.avatar-glow-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(99, 102, 241, 0.12) 55%, transparent 75%);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Floating particles */
.avatar-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 35px 35px 0 0;
    /* Keep particles in rounded boundary */
}

.avatar-particles span {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.55);
    animation: particleFloat linear infinite;
}

.avatar-particles span:nth-child(1) {
    width: 5px;
    height: 5px;
    left: 12%;
    animation-duration: 5s;
    animation-delay: 0s;
}

.avatar-particles span:nth-child(2) {
    width: 4px;
    height: 4px;
    left: 28%;
    animation-duration: 7s;
    animation-delay: 1.2s;
    background: rgba(99, 102, 241, 0.6);
}

.avatar-particles span:nth-child(3) {
    width: 3px;
    height: 3px;
    left: 55%;
    animation-duration: 4.5s;
    animation-delay: 2s;
}

.avatar-particles span:nth-child(4) {
    width: 6px;
    height: 6px;
    left: 70%;
    animation-duration: 6s;
    animation-delay: 0.5s;
    background: rgba(99, 102, 241, 0.5);
}

.avatar-particles span:nth-child(5) {
    width: 3px;
    height: 3px;
    left: 85%;
    animation-duration: 5.5s;
    animation-delay: 3s;
}

.avatar-particles span:nth-child(6) {
    width: 4px;
    height: 4px;
    left: 40%;
    animation-duration: 8s;
    animation-delay: 1.8s;
    background: rgba(251, 191, 36, 0.5);
}

.avatar-particles span:nth-child(7) {
    width: 3px;
    height: 3px;
    left: 20%;
    animation-duration: 6.5s;
    animation-delay: 2.5s;
    background: rgba(251, 191, 36, 0.4);
}

.avatar-particles span:nth-child(8) {
    width: 5px;
    height: 5px;
    left: 62%;
    animation-duration: 4s;
    animation-delay: 0.8s;
}

@keyframes particleFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0);
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 0.6;
    }

    100% {
        bottom: 105%;
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Avatar 2D image wrapper with float + breathe */
.avatar-2d-wrapper {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    animation: avatarFloat 3.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(16, 185, 129, 0.35)) drop-shadow(0 0 40px rgba(99, 102, 241, 0.2));
    z-index: 2;
}

@keyframes avatarFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    30% {
        transform: translateY(-8px) scale(1.01);
    }

    60% {
        transform: translateY(-4px) scale(1.005);
    }
}

.avatar-2d-img {
    height: 185px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 0;
    image-rendering: crisp-edges;
}

/* ---- Mouth overlay ---- */
.avatar-mouth-el {
    position: absolute;
    bottom: 52%;
    /* Lowered from 54.2 */
    left: 49.5%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #110502 0%, #2a0a05 100%);
    border-radius: 50%;
    transition: width 0.08s ease, height 0.08s ease, border-radius 0.08s ease;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 4;
}

/* Mouth shapes */
.avatar-mouth-el.shape-close {
    width: 26px;
    height: 10px;
    border-radius: 15% 15% 50% 50%;
    opacity: 0.95;
}

.avatar-mouth-el.shape-a {
    width: 22px;
    height: 16px;
    border-radius: 50%;
}

.avatar-mouth-el.shape-i {
    width: 28px;
    height: 5px;
    border-radius: 4px;
}

.avatar-mouth-el.shape-u {
    width: 12px;
    height: 14px;
    border-radius: 50%;
}

.avatar-mouth-el.shape-e {
    width: 24px;
    height: 8px;
    border-radius: 30% 30% 50% 50%;
}

.avatar-mouth-el.shape-o {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* ---- Bot Name Label ---- */
.avatar-name-label {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--emerald-green);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* ---- Eye overlays for blink animation ---- */
.avatar-eye {
    position: absolute;
    background: #110808;
    border-radius: 50%;
    pointer-events: none;
    transform-origin: center center;
    z-index: 5;
}

@keyframes eyeBlink {

    0%,
    92%,
    100% {
        transform: scaleY(1);
    }

    96% {
        transform: scaleY(0.05);
    }
}

.avatar-eye.eye-left {
    width: 10px;
    height: 11px;
    bottom: 59.5%;
    /* Corrected from 61.8 */
    left: 46%;
    animation: eyeBlink 5s ease-in-out infinite;
    background: radial-gradient(circle at 35% 35%, #2a1a1a 0%, #110808 70%);
    box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.15), 0 0 5px rgba(0, 0, 0, 0.3);
    border: none;
}

.avatar-eye.eye-right {
    width: 10px;
    height: 11px;
    bottom: 59.5%;
    /* Corrected from 61.8 */
    right: 44.8%;
    animation: eyeBlink 5s ease-in-out infinite 0.15s;
    background: radial-gradient(circle at 35% 35%, #2a1a1a 0%, #110808 70%);
    box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.15), 0 0 5px rgba(0, 0, 0, 0.3);
    border: none;
}

/* ---- Voice Frequency Visualizer ---- */
.voice-visualizer {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    gap: 3px;
    height: 30px;
    align-items: flex-end;
    z-index: 10;
}

.voice-visualizer.active {
    display: flex;
}

.voice-visualizer span {
    width: 4px;
    background: var(--emerald-green);
    border-radius: 4px;
    animation: bounce 0.5s ease-in-out infinite alternate;
}

@keyframes bounce {
    0% {
        height: 5px;
    }

    100% {
        height: 25px;
    }
}

.voice-visualizer span:nth-child(1) {
    animation-delay: 0.1s;
}

.voice-visualizer span:nth-child(2) {
    animation-delay: 0.3s;
}

.voice-visualizer span:nth-child(3) {
    animation-delay: 0.2s;
}

.voice-visualizer span:nth-child(4) {
    animation-delay: 0.4s;
}

.voice-visualizer span:nth-child(5) {
    animation-delay: 0.15s;
}

/* ---- Typing Mode & Mute Btn ---- */
.avatar-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.typing-area {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-area input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.85rem;
    outline: none;
}

.btn-send-chat {
    background: var(--emerald-green);
    color: #0f172a;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-mute {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 20;
    transition: 0.3s;
}

.btn-mute.is-muted {
    background: var(--rose-500);
}

.avatar-chat {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

#avatar-response {
    flex: 1;
    min-height: 0;
    color: white;
    font-size: 0.88rem;
    overflow-y: auto;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    line-height: 1.5;
    word-wrap: break-word;
}

#avatar-response::-webkit-scrollbar {
    width: 6px;
}

#avatar-response::-webkit-scrollbar-track {
    background: transparent;
}

#avatar-response::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

#avatar-response::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.avatar-input-area {
    display: flex;
    gap: 10px;
}

.btn-avatar-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: var(--emerald-green);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 10px 30px var(--emerald-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
    font-size: 1.8rem;
}

.bot-tooltip {
    position: absolute;
    top: 40%;
    left: -130px;
    /* Diatur dari kiri agar pas di sebelah luar mascot */
    background: #10b981;
    color: #01014e;
    padding: 10px 16px;
    border-radius: 20px 20px 4px 20px;
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
    z-index: 10010;
    width: 120px;
    text-align: right;
    pointer-events: none;
    line-height: 1.3;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    display: none;
    border-right: 5px solid #064e3b;
    transform: translateX(-20px);
}

#bot-tour-tooltip.pop-active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.bot-tooltip::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -12px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 12px solid #10b981;
}

.avatar-2d-wrapper {
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.avatar-2d-wrapper:hover {
    transform: scale(1.05) rotate(2deg);
}

.mic-btn.active {
    background: #ef4444 !important;
}

/* Folklore Section */
.folklore-section {
    padding: 100px 5%;
}

.folklore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.folklore-card {
    background: var(--slate-gray);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.folklore-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--emerald-green);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.folklore-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: 0.5s;
}

.folklore-card:hover .folklore-img {
    transform: scale(1.05);
}

.folklore-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.folklore-card-body h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 800;
}

.folklore-card-body p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.read-more {
    color: var(--emerald-green);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Audio Button in Results */
.btn-audio {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-green);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.btn-audio:hover {
    background: var(--emerald-green);
    color: #0f172a;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--emerald-glow);
}

.btn-audio.playing {
    background: var(--emerald-green);
    color: #0f172a;
    box-shadow: 0 0 15px var(--emerald-glow);
    animation: audioPulse 1.2s infinite;
}

@keyframes audioPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Redesigned Search Results (Dashboard-Like) */
.result-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-item:hover {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.result-main-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.word-content {
    flex: 1;
}

.word-pair {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.from {
    color: var(--emerald-green);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.arrow {
    color: var(--text-dim);
    font-size: 0.8rem;
    opacity: 0.4;
    display: flex;
    align-items: center;
}

.to {
    color: #f8fafc;
}

.example-text {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ex-row {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.ex-row:not(:last-child) {
    margin-bottom: 6px;
}

.ex-label {
    font-weight: 900;
    color: var(--emerald-green);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 35px;
    padding-top: 2px;
}

.ex-val {
    flex: 1;
}

@media (max-width: 600px) {
    .word-pair {
        font-size: 1rem;
        gap: 8px;
    }

    .result-item {
        padding: 12px 15px;
    }
}

/* Folklore Categories & More */
.folklore-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 0 5%;
}

.filter-chip {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.filter-chip.active,
.filter-chip:hover {
    background: var(--emerald-green);
    color: #0f172a;
    border-color: var(--emerald-green);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.folklore-more-container {
    text-align: center;
    margin-top: 50px;
}

.btn-see-more {
    padding: 12px 30px;
    background: transparent;
    border: 1px solid var(--emerald-green);
    color: var(--emerald-green);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-see-more:hover {
    background: var(--emerald-green);
    color: #0f172a;
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--emerald-green);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Website Tour Enhancement */
.tour-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 15000;
    background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease;
}

.tour-vignette.active {
    opacity: 1;
    visibility: visible;
}

.tour-speech-bubble {
    position: fixed;
    bottom: 290px;
    /* Di atas mascot yang berukuran lebih kecil lagi (20% smaller) */
    left: 40px;
    background: white;
    color: #01014e;
    padding: 22px 30px;
    border-radius: 28px 28px 28px 4px;
    font-size: 1.1rem;
    font-weight: 700;
    max-width: 420px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    z-index: 18005;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--emerald-green);
    line-height: 1.5;
}

.tour-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 60px;
    /* Disesuaikan dengan posisi kepala mascot */
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 18px solid var(--emerald-green);
}

.tour-speech-bubble.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tour-speech-bubble.active.tour-flip::before {
    left: auto !important;
    right: 55px !important;
    /* Ekor gelembung pindah ke kanan menghadap mascot saat di kanan */
}

/* Typing cursor animation */
.tour-speech-bubble::after {
    content: '|';
    display: inline-block;
    margin-left: 5px;
    color: var(--emerald-green);
    animation: typing-blink 0.8s infinite;
}

@keyframes typing-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}



/* Tour Mode Avatar State */
@keyframes flyOutTour {
    0% {
        transform: translate(calc(100vw - 380px), -80px) scale(1.75);
    }

    20% {
        /* Terbang ke atas dan mengecil sekecil mungkin */
        transform: translate(calc(90vw - 380px), -60vh) scale(0.2);
    }

    60% {
        /* Meluncur sejajar navbar di bagian atas */
        transform: translate(calc(30vw), -65vh) scale(0.2);
    }

    85% {
        /* Menuju target dan mulai membesar kembali */
        transform: translate(0, -15vh) scale(0.6);
    }

    100% {
        /* Mendarat dan kembali normal perlahan */
        transform: translate(0, 0) scale(1);
    }
}

#avatar-container.tour-mode {
    bottom: 30px !important;
    left: 30px !important;
    right: unset !important;
    top: unset !important;
    width: 200px !important;
    /* 20% smaller */
    height: 280px !important;
    animation: flyOutTour 1.2s ease-in-out forwards !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    z-index: 17500 !important;
    overflow: visible !important;
}

@keyframes flyBackTour {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(calc(100vw - 380px), -80px) scale(1.75);
        opacity: 0;
    }
}

#avatar-container.tour-fly-back {
    animation: flyBackTour 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
    pointer-events: none;
}

#avatar-container.tour-mode .avatar-scene {
    height: 100% !important;
    width: 100% !important;
    background: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#avatar-container.tour-mode .avatar-2d-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

#avatar-container.tour-mode .avatar-glow-ring {
    width: 200px !important;
    height: 200px !important;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
}

#avatar-container.tour-mode .avatar-2d-img {
    width: 175px !important;
    /* 20% smaller */
    height: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 25px rgba(16, 185, 129, 0.35));
}

#avatar-container.tour-mode #mute-btn,
#avatar-container.tour-mode .avatar-name-label,
#avatar-container.tour-mode .avatar-chat,
#avatar-container.tour-mode .avatar-controls,
#avatar-container.tour-mode .avatar-input-container {
    display: none !important;
}

/* Animasi untuk pindah kanan kiri pas fitur folklore */
@keyframes slideToRightTour {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(calc(100vw - 250px), 0) scale(1);
    }
}

@keyframes slideToLeftTour {
    from {
        transform: translate(calc(100vw - 250px), 0) scale(1);
    }

    to {
        transform: translate(0, 0) scale(1);
    }
}

#avatar-container.tour-mode.tour-flip {
    animation: slideToRightTour 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

#avatar-container.tour-mode.tour-unflip {
    animation: slideToLeftTour 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

@keyframes slideToRightBubble {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(calc(100vw - 520px), 0) scale(1);
    }
}

@keyframes slideToLeftBubble {
    from {
        transform: translate(calc(100vw - 520px), 0) scale(1);
    }

    to {
        transform: translate(0, 0) scale(1);
    }
}

.tour-speech-bubble.active.tour-flip {
    animation: slideToRightBubble 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

.tour-speech-bubble.active.tour-unflip {
    animation: slideToLeftBubble 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

/* ------------------- RESPONSIF UNTUK TOUR ------------------- */
@media (max-width: 768px) {
    @keyframes flyOutTourMobile {
        0% {
            transform: translate(calc(100vw - 150px), -80px) scale(1.5);
        }

        20% {
            transform: translate(calc(80vw - 100px), -40vh) scale(0.3);
        }

        60% {
            transform: translate(calc(30vw), -45vh) scale(0.3);
        }

        85% {
            transform: translate(0, -10vh) scale(0.7);
        }

        100% {
            transform: translate(0, 0) scale(1);
        }
    }

    @keyframes flyBackTourMobile {
        0% {
            transform: translate(0, 0) scale(1);
        }

        100% {
            transform: translate(calc(100vw - 150px), -80px) scale(1.5);
            opacity: 0;
        }
    }

    #avatar-container.tour-mode {
        width: 140px !important;
        height: 196px !important;
        bottom: 20px !important;
        left: 20px !important;
        animation: flyOutTourMobile 1.2s ease-in-out forwards !important;
    }

    #avatar-container.tour-fly-back {
        animation: flyBackTourMobile 1s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
    }

    #avatar-container.tour-mode .avatar-2d-img {
        width: 125px !important;
    }

    #avatar-container.tour-mode .avatar-glow-ring {
        width: 140px !important;
        height: 140px !important;
    }

    /* Jangan pindah kanan/kiri di mobile, matikan animasi flip */
    #avatar-container.tour-mode.tour-flip,
    #avatar-container.tour-mode.tour-unflip,
    .tour-speech-bubble.active.tour-flip,
    .tour-speech-bubble.active.tour-unflip {
        animation: none !important;
        transform: translate(0, 0) scale(1) !important;
    }

    .tour-speech-bubble {
        bottom: 220px !important;
        left: 20px !important;
        right: 20px !important;
        max-width: none !important;
        padding: 15px 20px !important;
        font-size: 0.95rem !important;
    }

    .tour-speech-bubble::before {
        left: 50px !important;
    }

    .tour-speech-bubble.active.tour-flip::before {
        right: auto !important;
        left: 50px !important;
        /* Tetap menunjuk ke avatar karena ga pindah letak avatar */
    }

    /* ---- Jendela Chat Avatar di Mobile ---- */
    #avatar-container {
        width: calc(100vw - 40px) !important;
        max-width: 340px !important;
        height: 480px !important;
        bottom: 80px !important;
        right: 20px !important;
        border-radius: 28px !important;
    }

    .avatar-scene {
        height: 170px !important;
    }

    .avatar-2d-img {
        width: 115px !important;
    }

    .avatar-glow-ring {
        width: 115px !important;
        height: 115px !important;
    }

    .avatar-chat {
        padding: 12px !important;
    }

    #avatar-response {
        font-size: 0.82rem !important;
    }

    .btn-avatar-toggle {
        width: 55px !important;
        height: 55px !important;
        bottom: 20px !important;
        right: 20px !important;
        font-size: 1.4rem !important;
    }

    .back-to-top {
        width: 50px !important;
        height: 50px !important;
        bottom: 85px !important;
        right: 45px !important;
        font-size: 1.2rem !important;
        z-index: 10002 !important;
    }
}

/* Thinking Dots Animation */
.thinking-dots {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    width: fit-content;
    margin-top: 5px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: var(--emerald-green);
    border-radius: 50%;
    display: inline-block;
    animation: thinking-bounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinking-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}