/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #e67e22;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* Calculator */
.calculator {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

#calculator-form {
    margin-bottom: 30px;
}

.inputs-row {
    display: flex;
    gap: 15px;
    align-items: end;
    width: 100%;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 1rem;
}

input:not([type="number"]), select {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    width: 100%;
    box-sizing: border-box;
}

.number-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 40px 15px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.spinner-buttons {
    position: absolute;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.spinner-up, .spinner-down {
    background: #e67e22;
    color: white;
    border: none;
    width: 20px;
    height: 15px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.spinner-up {
    border-radius: 3px 3px 0 0;
}

.spinner-down {
    border-radius: 0 0 3px 3px;
}

.spinner-up:hover, .spinner-down:hover {
    background: #d35400;
}

input:focus, select:focus {
    outline: none;
    border-color: #e67e22;
    background: white;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calculate-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.3);
    background: #d35400;
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results */
.results {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid #e67e22;
}

.results.hidden {
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #555;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.result-value.saved {
    color: #28a745;
}

/* Info section */
.info-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.info-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.info-section h2:not(:first-child) {
    margin-top: 30px;
}

.info-section p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.7;
}

.info-section ul {
    margin-left: 20px;
    color: #666;
}

.info-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.info-section strong {
    color: #333;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .calculator, .info-section {
        padding: 25px;
    }
    
    .inputs-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .calculator, .info-section {
        padding: 20px;
    }
    
    input, select, .calculate-btn {
        padding: 12px;
    }
}
