* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    padding: 20px;
    color: #334155;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
}

.calculator {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.inputs-section {
    padding: 40px;
    border-right: 1px solid #e2e8f0;
}

.results-section {
    padding: 40px;
    background: #fafbfc;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #1e293b;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #cbd5e1;
}

.input-group {
    position: relative;
}

.input-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #64748b;
    pointer-events: none;
}

.result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.result-unit {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
}

.final-result {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    margin-top: 8px;
}

.final-result .result-label {
    color: rgba(255, 255, 255, 0.8);
}

.final-result .result-value {
    color: white;
    font-size: 1.6rem;
}

.final-result .result-unit {
    color: rgba(255, 255, 255, 0.8);
}

.calculation-steps {
    margin-top: 24px;
    padding: 20px;
    background: #f1f5f9;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.calculation-steps h3 {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 12px;
    font-weight: 600;
}

.step {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 6px;
    font-family: 'SF Mono', Monaco, monospace;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .inputs-section {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 30px 24px;
    }

    .results-section {
        padding: 30px 24px;
    }

    .header h1 {
        font-size: 2rem;
    }

    body {
        padding: 16px;
    }
}

.info-tooltip {
    display: inline-block;
    margin-left: 6px;
    width: 16px;
    height: 16px;
    background: #64748b;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    cursor: help;
    position: relative;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pulse-animation {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}