/* ===================================================================== */
/* 1. VARIABEL & PENGATURAN DASAR
/* ===================================================================== */
:root {
    --primary-color: #4A148C;
    --secondary-color: #E1BEE7;
    --background-color: #F8F9FA;
    --text-color: #212529;
    --border-color: #DEE2E6;
    --font-latin: 'Poppins', sans-serif;
    --font-jawa: 'Tuladha Jejeg', 'Noto Sans Javanese', 'Noto Sans', sans-serif;    
}

*, *::before, *::after {
    box-sizing: border-box;
}

html { 
    scroll-behavior: smooth; 
}

body { 
    font-family: var(--font-latin); 
    background-color: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 2. Utility Class Sakti (Terapkan ke HTML mana saja) */
.font-jawa { 
    font-family: var(--font-jawa); 
    
    /* 1. Mendorong rendering ligatures (Aman & Ringan) */
    /* calt (Contextual Alternates) wajib nyala agar bentuk huruf berubah sesuai gandengannya */
    font-variant-ligatures: common-ligatures contextual;
    -webkit-font-feature-settings: "liga" on, "clig" on, "calt" on;
    font-feature-settings: "liga" on, "clig" on, "calt" on;
    
    /* 2. Menajamkan font (Tanpa shadow berat) khusus layar HD/Mac/iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* 3. Kompensasi Ukuran Aksara (Ide Anda: Membesarkan sedikit karena font asli kekecilan) */
    font-size: 1.3em; /* 1.15em lebih aman agar H1 tidak pecah */
    line-height: 2.2; /* Mencegah sandhangan terpotong */
    
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.font-tuladha { font-family: var(--font-jawa-tuladha); }

/* ===================================================================== */
/* 2. STRUKTUR UTAMA
/* ===================================================================== */
/* .container {  */
    /* max-width: 1200px;  */
    /* margin: 0 auto;  */
    /* padding: 15px; */
/* }  */

header { 
    text-align: center; 
} 

header h1 { 
    color: var(--primary-color); 
    margin-bottom: 5px; 
    font-weight: 600; 
    font-size: 1.8em;
} 

header p { 
    color: #6C757D; 
    font-size: 1em; 
    max-width: 600px;
    margin: 0 auto;
}

.main-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.main-content-column,
.sidebar-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-content: start;
}

aside {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ===================================================================== */
/* 3. KOMPONEN KARTU (CARD)
/* ===================================================================== */
.card { 
    background-color: #fff; 
    padding: 20px;
    border-radius: 12px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.08); 
    border: 1px solid var(--border-color);
    margin-bottom: 0;
}

.card h2 { 
    margin-top: 0; 
    color: var(--primary-color); 
	border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px; 
    font-size: 1.4em;
}

.card h3 { 
    color: var(--primary-color); 
    font-size: 1.2em;
}

/* ===================================================================== */
/* 4. ALAT TRANSLITERASI
/* ===================================================================== */
.io-container { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 15px; } 

textarea, .output-box { 
    width: 100%; 
    height: 250px;
    padding: 15px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    font-size: 16px;
    resize: vertical; 
    transition: all 0.2s ease; 
}

textarea { font-family: var(--font-latin); }

textarea:focus, .output-box:focus,
textarea:hover, .output-box:hover { 
    outline: none; 
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 4px var(--secondary-color); 
}

textarea::placeholder {
    color: #ADB5BD; /* Warna abu-abu yang lebih redup */
    opacity: 1; /* Diperlukan untuk beberapa browser */
    font-size: 15px; /* [BARU] Sedikit lebih kecil dari font utama (16px) */
}

/* Fallback untuk browser lama (juga diperbarui) */
textarea:-ms-input-placeholder { 
    color: #ADB5BD; 
    font-style: italic;
    font-size: 15px;
}
textarea::-ms-input-placeholder { 
    color: #ADB5BD; 
    font-style: italic;
    font-size: 15px;
}

.output-box { background-color: #F8F9FA; overflow-y: auto; font-size: 22px; line-height: 1.8; }
.output-box .word { cursor: pointer; position: relative; transition: background-color 0.2s ease; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.output-box .word:hover { background-color: var(--secondary-color); }

.word-tooltip { 
    position: absolute; 
    background: #FFFFFF;
    color: var(--text-color);
    padding: 12px 16px; 
    border-radius: 12px;
    font-size: 14px; 
    font-family: var(--font-latin); 
    z-index: 1000; 
    pointer-events: none; 
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 10px 30px -5px rgba(0, 0, 0, 0.15);
    max-width: 320px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.word-tooltip.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}
.tooltip-title {
    font-weight: 500;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.word-tooltip .tooltip-analysis {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.word-tooltip .tooltip-item {
    display: inline-flex;
    flex-direction: column;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--background-color);
    text-align: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.word-tooltip .tooltip-item .jawa {
    font-size: 1.2em;
    font-family: var(--font-jawa);
    color: var(--text-color);
}
.word-tooltip .tooltip-item .latin {
    font-size: 0.75em;
    color: #6C757D;
}
      
.controls { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 10px; 
    margin-top: 20px; 
}
.controls .radio-group-wrapper { display: flex; flex-wrap: wrap; gap: 15px; }
.controls label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

.pemisah {
    font-family: var(--font-latin); /* Memastikan menggunakan font Latin */
    color: #6C757D;
    font-weight: 500;
    margin: 0 4px; /* Memberi sedikit jarak */
}

/* =========================================
   SLIDER CONTOH TULISAN (MODERN & ANIMASI)
========================================= */
#example-content-wrapper {
    position: relative;
    min-height: 140px;
    overflow: hidden;
}

.example-slide {
    display: none;
    cursor: pointer;
    animation: fadeInSlide 0.3s ease-in-out;
}

.example-slide.active {
    display: block;
}

/* Desain Kotak Detail Contoh */
.example-detail-card {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--border-color); /* Memakai warna primer ungu */
    transition: all 0.2s ease;
}

/* Efek Hover pada Kotak */
.example-slide:hover .example-detail-card {
    background-color: var(--secondary-color); /* Memakai warna sekunder terang */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

/* Struktur Baris (Label & Konten) */
.ex-row {
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: nowrap !important; 
    align-items: flex-start;
    margin-bottom: 10px;
    border-bottom: 1px dashed #e9ecef;
    padding-bottom: 10px;
    gap: 15px; 
}

.ex-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Desain Label (Kiri) */
.ex-label {
    width: 95px !important; 
    flex-shrink: 0 !important; 
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
}
.ex-label::after {
    content: ":";
    position: absolute;
    right: 0;
}

/* Desain Konten (Kanan) */
.ex-content {
    flex: 1 1 auto !important; 
    min-width: 0 !important; 
    word-break: break-word; 
    text-align: left;
}

/* Tipografi Konten Spesifik Aksara Jawa */
.ex-jawa-text {
    font-size: 24px;
    color: var(--primary-color);
    line-height: 1.5;
    display: block;
}

.ex-latin-text {
    font-weight: 600;
    color: #333;
    display: block;
    font-size: 15px;
}

.ex-arti-text {
    font-size: 0.9em;
    color: #6C757D;
    font-style: italic;
    display: block;
}

/* CTA & Animasi Denyut (Pulse) Javanese Theme */
.ex-cta-text {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85em;
    color: #ffffff;
    background-color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.pulse-animation {
    animation: pulseBtnJawa 2s infinite;
}

.example-slider-footer {
    margin-top: 15px;
}

/* Keyframes Animasi */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Animasi pulse disesuaikan dengan warna primer Aksara Jawa (RGB: 74, 20, 140) */
@keyframes pulseBtnJawa {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 20, 140, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(74, 20, 140, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 20, 140, 0); }
}

/* ===================================================================== */
/* 5. KEYBOARD VIRTUAL
/* ===================================================================== */
.keyboard-caption { text-align: center; margin-top: 35px; margin-bottom: 15px; color: #6C757D; font-weight: 500; font-size: 1em; }
.tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 0; overflow-x: auto; }
.tab-button { padding: 8px 12px; cursor: pointer; border: none; background-color: transparent; border-bottom: 3px solid transparent; font-size: 0.9em; color: #6C757D; white-space: nowrap; font-weight: 500; }
.tab-button.active { border-bottom: 3px solid var(--primary-color); font-weight: 600; color: var(--primary-color); }
.tab-content { display: none; } 
.tab-content.active { display: block; padding-top: 15px; }
.keyboard-row { display: flex; justify-content: center; gap: 5px; margin-bottom: 5px; flex-wrap: wrap; }
.key { background-color: #fff; border: 1px solid #ccc; border-radius: 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; gap: 2px; transition: all 0.2s ease; flex-grow: 1; flex-shrink: 1; flex-basis: 0; padding: 5px; min-width: 28px; }
.key:hover { background-color: var(--secondary-color); }
.key .jawa { font-family: var(--font-jawa); font-size: 22px; line-height: 1; }
.key .latin { font-family: var(--font-latin); font-size: 10px; color: #6C757D; line-height: 1; }

/* ===================================================================== */
/* 6. KONTEN INFORMASI & EDUKATIF
/* ===================================================================== */
#aksara-hari-ini .aksara { font-family: var(--font-jawa); font-size: clamp(4em, 15vw, 6em); text-align: center; color: var(--primary-color); line-height: 1.5; }
#aksara-hari-ini h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.5em;
    color: var(--primary-color);
}

.fungsi-aksara {
    color: #6C757D;
    font-size: 0.9em;
    max-width: 300px;
    margin: 0 auto 15px auto; /* Memberi jarak bawah */
}

.contoh-fokus {
    background-color: #F8F9FA;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.label-contoh {
    font-size: 0.8em;
    font-weight: 500;
    color: #6C757D;
    margin-bottom: 8px;
}

.breakdown-contoh {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1.1em;
}

.hasil-jawa {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2em;
}
.analysis-container { margin-top: 0; padding: 15px; background-color: #F8F9FA; border-radius: 8px; min-height: 50px; display: flex; flex-wrap: wrap; gap: 5px; }
.analysis-item { display: inline-flex; flex-direction: column; padding: 5px 10px; border: 1px solid #ccc; border-radius: 5px; background: white; text-align: center; }
.analysis-item .jawa { font-size: 1.2em; } 
.analysis-item .latin { font-size: 0.8em; color: #555; }
.analysis-item .type { font-size: 0.7em; color: var(--primary-color); font-style: italic; }
.info-list { list-style: none; padding-left: 0; } 
.info-list li { padding-left: 1.5em; position: relative; margin-bottom: 10px; } 
.info-list li::before { content: '✓'; color: var(--primary-color); font-weight: bold; position: absolute; left: 0; }
.faq-item { border-bottom: 1px solid var(--border-color); } 
.faq-question { padding: 15px 0; font-weight: 600; cursor: pointer; position: relative; } 
.faq-question::after { content: '+'; position: absolute; right: 5px; font-size: 1.2em; transition: transform 0.2s ease; } 
.faq-question.active::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out; } 
.faq-answer p { padding-bottom: 15px; margin: 0; }
.example-list { display: flex; flex-direction: column; gap: 16px; }
.example-item { background-color: #f8f9fa; border-left: 4px solid var(--primary-color); padding: 12px 16px; border-radius: 8px; cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease; }
.example-item:hover { background-color: #F3E5F5; transform: translateY(-2px); }
.example-detail { display: flex; flex-direction: column; gap: 8px; }
.ex-row { display: flex; align-items: center; gap: 10px; }
.ex-label { font-weight: 500; font-size: 0.8em; color: var(--primary-color); width: 90px; flex-shrink: 0; position: relative; }
.ex-label::after { content: ":"; position: absolute; right: 0; }
.ex-content { 
    line-height: 1.4; 
}

.ex-content.ex-jawa { 
    font-size: 1.4em; 
    overflow-wrap: break-word; 
    word-break: break-all; 
    /* Font Jawa diatur oleh kelas .font-noto atau .font-tuladha di HTML */
}

.ex-content.ex-latin { 
    font-family: var(--font-latin); /* Terapkan font Latin HANYA di sini */
    font-weight: 600; 
}

.ex-content.ex-arti { 
    font-family: var(--font-latin); /* Terapkan font Latin HANYA di sini */
    font-size: 0.9em; 
    color: #6c757d; 
    font-style: italic; 
}

#tip-counter {
    font-size: 0.9em;
    font-weight: 500;
    color: #6C757D;
}

#tip-title {
    margin-top: 0;       /* Hapus spasi default di atas judul */
    margin-bottom: 10px; /* Beri jarak yang pas ke paragraf di bawahnya */
}
#tip-info {
    margin-top: 0;
    margin-bottom: 15px; 
}
.tip-comparison {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 15px;
}
.tip-example {
    /* Latar belakang abu-abu muda yang sama dengan tooltip */
    background-color: var(--background-color); 
    
    /* Hapus border lama dan ganti dengan box-shadow tipis */
    border: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);

    padding: 15px;
    border-radius: 8px; /* Sedikit lebih besar dari tooltip, terlihat bagus untuk card */
    text-align: center;
    
    /* KUNCI PERUBAHAN: Tambahkan garis aksen di sisi kiri */
    border-left-width: 4px;
    border-left-style: solid;
}
.tip-label {
    font-weight: 600;
    font-size: 0.8em;
    display: block;
    margin-bottom: 10px;
}
.tip-benar {
    /* Warna hijau modern yang bersih sebagai aksen */
    border-left-color: #28a745; 
}
.tip-benar .tip-label {
    /* Sesuaikan warna label agar cocok dengan aksennya */
    color: #28a745;
}
.tip-salah {
    /* Warna merah modern yang jelas sebagai aksen */
    border-left-color: #dc3545;
}
.tip-salah .tip-label {
    /* Sesuaikan warna label agar cocok dengan aksennya */
    color: #dc3545;
}
/* Container baru yang menggunakan Flexbox */
.tip-text-container {
    display: flex;
    /* KUNCI PERUBAHAN: Ubah arah flex menjadi vertikal */
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    /* Kurangi jarak karena sekarang vertikal */
    gap: 5px; 
    min-height: 60px; /* Tambah sedikit tinggi untuk mengakomodasi 2 baris */
}

/* Hapus margin default dari paragraf agar Flexbox bekerja sempurna */
.tip-jawa-text,
.tip-latin-text {
    margin: 0;
}

/* Sedikit penyesuaian pada teks Jawa */
.tip-jawa-text {
    font-size: 1.6em;
    flex-shrink: 0;
    margin: 0;

    /* TAMBAHKAN DUA BARIS INI */
    overflow-wrap: break-word;
    word-break: break-all;
}
.tip-latin-text {
    font-size: 0.85em;
    color: #6C757D;
    font-style: italic;
}

/* ================================================ */
/* Styling untuk Carousel Tips Penulisan Aksara Jawa */
/* ================================================ */

.tip-carousel-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.tip-carousel-header h2 {
    border-bottom: none; /* Hapus border warisan dari .card h2 */
    padding-bottom: 0;   /* Hapus padding terkait border warisan */
}

#tip-content-wrapper {
    min-height: 250px; /* Jaga tinggi layout agar tidak "loncat" */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Konten akan lebih terpusat secara vertikal */
    transition: opacity 0.2s ease-in-out; /* Animasi fade */
}
/* Kelas utilitas untuk animasi fade out */
.tip-content-fade-out {
    opacity: 0;
}

.tip-carousel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 20px;
}

.tip-nav-btn-new {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0; /* Mencegah tombol mengecil */
    transition: all 0.2s ease;
}
.tip-nav-btn-new:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
}
.tip-nav-btn-new svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color); /* Ubah ke 'fill' karena SVG-nya path */
}

#tip-counter {
    font-size: 0.9em;
    font-weight: 500;
    color: #6C757D;
    flex-shrink: 0;
}

