/* --------------------------------------------------
   KAMUS TURAATS - PREMIUM DEEP TEAL & GOLD THEME
   Vanilla CSS3 - Optimized for Mobile First & Core Web Vitals
   -------------------------------------------------- */

@font-face {
    font-family: 'LPMQ IsepMisbah';
    src: url('font/subset-LPMQIsepMisbah.woff2') format('woff2'),
         url('font/subset-LPMQIsepMisbah.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('font/amiri-regular.woff2') format('woff2'),
         url('font/amiri-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('font/amiri-700.woff2') format('woff2'),
         url('font/amiri-700.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette Terinspirasi dari Referensi (Deep Teal & Gold) */
    --bg-canvas: #072320;
    --bg-card: #0c3632;
    --bg-input: #124b45;
    
    --text-main: #f1f5f9;
    --text-arabic: #ffffff;
    --text-muted: #94a3b8;
    
    --accent-gold: #d4af37;
    --accent-gold-light: #fde68a;
    --accent-gold-dim: rgba(212, 175, 55, 0.15);
    
    --border-teal: #1a5c55;
    
    --font-indo: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-arab: 'LPMQ IsepMisbah', 'Amiri', 'Scheherazade New', 'Traditional Arabic', Arial, Tahoma, serif;
    --font-arab-plain: 'Amiri', 'Traditional Arabic', serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-indo);
    background-color: var(--bg-canvas);
    background-image: radial-gradient(circle at 50% -20%, #0d3b37 0%, var(--bg-canvas) 75%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 90px; /* Padding bawah ekstra untuk bottom nav di mobile */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--accent-gold);
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--accent-gold-light);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border: 2px solid var(--bg-canvas);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-teal);
}

/* --------------------------------------------------
   LAYOUT & CONTAINER
   -------------------------------------------------- */

.kamus-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    width: 100%;
    flex: 1;
}

/* --------------------------------------------------
   HEADER & TOP NAVIGATION (Desktop)
   -------------------------------------------------- */

.site-header {
    background-color: rgba(7, 35, 32, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-teal);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.site-header .logo a {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-gold-light);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header .logo a img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-gold-light);
    background-color: var(--accent-gold-dim);
}

/* Hide header desktop elements on mobile if needed, but header remains visible with just logo */
@media (max-width: 767px) {
    .main-nav {
        display: none; /* Menyembunyikan navigasi atas di mobile, diganti bottom-nav */
    }
    .site-header {
        justify-content: center; /* Pusatkan logo di mobile */
    }
}

/* --------------------------------------------------
   BOTTOM NAVIGATION BAR (Mobile Only)
   -------------------------------------------------- */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(12, 54, 50, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-teal);
    display: none; /* Default tersembunyi, aktif di layar kecil */
    justify-content: space-around;
    padding: 10px 10px 18px; /* Padding bawah ekstra untuk iOS Home Bar */
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.1s ease;
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-gold-light);
}

.nav-icon {
    font-size: 1.4rem;
}

.nav-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

@media (max-width: 767px) {
    .bottom-nav {
        display: flex; /* Aktif di mobile */
    }
}

/* --------------------------------------------------
   HERO / HOME COMPONENTS
   -------------------------------------------------- */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 0 20px;
    width: 100%;
}

