.homepage-calculator--decimals {
    max-width: 820px;
}

.decimal-form {
    width: 100%;
}

.decimal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.decimal-panel,
.decimal-operation-panel,
.decimal-result,
.decimal-examples {
    border: 1px solid #eee;
    border-radius: 10px;
    background-color: #fff;
}

.decimal-panel,
.decimal-operation-panel {
    padding: 18px;
}

.decimal-panel-title {
    margin-bottom: 14px;
    color: #333;
    font-size: 15px;
    font-weight: 700;
}

.decimal-input-label {
    display: block;
    margin: 0;
}

.decimal-input-label span {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 12px;
    font-weight: 600;
}

.decimal-input-label input {
    height: 50px;
    font-size: 20px;
    font-weight: 700;
}

.decimal-operation-panel--fixed {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.decimal-fixed-operation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    border: 1px solid rgba(95, 106, 245, 0.15);
    border-radius: 10px;
    background-color: rgba(95, 106, 245, 0.08);
    color: #5f6af5;
}

.decimal-fixed-operation span {
    display: block;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.homepage-calculator--decimals .calculator-key {
    min-height: 46px;
    height: 46px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
}

.homepage-calculator--decimals .calculator-key--function {
    background-color: rgba(95, 106, 245, 0.08);
    border-color: rgba(95, 106, 245, 0.15);
    color: #5f6af5;
}

.homepage-calculator--decimals .calculator-key--function:hover {
    background-color: #5f6af5;
    border-color: #5f6af5;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--equal {
    background-color: #2bbb93;
    border-color: #2bbb93;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--equal:hover {
    background-color: #25a984;
    border-color: #25a984;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--danger {
    background-color: #ff4f7f;
    border-color: #ff4f7f;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--danger:hover {
    background-color: #fff;
    color: #ff4f7f;
    border-color: #ff4f7f;
}

.decimal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.decimal-main-button {
    min-width: 190px;
}

.decimal-result {
    margin-top: 18px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(95, 106, 245, 0.06), rgba(43, 187, 147, 0.06));
}

.decimal-result-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.decimal-result-label {
    margin-bottom: 4px;
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

.decimal-result-expression {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.decimal-result-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    margin: 10px 0 16px;
    color: #333;
    font-size: 34px;
    font-weight: 800;
    text-align: center;
    word-break: break-word;
}

.decimal-result-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.decimal-detail {
    padding: 12px;
    border: 1px solid rgba(95, 106, 245, 0.12);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.78);
}

.decimal-detail span {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 12px;
    font-weight: 600;
}

.decimal-detail strong {
    display: block;
    color: #333;
    font-size: 15px;
    word-break: break-word;
}

.decimal-error {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 79, 127, 0.25);
    border-radius: 8px;
    background-color: rgba(255, 79, 127, 0.08);
    color: #ff4f7f;
    font-size: 14px;
    font-weight: 600;
}

.decimal-error.is-visible {
    display: block;
}

.decimal-examples {
    margin-top: 18px;
    padding: 16px;
}

.decimal-examples-title {
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.decimal-example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.decimal-example-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(95, 106, 245, 0.15);
    border-radius: 6px;
    background-color: rgba(95, 106, 245, 0.08);
    color: #5f6af5;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.decimal-example-button:hover {
    background-color: #5f6af5;
    border-color: #5f6af5;
    color: #fff;
}

@media (max-width: 991px) {
    .homepage-calculator--decimals {
        max-width: 100%;
    }

    .decimal-layout {
        grid-template-columns: 1fr;
    }

    .decimal-fixed-operation {
        min-height: 64px;
    }
}

@media (max-width: 575px) {
    .decimal-panel,
    .decimal-operation-panel,
    .decimal-result,
    .decimal-examples {
        border-radius: 8px;
    }

    .decimal-panel,
    .decimal-operation-panel {
        padding: 14px;
    }

    .decimal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-main-button {
        width: 100%;
        min-width: 0;
    }

    .decimal-result {
        padding: 14px;
    }

    .decimal-result-value {
        min-height: 72px;
        font-size: 28px;
    }

    .decimal-result-details {
        grid-template-columns: 1fr;
    }

    .decimal-example-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-example-button {
        width: 100%;
    }
}