.tip-progress-container {
    flex-grow: 1; /* Biarkan progress bar mengisi ruang yang tersedia */
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

#tip-progress-bar {
    width: 0%; /* Di-update oleh JavaScript */
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease; /* Animasi progress bar */
}

/* ===================================================================== */
/* 7. FITUR & KONTROL TAMBAHAN
/* ===================================================================== */
.control-deck { background-color: #FFFFFF; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin-top: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.deck-title { margin-top: 0; margin-bottom: 15px; font-size: 1em; font-weight: 500; color: #6c757d; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.features-cohesive { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: stretch; }
.btn-cohesive { display: flex; align-items: center; justify-content: inherit; width: 100%; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 10px 16px; cursor: pointer; gap: 10px; color: #495057; font-size: 14px; font-family: var(--font-latin); font-weight: 500; text-decoration: none; white-space: nowrap; transition: all 0.2s ease-in-out; }
.btn-cohesive:hover { border-color: #ced4da; background-color: #e9ecef; color: #212529; }
.btn-cohesive:active { background-color: #dee2e6; border-color: #adb5bd; box-shadow: inset 0 2px 4px rgba(0,0,0,0.06); }
.btn-cohesive svg { width: 18px; height: 18px; color: #6c757d; transition: color 0.2s ease-in-out; flex-shrink: 0; }
.btn-cohesive:hover svg { color: #212529; }
.custom-dropdown-wrapper { position: relative; display: flex; }
#font-selector-btn { justify-content: space-between; width: 100%; }
#font-selector-btn .chevron { color: #6c757d; transition: transform 0.2s ease-in-out; }
#font-selector-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; width: 100%; background-color: #FFFFFF; border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); z-index: 10; overflow: hidden; display: none; }
.dropdown-item { display: block; padding: 10px 16px; color: var(--text-color); text-decoration: none; font-size: 14px; transition: background-color 0.2s ease; }
.dropdown-item:hover { background-color: #f8f9fa; }
.dropdown-item.active { background-color: var(--secondary-color); color: var(--primary-color); font-weight: 500; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 15px; }
.modal-content { background-color: white; padding: 25px; border-radius: 12px; max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-content code { background-color: #e9ecef; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2em; cursor: pointer; color: #888; }
.glossary-section { margin-bottom: 20px; }
.glossary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.glossary-item { background-color: #f8f9fa; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; text-align: center; }
.glossary-item .g-jawa { font-family: var(--font-jawa); font-size: 2em; display: block; }
.glossary-item .g-latin { font-size: 0.9em; color: #555; }
.quiz-container { display: flex; flex-direction: column; gap: 15px; }
.quiz-question-wrapper, .quiz-input-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;}
#quiz-question-text { font-size: 1.2em; }
#quiz-input { flex-grow: 1; font-size: 1.2em; padding: 8px; border: 1px solid var(--border-color); border-radius: 6px; }
.quiz-feedback { padding: 10px; border-radius: 6px; display: none; }
.quiz-feedback.correct { background-color: #d4edda; color: #155724; }
.quiz-feedback.incorrect { background-color: #f8d7da; color: #721c24; }
.quiz-controls { display: flex; gap: 10px; }
.share-options { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
.share-option-btn { display: block; padding: 12px 15px; border-radius: 8px; text-align: center; font-weight: 500; text-decoration: none; color: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.share-option-btn:hover { transform: scale(1.03); opacity: 0.9; }
.share-option-btn.whatsapp { background-color: #25D366; }
.share-option-btn.telegram { background-color: #0088cc; }
.share-option-btn.twitter  { background-color: #1DA1F2; }
.share-option-btn.facebook { background-color: #1877F2; }
.share-option-btn.copy-link { background-color: #6c757d; border: none; width: 100%; font-family: var(--font-latin); font-size: 14px; cursor: pointer; }

.collection-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.collection-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.collection-item:hover {
    background-color: #F8F9FA;
    transform: translateY(-2px);
}

.collection-item .c-jawa {
    font-size: 1.5em;
    font-family: var(--font-jawa);
    margin-bottom: 8px;
    display: block;
    color: var(--primary-color);
}

.collection-item .c-latin {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-color);
}

.collection-item-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #F8D7DA;
    color: #721C24;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.collection-item:hover .collection-item-delete {
    opacity: 1;
}

.translator-copyright {text-align: center; padding: 20px; border-top: 1px solid var(--border-color); margin-top: 30px;}

#rules-section, #how-to-use, #panduan-section, #glosarium-section, #sejarah-section, #faq-section {margin-top: 20px}
/* ===================================================================== */
/* 8. MEDIA QUERIES (BREAKPOINTS RESPONSIVE)
/* ===================================================================== */

/* ---- UNTUK LAYAR SANGAT KECIL (<= 360px) ---- */
@media (max-width: 360px) {
    .features-cohesive {
        grid-template-columns: 1fr;
    }
}

/* ---- UNTUK LAYAR KECIL (<= 480px) ---- */
@media (max-width: 480px) {
    .container { padding: 0 10px; }
    header { padding-top: 10px; }
    header h1 { font-size: 1.6em; }
    .card { padding: 10px; }
    .keyboard-row { gap: 4px; }
    .key { padding: 8px 4px; min-height: 54px; }
    .key .jawa { font-size: 20px; }
    .key .latin { font-size: 9px; }
  
    /* [POIN 1] Perbaikan layout tumpang tindih */
    /* .ex-row { flex-direction: column; align-items: flex-start; gap: 2px; } */
    /* .ex-label { width: 100%; } /* Lebar penuh */ */
    /* .ex-content { width: 100%; } /* Lebar penuh */ */
    /* .ex-label::after { position: static; margin-left: 4px; } */

    .control-deck { padding: 10px; margin-top: 20px; }
    .features-cohesive { grid-template-columns: 1fr 1fr; }
    .btn-cohesive { white-space: normal; }
    .radio-group-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
}

/* Penyesuaian untuk layar kecil agar tidak terpotong */
@media (max-width: 600px) {
    .tip-carousel-card {
        padding-left: 20px;
        padding-right: 20px;
    }
    .tip-nav-btn {
        /* Kembalikan ke layout normal di bawah konten */
        position: static;
        transform: none;
        display: inline-block;
        margin: 5px;
    }
    .tip-carousel-wrapper {
        /* Gunakan Flexbox untuk mengatur ulang urutan elemen */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #tip-content-wrapper { order: 1; } /* Konten di posisi pertama */
    .tip-navigation-mobile { order: 2; } /* Wadah tombol di posisi kedua */

    /* Pindahkan tombol ke dalam wadah baru via JavaScript (atau duplikasi di HTML) */
    /* Untuk kesederhanaan, kita akan letakkan di bawah via CSS */
    .tip-nav-prev, .tip-nav-next {
        order: 2; /* Letakkan tombol setelah konten */
        margin-top: 15px; /* Beri jarak dari konten di atasnya */
    }
    .tip-carousel-header {
        order: 0; /* Pastikan header tetap paling atas */
    }
}

/* ---- UNTUK LAYAR TABLET (>= 768px) ---- */
@media (min-width: 768px) {
    .container { padding: 0 20px; }
    header { padding-top: 20px; }
    header h1 { font-size: 2.2em; }
    textarea, .output-box { font-size: 18px; }
    .key { flex-basis: 40px; }
    .controls { flex-direction: row; align-items: center; gap: 10px; }
    .collection-list {
        grid-template-columns: 1fr 1fr;
    }    
}

/* ---- UNTUK LAYAR DESKTOP (>= 1024px) ---- */
@media (min-width: 1024px) {
    .container { padding: 0 15px; }
    header h1 { font-size: 2.5em; }
    .io-container { grid-template-columns: 1fr 1fr; }
    .card { padding: 25px 30px; }
    textarea, .output-box { height: 280px; }
    .main-layout-grid {
        grid-template-columns: 2fr 1fr;
        gap: 20px;
    }
}