/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- Tema Değişkenleri (LIGHT NEO-GLASS) --- */
:root {
    --renk-baslangic: #6a11cb;
    --renk-bitis: #2575fc;
    --ana-gradient: linear-gradient(110deg, #6a11cb 0%, #2575fc 50%, #4fd1ff 100%);
    --ana-gradient-soft: linear-gradient(120deg, rgba(106,17,203,0.9), rgba(37,117,252,0.9));

    --vurgu-renk: #5a20c9;
    --arka-plan: #f5f7ff;
    --kart-arkaplan: rgba(255, 255, 255, 0.9);

    --metin-rengi: #343a40;
    --gri-metin: #6c757d;
    --kenarlik-rengi: #dee2e6;

    --golge: 0 10px 25px rgba(15, 23, 42, 0.10);
    --kenar-yuvarlakligi: 14px;
}

/* ========================================================= */
/* ===================== DARK MODE ========================= */
/* ========================================================= */

body.dark {
    --arka-plan: #111;
    --kart-arkaplan: rgba(20,20,20,0.85);
    --metin-rengi: #f5f5f5;
    --gri-metin: #aaaaaa;
    --kenarlik-rengi: #333;
    --golge: 0 8px 30px rgba(0,0,0,0.65);
    background-color: #111;
}

body.dark .site-nav {
    background: rgba(27,27,27,0.8);
    border-color: #333;
}

body.dark .site-nav li a {
    background: rgba(40,40,40,0.9);
    border-color: #444;
    color: #ccc;
}

body.dark .site-nav li a.aktif {
    background: var(--ana-gradient-soft);
    color: #fff;
}

body.dark .arac-kutusu {
    background: rgba(25,25,25,0.9);
    border-color: #333;
}

body.dark .reklam-kutusu-placeholder {
    background: rgba(40,40,40,0.9);
    border-color: #555;
    color: #bbb;
}

/* Dark mode toggle */
.dark-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--ana-gradient);
    color: #fff;
    padding: 12px 14px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--golge);
    font-size: 1.3em;
    z-index: 9999;
    transition: 0.2s;
}
.dark-toggle:hover { transform: scale(1.15); }

/* ========================================================= */
/* ==================== GENEL AYARLAR ====================== */
/* ========================================================= */

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

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top left, #f5f7ff 0%, #eef2ff 40%, #ffffff 100%);
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: var(--metin-rengi);
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hafif bloblar (animasyonlu) */
body::before, body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    z-index: -2;
    opacity: 0.65;
}

body::before {
    width: 420px; height: 420px;
    top: -160px; left: -160px;
    background: radial-gradient(circle, rgba(106,17,203,0.35), transparent 60%);
    animation: blobMove1 32s infinite alternate ease-in-out;
}

body::after {
    width: 480px; height: 480px;
    bottom: -200px; right: -180px;
    background: radial-gradient(circle, rgba(37,117,252,0.3), transparent 60%);
    animation: blobMove2 38s infinite alternate ease-in-out;
}

@keyframes blobMove1 {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(40px,20px) scale(1.05); }
    100% { transform: translate(-20px,40px) scale(1.1); }
}

@keyframes blobMove2 {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-30px,-10px) scale(1.06); }
    100% { transform: translate(20px,-30px) scale(1.12); }
}

/* Linklerde alt çizgi yok */
a { text-decoration: none !important; }

/* ========================================================= */
/* ===================== BAŞLIK ============================ */
/* ========================================================= */

