@charset "utf-8";

body {
    background: url('../images/calc.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.35);
    z-index: -1;
}

.top-header {
    width: 100%;
    background: #2ecc71;
    padding: 14px 0;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.15rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.logo-header {
    height: 36px;
    vertical-align: middle;
    margin-left: 8px;
}

.page-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 10px;
}


.calc-card {
    width: 420px; 
    background: rgba(255,255,255,0.95);
    border-radius: 26px;
    padding: 26px 24px 30px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.85);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.calc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.logo-dot {
    width: 14px;
    height: 14px;
    background: #2ecc71;
    border-radius: 50%;
}

.calc-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.calc-display {
    width: 100%;
    background: #ecf9f2;
    border-radius: 14px;
    padding: 14px 16px;
    text-align: left;
    direction: ltr;
    font-size: 1.7rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(46,204,113,0.18);
    box-sizing: border-box;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 60px;
    gap: 10px;
}

.btn {
    border: none;
    border-radius: 14px;
    background: #f4f6f7;
    color: #2c3e50;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
    transition: 0.18s;
}

.btn-func {
    background: #ecf0f1;
    color: #7f8c8d;
    font-weight: 700;
}

.btn-op {
    background: #e8f9f0;
    color: #27ae60;
    font-weight: 800;
}

.btn-equal {
    background: #2ecc71;
    color: #fff;
    font-weight: 800;
}

.btn-zero {
    grid-column: span 2;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.14);
}

@media (max-width: 480px) {
    .calc-card {
        width: 95%;
        padding: 24px 18px 28px;
    }

    .calc-display {
        font-size: 1.5rem;
    }

    .calc-grid {
        grid-auto-rows: 54px;
    }

    .btn {
        font-size: 1.05rem;
    }
}