.hero-title-ar {
    font-family: var(--font-arab);
    font-size: 4rem;
    font-weight: normal;
    color: var(--accent-gold-light);
    margin-bottom: 8px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.hero-title-id {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    letter-spacing: 0.5px;
    max-width: 500px;
    line-height: 1.5;
}

/* --------------------------------------------------
   SEARCH BAR / FORM HERO
   -------------------------------------------------- */

.search-form {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px;
    filter: drop-shadow(0 8px 25px rgba(212, 175, 55, 0.1));
}

.search-form input[type="text"] {
    width: 100%;
    padding: 16px 105px 16px 22px; /* Ruang lebih di kanan untuk tombol search & keyboard */
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    font-size: 1.05rem;
    outline: none;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.search-form input[type="text"]::placeholder {
    color: var(--text-muted);
}

.search-form input[type="text"]:focus {
    background-color: var(--bg-input);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.25), inset 0 2px 5px rgba(0,0,0,0.3);
    border-color: var(--accent-gold-light);
}

/* Wrapper untuk tombol search & ikon keyboard agar rapi di kanan */
.search-controls {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kbd-toggle-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--accent-gold);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.kbd-toggle-btn:hover {
    background-color: rgba(212, 175, 55, 0.15);
    transform: scale(1.08);
}

.search-form button[type="submit"] {
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    color: var(--bg-canvas);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.search-form button[type="submit"]:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.keyboard-hint {
    color: var(--accent-gold-light);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    margin-top: -12px;
    margin-bottom: 25px;
    font-weight: 500;
}

.keyboard-hint:hover {
    opacity: 1;
}

/* --------------------------------------------------
   LANGUAGE SWITCHER
   -------------------------------------------------- */

.lang-switcher-container {
    text-align: center;
    margin-bottom: 30px;
}

.lang-switcher-wrap {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-teal);
    border-radius: 25px;
    padding: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.lang-switcher-wrap a {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.lang-switcher-wrap a.active {
    color: var(--bg-canvas);
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.lang-switcher-wrap a:hover:not(.active) {
    color: var(--accent-gold-light);
}

/* --------------------------------------------------
   HIJAIYAH MAP (ALPHABET GRID)
   -------------------------------------------------- */

.hijaiyah-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-teal);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 35px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.hijaiyah-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.hijaiyah-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    width: 100%;
}

@media (max-width: 480px) {
    .hijaiyah-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }
}

.hijaiyah-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-input);
    color: var(--accent-gold-light);
    border-radius: 10px;
    font-family: var(--font-arab);
    font-size: 1.4rem;
    font-weight: normal;
    border: 1px solid var(--border-teal);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hijaiyah-grid a:hover {
    background-color: var(--accent-gold);
    color: var(--bg-canvas);
    border-color: var(--accent-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212,175,55,0.3);
}

/* --------------------------------------------------
   CARDS UTAMA / COMMON CARD STYLES
   -------------------------------------------------- */

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-teal);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.8;
}

/* --------------------------------------------------
   QUICK LINKS / EEAT CARDS
   -------------------------------------------------- */

.quick-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 600px) {
    .quick-links {
        grid-template-columns: 1fr 1fr;
    }
}

.quick-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-teal);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold-dim), transparent);
}

.quick-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.card-icon {
    background-color: var(--bg-input);
    color: var(--accent-gold-light);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 1px solid var(--border-teal);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.card-content {
    flex: 1;
    text-align: left;
}

.card-title {
    color: var(--accent-gold-light);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* --------------------------------------------------
   SEARCH RESULTS PAGE
   -------------------------------------------------- */

.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.search-result-item {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-teal);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background-color: var(--bg-card);
}

.search-result-item .arabic-title {
    font-size: 1.4rem;
    color: var(--text-arabic);
    font-family: var(--font-arab);
    margin: 0 0 8px 0;
    line-height: 1.8;
}

/* --------------------------------------------------
   STATIC PAGES (CMS)
   -------------------------------------------------- */

/* Readability layer to override text color on CMS content on dark bg */
.cms-content {
    color: var(--text-main);
    line-height: 1.75;
    font-size: 1rem;
}

.cms-content h1, .cms-content h2, .cms-content h3, .cms-content h4 {
    color: var(--accent-gold-light);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cms-content p {
    margin-bottom: 1.25rem;
}

.cms-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.cms-content a:hover {
    color: var(--accent-gold-light);
}

.cms-content ul, .cms-content ol {
    margin-left: 20px;
    margin-bottom: 1.25rem;
}

.cms-content li {
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------
   LEMMA PAGE COMPONENTS
   -------------------------------------------------- */

.lemma-card {
    padding: 28px 24px;
}

.lemma-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-teal);
    padding-bottom: 16px;
}

.lemma-header .arabic-title {
    font-family: var(--font-arab);
    font-size: 3.5rem;
    font-weight: normal;
    color: var(--accent-gold-light);
    margin: 0 0 10px 0;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    flex: 1 1 auto;
}

.phonetic-badge {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-family: monospace;
    background-color: var(--bg-canvas);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-teal);
}

.lexical-badge {
    background-color: var(--accent-gold-dim);
    color: var(--accent-gold-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--accent-gold);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Engine Pills / Boundaries */
.engine-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.pill {
    background-color: var(--bg-card);
    color: var(--accent-gold-light);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-teal);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill:hover {
    border-color: var(--accent-gold);
    background-color: var(--accent-gold-dim);
}

/* Definition Box & Lists */
.definition-box {
    margin-top: 20px;
}

.meaning-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-teal);
    width: 100%;
}

.meaning-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.arabic-content {
    font-family: var(--font-arab);
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--text-arabic);
    text-align: right;
    direction: rtl;
    margin-bottom: 12px;
}

