/* ==========================================================================
   1. DEĞİŞKENLER VE GENEL AYARLAR
   ========================================================================== */
:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

/* Karanlık Mod Değişkenleri (.dark class'ı body'e eklendiğinde devreye girer) */
body.dark {
    --bg-primary: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

/* ==========================================================================
   2. HEADER (ÜST ALAN)
   ========================================================================== */
header {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.5rem;
    flex-grow: 1;
}

header a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

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

#main-title {
    color: var(--text-primary);
}

#lang {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

#dark-mode-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    background-color: transparent;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

#dark-mode-btn:hover {
    background-color: var(--accent);
    color: #ffffff;
}

/* ==========================================================================
   3. MAIN & FORM (HESAPLAMA ALANI)
   ========================================================================== */
main {
    width: 100%;
    max-width: 500px;
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#date-and-hour {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 8px;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: -4px;
}

select, input[type="number"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

select:focus, input:focus {
    border-color: var(--accent);
}

/* Readonly girdi alanı stili */
input[readonly] {
    background-color: var(--border);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Buton Düzenleri */
#convert-button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

#convert-button:hover {
    background-color: var(--accent-hover);
}

#swap-button {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

#swap-button:hover {
    background-color: var(--border);
}

#disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
}

#disclaimer:hover {
    text-decoration: underline;
}

/* Slider (Ondalık Ayarı) Alanı */
#decimal-slider-label {
    margin-top: 24px;
    display: block;
}

input[type="range"] {
    width: 80%;
    margin-top: 10px;
    accent-color: var(--accent);
    cursor: pointer;
}

#decimal-slider-output {
    display: inline-block;
    width: 15%;
    text-align: right;
    font-weight: bold;
    color: var(--accent);
}

/* ==========================================================================
   4. FOOTER (ALT BİLGİ)
   ========================================================================== */
footer {
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}