/* ===========================
   GENEL STİLLER
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

body {
    display: flex;
    flex-direction: column; /* header üstte, calculator altta */
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    background: #edf1f4; /* orijinal arkaplan */
    padding-top: 20px;
    gap: 25px;
}

/* ===========================
   ÜST BAR (HEADER)
=========================== */
.header {
    position: relative;
    width: 90%;
    max-width: 950px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px;
    background: #edf1f4;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff;
}

    /* Logo */
    .header .logo {
        height: 45px;
        width: auto;
    }

/* “MD White” kutusu */
.md-white-container {
    background: #edf1f4;
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.1), inset -3px -3px 6px #fff;
    border-radius: 10px;
    padding: 6px 14px;
}

.md-white {
    font-weight: 500;
    color: #5166d6; /* ekranla aynı ton */
}

/* “Ana Ekrana Dön” butonu */
.back-to-home {
    background: #edf1f4;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1), -3px -3px 6px #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s ease;
}

    .back-to-home:hover {
        box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.1), inset -3px -3px 6px #fff;
        color: #5166d6;
    }

/* ===========================
   HESAP MAKİNESİ
=========================== */
.calculator {
    width: 340px;
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6e9ee;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

    .calculator .buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

        /* Ekran */
        .calculator .buttons #value {
            grid-column: span 4;
            width: 100%;
            height: 92px;
            line-height: 92px;
            text-align: right;
            padding: 0 18px;
            font-size: 2rem;
            font-weight: 500;
            color: #5166d6;
            background: #f7f8fb;
            border: 1px solid #e6e9ee;
            border-radius: 8px;
            user-select: none;
            margin-bottom: 10px;
        }

        /* Genel buton stili */
        .calculator .buttons span {
            padding: 14px 0;
            text-align: center;
            font-size: 1.05rem;
            color: #444;
            background: #f0f0f0;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.12s, transform 0.06s;
        }

            .calculator .buttons span:hover {
                background: #e6e6e6;
            }

            .calculator .buttons span:active {
                transform: translateY(1px);
            }

            /* Özel butonlar */
            .calculator .buttons span#clear {
                grid-column: span 2;
                background: #f44336;
                color: #fff;
                border: none;
            }

            .calculator .buttons span#plus {
                grid-row: span 2;
                background: #31a935;
                color: #fff;
                border: none;
            }

            .calculator .buttons span#equal {
                grid-row: span 2;
                background: #2196f3;
                color: #fff;
                border: none;
            }

/* ===========================
   TEMA DEĞİŞTİRME (TOGGLE)
=========================== */
.toggleBtn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #555;
    cursor: pointer;
    border: 2px solid #edf1f4;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px #fff;
    z-index: 30;
}

/* ===========================
   KARANLIK MOD
=========================== */
.dark {
    background: #282c2f;
}

    .dark .header {
        background: #33393e;
        box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25), -5px -5px 10px rgba(255, 255, 255, 0.08);
    }

    .dark .md-white-container,
    .dark .back-to-home {
        background: #33393e;
        color: #eee;
        box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3), inset -3px -3px 6px rgba(255, 255, 255, 0.05);
    }

    .dark .md-white {
        color: #9ab0ff;
    }

    .dark .calculator {
        background: #2f3337;
        border-color: #3a3f44;
    }

        .dark .calculator .buttons #value {
            background: #33393e;
            color: #eee;
            border-color: #3a3f44;
        }

        .dark .calculator .buttons span {
            background: #3a3f44;
            color: #eee;
            border-color: #444;
        }

    .dark .toggleBtn {
        background: #edf1f4;
        border: 2px solid #333;
        box-shadow: 5px 5px 10px rgba(0,0,0,0.25), -5px -5px 10px rgba(255,255,255,0.1);
    }