.translation-indicator {
    text-align: left;
    direction: ltr;
    padding: 12px 18px;
    margin-top: 8px;
    font-size: 0.98rem;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.indo-content {
    background-color: rgba(3, 105, 161, 0.15);
    border-left-color: #0284c7;
    color: #bae6fd;
}

.eng-content {
    background-color: rgba(22, 163, 74, 0.15);
    border-left-color: #16a34a;
    color: #bbf7d0;
}

.ai-pending {
    background-color: rgba(148, 163, 184, 0.1);
    border-left-color: #64748b;
    color: var(--text-muted);
}

/* Subentries */
.subentries-section {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-teal);
}

.subentries-section h3 {
    margin-top: 0;
    color: var(--accent-gold-light);
    font-size: 1.15rem;
    border-bottom: 2px solid var(--border-teal);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.subentry-block {
    margin-bottom: 20px;
}

.subentry-block:last-child {
    margin-bottom: 0;
}

.arabic-sub-title {
    font-family: var(--font-arab);
    font-size: 1.55rem;
    color: var(--text-arabic);
    font-weight: 700;
    margin-bottom: 10px;
    text-align: right;
    direction: rtl;
}

/* Blockquote / Citation Box */
.citation-box {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed var(--border-teal);
}

.citation-box h3 {
    color: var(--accent-gold-light);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.arabic-quote {
    font-family: var(--font-arab-plain);
    font-size: 1.6rem;
    background: var(--accent-gold-dim);
    border-right: 5px solid var(--accent-gold);
    padding: 18px;
    margin: 15px 0;
    text-align: right;
    line-height: 1.8;
    border-radius: 8px;
    color: var(--text-arabic);
    direction: rtl;
}

/* Reference Box (Citation Link) */
.reference-link-box {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-teal);
    border-radius: 12px;
}

.reference-link-box label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-gold-light);
    margin-bottom: 8px;
}

.reference-link-box input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
    color: var(--accent-gold-light);
    background: var(--bg-canvas);
    border: 1px dashed var(--accent-gold);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.reference-link-box input[type="text"]:hover {
    background: var(--bg-input);
}

/* Proximity / Related Words / Root Family */
.proximity-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-input);
    color: var(--accent-gold-light);
    border: 1px solid var(--border-teal);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-link:hover {
    background: var(--accent-gold-dim);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.pill-link span[dir="rtl"] {
    font-family: var(--font-arab);
    font-size: 1.15rem;
    line-height: 1;
}

/* --------------------------------------------------
   FOOTER
   -------------------------------------------------- */

.site-footer {
    background: #041715;
    border-top: 1px solid var(--border-teal);
    color: var(--text-muted);
    padding: 24px;
    text-align: center;
    margin-top: 50px;
    font-size: 0.88rem;
    width: 100%;
}

/* --------------------------------------------------
   VIRTUAL KEYBOARD SYSTEM
   -------------------------------------------------- */

.virtual-keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(12, 54, 50, 0.98);
    border-top: 2px solid var(--accent-gold);
    padding: 12px 8px 24px; /* Padding bawah lebih untuk iOS home indicator */
    z-index: 2000;
    display: none;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    transition: transform 0.25s ease-out;
}

.virtual-keyboard.show {
    display: block;
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 10px;
}

.keyboard-title {
    font-size: 0.85rem;
    color: var(--accent-gold-light);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.keyboard-close {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.keyboard-close:hover {
    background-color: rgba(212, 175, 55, 0.15);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 6px;
    width: 100%;
}

.keyboard-key {
    background-color: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-teal);
    border-radius: 6px;
    padding: 8px 4px;
    flex: 1;
    min-width: 26px;
    max-width: 45px;
    height: 44px;
    font-size: 1.15rem;
    font-family: var(--font-arab);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.keyboard-key:active {
    background-color: var(--accent-gold);
    color: var(--bg-canvas);
    border-color: var(--accent-gold-light);
    transform: scale(0.92);
}

@media (min-width: 768px) {
    .keyboard-key:hover {
        background-color: var(--accent-gold);
        color: var(--bg-canvas);
        border-color: var(--accent-gold-light);
    }
}

.keyboard-key.wide {
    max-width: 80px;
    font-size: 0.9rem;
    font-family: var(--font-indo);
    font-weight: 600;
    color: var(--accent-gold-light);
    background-color: var(--bg-card);
}

.keyboard-key.space {
    max-width: 250px;
    font-size: 0.9rem;
    font-family: var(--font-indo);
}