h1 {
    background: var(--ana-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(1.9em, 4vw, 2.6em);
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ========================================================= */
/* ================= CHIP NAVBAR (ORTALANMIŞ) ============= */
/* ========================================================= */

.site-nav {
    width: 100%;
    max-width: 1000px;
    padding: 10px 8px;
    background: rgba(255,255,255,0.95);
    border-radius: 999px;
    border: 1px solid rgba(222,226,230,0.9);
    box-shadow: 0 12px 30px rgba(15,23,42,0.10);
    backdrop-filter: blur(12px);

    /* NAVBAR ORTALAMA */
    margin: 0 auto 20px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Chip */
.site-nav li a {
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(222,226,230,0.9);
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    color: var(--gri-metin);
    transition: 0.25s ease;
}
.site-nav li a:hover {
    background: #eef2ff;
    color: var(--vurgu-renk);
    transform: translateY(-1px);
}
.site-nav li a.aktif {
    background: var(--ana-gradient-soft);
    color: #fff;
    box-shadow: 0 0 14px rgba(79,70,229,0.45);
}

/* ========================================================= */
/* =================== HESAPLAMA KARTLARI ================= */
/* ========================================================= */

.hesap-kutusu {
    background: var(--kart-arkaplan);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 720px;
    margin: 16px 0;
    border: 1px solid rgba(222,226,230,0.9);
    box-shadow: 0 12px 28px rgba(15,23,42,0.10);
}

.hesap-kutusu h2 {
    color: var(--vurgu-renk);
    margin-bottom: 15px;
}

/* Form Satırı */
.form-satiri {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 16px;
    gap: 10px;
    align-items: center;
}

.form-satiri span {
    font-size: 0.95em;
    color: var(--gri-metin);
}

/* Inputlar */
input[type="number"], input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--kenarlik-rengi);
    font-size: 1em;
    transition: 0.2s;
}
input:focus {
    border-color: var(--vurgu-renk);
    box-shadow: 0 0 0 3px rgba(106,17,203,0.2);
    outline: none;
}

/* ========================================================= */
/* =================== BUTTON + RIPPLE ===================== */
/* ========================================================= */

button {
    width: 100%;
    background: var(--ana-gradient);
    color: white;
    padding: 12px 15px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    background-size: 200%;
    transition: background-position 0.4s ease;
    position: relative;
    overflow: hidden;
}

button:hover { background-position: right center; }

/* Ripple */
button .ripple {
    position: absolute;
    width: 20px; height: 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
}
@keyframes ripple-effect {
    to { transform: scale(12); opacity: 0; }
}

/* ========================================================= */
/* ================= SONUÇ KUTUSU + İKON ================== */
/* ========================================================= */

.sonuc {
    margin-top: 16px;
    padding: 15px 15px 15px 45px;
    background: #e6fff1;
    border-radius: 14px;
    border-left: 6px solid #00b894;
    position: relative;
    font-weight: 600;
}
.sonuc::before {
    content: "✔";
    position: absolute;
    top: 50%; left: 15px;
    transform: translateY(-50%);
    color: #00b894;
    font-size: 1.3em;
}

.sonuc.hata {
    background: #ffe4e4;
    border-left-color: #d93030;
    color: #d93030;
}
.sonuc.hata::before {
    content: "⚠"; color: #d93030;
}

/* ========================================================= */
/* ========== ANASAYFA METİN KUTUSU (index.html) ========== */
/* ========================================================= */

.bilgi-kutusu {
    background: var(--kart-arkaplan);
    border-radius: 20px;
    padding: 22px 24px;
    max-width: 800px;
    width: 100%;
    margin: 10px 0 30px;
    border: 1px solid rgba(222,226,230,0.9);
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
    text-align: left;
}

.bilgi-kutusu h2 {
    color: var(--vurgu-renk);
    margin-bottom: 10px;
}

.bilgi-kutusu p {
    margin-bottom: 8px;
    line-height: 1.7;
}

.bilgi-kutusu ul {
    margin-top: 10px;
    padding-left: 20px;
}

.bilgi-kutusu li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--metin-rengi);
}

/* ========================================================= */
/* ==== MATEMATİK SAYFASI (GRID KARTLAR) ==== */
/* ========================================================= */

.anasayfa-menu {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0 40px;
}

.arac-karti {
    display: block;
    background: var(--kart-arkaplan);
    border-radius: 20px;
    padding: 22px;
    border: 1px solid rgba(222,226,230,0.9);
    box-shadow: 0 12px 26px rgba(15,23,42,0.08);
    transition: 0.22s ease;
}

.arac-karti h3 {
    color: var(--vurgu-renk);
    font-size: 1.05em;
    margin-bottom: 6px;
}

.arac-karti p {
    color: var(--gri-metin);
    font-size: 0.9em;
    line-height: 1.55;
}

@media (hover: hover) {
    .arac-karti:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px rgba(15,23,42,0.14);
        border-color: transparent;
    }
}

/* ========================================================= */
/* ====================== REKLAMLAR ======================== */
/* ========================================================= */

.reklam-karti {
    min-height: 150px;
    background: rgba(255,255,255,0.92);
    border-radius: 18px;
    border: 2px dashed rgba(209,213,219,0.9);
    box-shadow: 0 12px 26px rgba(15,23,42,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.96em;
    color: var(--gri-metin);
}

/* Yan reklamlar – sadece çok geniş ekranlarda */
.reklam-sol, .reklam-sag {
    display: none;
    opacity: 0.85;
}

@media (min-width: 1450px) {
    .reklam-sol, .reklam-sag {
        display: flex;
        position: fixed;
        top: 120px;
        width: 160px;
        height: 600px;
        background: rgba(255,255,255,0.95);
        border: 1px dashed rgba(209,213,219,0.8);
        color: #6b7280;
        justify-content: center;
        align-items: center;
        font-weight: 500;
        font-size: 0.95em;
        box-shadow: 0 18px 36px rgba(15,23,42,0.15);
        backdrop-filter: blur(10px);
        border-radius: 14px;
        z-index: 10;
    }
    .reklam-sol { left: 15px; }
    .reklam-sag { right: 15px; }
}

/* ========================================================= */
/* ======================== MOBİL ========================== */
/* ========================================================= */

@media (max-width: 480px) {
    body { padding: 14px; }
    h1 { margin-bottom: 18px; }

    .anasayfa-menu {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
