body {
    background: linear-gradient(135deg, #faf6f0 0%, #f0e6d4 100%);
    color: #3e2e1c;
}

header h1 {
    color: #3e2e1c;
}

.subtitle {
    color: #8c7a62;
}

.back-link {
    color: #8c7a62;
}

.back-link:hover {
    color: #b8860b;
}

footer {
    color: #8c7a62;
}

main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 850px) {
    main {
        grid-template-columns: 1fr;
    }
}

.calc-form, .result-card, .error-card {
    background: rgba(255, 252, 245, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 248, 230, 0.7);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8c7a62;
    margin-bottom: 18px;
    border-left: 3px solid #b8860b;
    padding-left: 10px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b5a42;
}

.input-group input {
    padding: 12px 14px;
    border: 1px solid #d4c5a9;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #3e2e1c;
    background: rgba(255, 252, 245, 0.7);
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #b8860b;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.15);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #b8860b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(184, 134, 11, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    transition: transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    background: #9a7209;
    box-shadow: 0 10px 20px -3px rgba(184, 134, 11, 0.25);
}

.submit-btn:active {
    transform: scale(0.98);
}

#downloadBtn {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #8b6914;
    border: 2px solid #8b6914;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.2s ease;
}

#downloadBtn:hover {
    background: #8b6914;
    color: white;
    box-shadow: 0 8px 16px rgba(139, 105, 20, 0.2);
}

.result-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #3e2e1c;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(250, 244, 232, 0.6);
    border: 1px solid rgba(212, 197, 169, 0.8);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.res-item:hover {
    background: rgba(245, 236, 218, 0.9);
}

.res-label {
    font-size: 0.9rem;
    color: #8c7a62;
    font-weight: 500;
}

.res-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.res-item strong {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c1e0e;
}

.unit {
    font-size: 0.8rem;
    color: #8c7a62;
    font-weight: 500;
}

.res-item.total {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.07) 0%, rgba(154, 114, 9, 0.03) 100%);
    border-color: rgba(184, 134, 11, 0.25);
    padding: 18px 20px;
}

.res-item.total .res-label {
    color: #5c4a1e;
    font-weight: 600;
    font-size: 0.95rem;
}

.res-item.total strong {
    font-size: 1.6rem;
    color: #8b6914;
}

.error-card {
    border-color: rgba(192, 57, 43, 0.2);
    background: rgba(253, 242, 240, 0.9);
    color: #8c1a11;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 15px 20px;
    margin-top: 20px;
}

.custom-link {
    color: #8c7a62;
    text-decoration: none;
    border-bottom: 1px dashed #8c7a62;
    transition: color 0.2s;
}

.custom-link:hover {
    color: #b8860b;
    border-color: #b8860b;
}
