:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #d97706;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

.zlka-container {
    max-width: 1160px;
    margin: 0 auto;
}

.zlka-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}
.zlka-header h1 {
    color: var(--primary);
    margin: 0 0 6px 0;
    font-size: 1.85rem;
}
.zlka-header .subtitle {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
}
.zlka-header .motto {
    margin: 6px 0 0 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--accent);
}

.zlka-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.zlka-selector-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.zlka-selector-box select {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: #ffffff;
}

.reference-banner {
    background: #eff6ff;
    border-left: 5px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 18px 24px;
    margin-bottom: 25px;
}
.reference-banner .badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-light);
    letter-spacing: 0.6px;
}
.reference-banner h2 {
    margin: 6px 0 0 0;
    font-size: 1.35rem;
    color: #1e293b;
}

.dialect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.dialect-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.dialect-card .card-head h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
}
.dialect-card .region-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: block;
    margin-top: 2px;
}
.dialect-card .provinces {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 4px 0 12px 0;
}

.sentence-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
    min-height: 54px;
    margin: 10px 0;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-vote {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-vote:hover {
    background: #e2e8f0;
}

.missing-state {
    text-align: center;
    padding: 25px 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}
.missing-state p {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-open-modal {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 7px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-open-modal:hover {
    opacity: 0.9;
}

.analysis-card {
    background: #fffbeb;
    border-color: #fde68a;
}
.analysis-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: #92400e;
}
.analysis-card p {
    margin: 0;
    color: #78350f;
    font-size: 0.95rem;
}

/* Modal Stilleri */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-box {
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.modal-header h3 { margin: 0; font-size: 1.2rem; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}
.form-hint {
    font-size: 0.75rem;
    color: #b45309;
    display: block;
    margin-top: 3px;
}
.ref-preview {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.btn-cancel {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-submit {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
/* İki Kademeli Benzerlik Göstergesi */
.dual-stats-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-box.current-stat {
    border-left: 4px solid #16a34a;
}

.stat-box.global-stat {
    border-left: 4px solid var(--primary);
    background: #f1f5f9;
}

.stat-meta h4 {
    margin: 6px 0 4px 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.stat-meta p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stat-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #15803d;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
}

.stat-tag.tag-global {
    color: var(--primary);
    background: #dbeafe;
}

.stat-data {
    margin: 14px 0 10px 0;
    display: flex;
    align-items: center;
}

.similarity-badge {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.similarity-badge .rate-num {
    font-size: 2rem;
    font-weight: 800;
    color: #15803d;
    line-height: 1;
}

.similarity-badge .rate-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
}

.badge-global .rate-num {
    color: var(--primary);
}

.badge-global .rate-label {
    color: #1e3a8a;
}

.progress-container {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar.bar-current {
    background: #16a34a;
    height: 100%;
}

.progress-bar.bar-global {
    background: var(--primary);
    height: 100%;
}

/* ========================================================
   ARABA KİLOMETRE GÖSTERGESİ (GAUGE) VE DETAY PANELLERİ
   ======================================================== */

.global-gauge-banner, .single-gauge-banner {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.global-gauge-banner {
    border-top: 4px solid var(--primary);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.single-gauge-banner {
    border-top: 4px solid #16a34a;
    background: #ffffff;
    margin-top: 10px;
}

.gauge-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Kilometre Göstergesi (Hız İbresi) */
.speedo-box {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.speedo-arc {
    width: 100px;
    height: 50px;
    background: conic-gradient(from 180deg at 50% 100%, #ef4444 0deg, #eab308 60deg, #3b82f6 120deg, #22c55e 180deg);
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    position: relative;
    overflow: hidden;
}

/* Göstergenin içini boşaltarak şerit halka yapıyoruz */
.speedo-arc::after {
    content: "";
    position: absolute;
    width: 76px;
    height: 38px;
    bottom: 0;
    left: 12px;
    background: #ffffff;
    border-top-left-radius: 38px;
    border-top-right-radius: 38px;
}

/* İbre İğnesi */
.speedo-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 3px;
    height: 44px;
    background: #0f172a;
    transform-origin: bottom center;
    z-index: 2;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}

/* İbre Pivot Noktası */
.speedo-center-pin {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #0f172a;
    border-radius: 50%;
    z-index: 3;
}

/* Gösterge Altındaki Yüzde Değeri */
.speedo-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 4px;
    line-height: 1;
}

.speedo-value-single {
    color: #15803d;
}

/* Gösterge Metin Bilgileri */
.gauge-info {
    flex: 1;
    min-width: 240px;
}

.gauge-info h3 {
    margin: 4px 0 2px 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.gauge-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-global-tag {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-single-tag {
    font-size: 0.7rem;
    font-weight: 800;
    color: #15803d;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Detaylar Butonu */
.btn-toggle-detail {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-toggle-detail:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--primary);
}

/* Açılır Kapanır Detay Bölümü */
.detail-drawer {
    margin-top: 16px;
    border-top: 1px dashed var(--border);
    padding-top: 14px;
    animation: fadeIn 0.3s ease-in-out;
}

.detail-inner {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
}

.detail-inner h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: var(--primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.detail-item {
    font-size: 0.85rem;
}

.detail-item strong {
    display: block;
    color: #1e293b;
    margin-bottom: 2px;
}

.detail-item span {
    color: #475569;
}

.single-analysis-text {
    margin: 0;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}