/* =========================================
   SMARTCALC CALCULATOR
========================================= */

.calculator-page {
    min-height: 100vh;
}


/* =========================================
   INTRO
========================================= */

.calculator-intro {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    padding: 70px 20px 35px;
}

.intro-badge {
    display: inline-block;

    padding: 8px 14px;

    border-radius: 30px;

    background: #eef2ff;

    color: #5b5ce2;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 18px;
}

.calculator-intro h1 {
    margin: 0;

    font-size: 48px;

    line-height: 1.1;

    color: #172033;

    font-weight: 800;
}

.calculator-intro p {
    margin: 18px auto 0;

    max-width: 620px;

    color: #687386;

    font-size: 17px;

    line-height: 1.7;
}


/* =========================================
   CALCULATOR SECTION
========================================= */

.calculator-section {

    width: min(1100px, calc(100% - 40px));

    margin: 25px auto 80px;

    display: grid;

    grid-template-columns: 430px 1fr;

    gap: 35px;

    align-items: start;
}


/* =========================================
   CALCULATOR CARD
========================================= */

.calculator-wrapper {

    display: flex;

    justify-content: center;
}

.calculator {

    width: 100%;

    max-width: 430px;

    padding: 22px;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            #171b2d,
            #0d1020
        );

    box-shadow:
        0 30px 70px rgba(15, 23, 42, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.08);

    border: 1px solid rgba(255,255,255,0.06);
}


/* =========================================
   CALCULATOR TOP
========================================= */

.calculator-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;

    padding: 0 5px;
}

.calculator-brand {

    color: #ffffff;

    font-size: 15px;

    font-weight: 800;

    letter-spacing: 0.5px;
}

.calculator-status {

    font-size: 12px;

    color: #8e9ab8;

    padding: 6px 10px;

    border-radius: 20px;

    background: rgba(255,255,255,0.06);
}


/* =========================================
   DISPLAY
========================================= */

.display-area {

    height: 125px;

    padding: 18px 18px 15px;

    margin-bottom: 18px;

    border-radius: 20px;

    background: #090c17;

    border: 1px solid rgba(255,255,255,0.05);

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    overflow: hidden;
}

.expression {

    min-height: 25px;

    text-align: right;

    color: #737d99;

    font-size: 16px;

    overflow: hidden;

    white-space: nowrap;
}

.display {

    margin-top: 4px;

    text-align: right;

    color: #ffffff;

    font-size: 42px;

    line-height: 1.1;

    font-weight: 500;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================
   BUTTON GRID
========================================= */

.calculator-buttons {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 11px;
}


/* =========================================
   BUTTONS
========================================= */

.calc-btn {

    height: 72px;

    border: none;

    border-radius: 18px;

    cursor: pointer;

    font-size: 22px;

    font-weight: 650;

    transition:
        transform 0.12s ease,
        filter 0.12s ease,
        background 0.12s ease;

    user-select: none;

    -webkit-tap-highlight-color: transparent;
}

.calc-btn:hover {

    filter: brightness(1.12);
}

.calc-btn:active {

    transform: scale(0.94);
}


/* NUMBER */

.calc-btn.number {

    background: #242a3c;

    color: #ffffff;
}

.calc-btn.number:hover {

    background: #2c3349;
}


/* FUNCTION */

.calc-btn.function {

    background: #353b4e;

    color: #dce2f1;

    font-size: 17px;
}


/* OPERATORS */

.calc-btn.operator {

    background: #5558e8;

    color: #ffffff;

    font-size: 25px;
}


/* EQUALS */

.calc-btn.equals {

    background: #7467f4;

    color: #ffffff;

    font-size: 26px;

    grid-column: span 2;
}


/* ZERO */

.calc-btn.zero {

    grid-column: span 2;
}


/* =========================================
   HISTORY
========================================= */

.history-panel {

    min-height: 430px;

    background: #ffffff;

    border: 1px solid #e7eaf0;

    border-radius: 25px;

    box-shadow:
        0 15px 45px rgba(20, 30, 60, 0.07);

    overflow: hidden;
}

.history-header {

    padding: 25px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom: 1px solid #edf0f5;
}

.history-label {

    color: #6568e8;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.history-header h2 {

    margin: 5px 0 0;

    color: #172033;

    font-size: 24px;
}

.clear-history {

    border: none;

    background: #f1f2f7;

    color: #555d70;

    padding: 9px 14px;

    border-radius: 10px;

    font-weight: 700;

    cursor: pointer;
}

.clear-history:hover {

    background: #e8eaf1;
}


/* HISTORY LIST */

.history-list {

    padding: 18px 25px;
}

.history-item {

    padding: 17px 0;

    border-bottom: 1px solid #eef0f5;

    cursor: pointer;
}

.history-item:last-child {

    border-bottom: none;
}

.history-expression {

    color: #7b8497;

    font-size: 14px;

    margin-bottom: 5px;
}

.history-result {

    color: #1a2235;

    font-size: 23px;

    font-weight: 750;
}

.history-item:hover .history-result {

    color: #5c5ee8;
}


/* EMPTY HISTORY */

.empty-history {

    min-height: 320px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    padding: 30px;
}

.empty-icon {

    width: 62px;

    height: 62px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #f1f2f8;

    font-size: 28px;

    margin-bottom: 18px;
}

.empty-history h3 {

    margin: 0;

    color: #263147;

    font-size: 18px;
}

.empty-history p {

    margin-top: 8px;

    color: #9aa2b1;

    line-height: 1.6;

    font-size: 14px;
}


/* =========================================
   SEO CONTENT
========================================= */

.seo-content {

    width: min(1100px, calc(100% - 40px));

    margin: 0 auto 80px;
}

.seo-card {

    padding: 45px;

    border-radius: 28px;

    background: #ffffff;

    border: 1px solid #e8ebf2;

    box-shadow:
        0 15px 45px rgba(20,30,60,0.05);
}

.seo-card h2 {

    margin: 0 0 15px;

    color: #172033;

    font-size: 30px;
}

.seo-card > p {

    max-width: 850px;

    color: #687386;

    line-height: 1.8;

    font-size: 16px;
}

.seo-grid {

    margin-top: 35px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.seo-grid article {

    padding: 25px;

    border-radius: 18px;

    background: #f8f9fc;
}

.seo-icon {

    font-size: 25px;

    margin-bottom: 12px;
}

.seo-grid h3 {

    margin: 0 0 8px;

    color: #263147;
}

.seo-grid p {

    margin: 0;

    color: #788294;

    line-height: 1.6;

    font-size: 14px;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {

    margin-top: 40px;

    background: #111525;

    color: #ffffff;
}

.footer-container {

    width: min(1100px, calc(100% - 40px));

    margin: auto;

    padding: 40px 0;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 30px;
}

.footer-brand {

    font-size: 22px;

    font-weight: 800;
}

.footer-brand span {

    color: #7067ef;
}

.footer-container p {

    color: #8e97ab;

    margin: 8px 0 0;
}

.footer-links {

    display: flex;

    gap: 25px;
}

.footer-links a {

    color: #cbd0dd;

    text-decoration: none;

    font-weight: 600;
}

.footer-links a:hover {

    color: #8178ff;
}