* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
}

.input-section,
.result-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-calculate {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-calculate:active {
    transform: translateY(0);
}

.results {
    min-height: 150px;
}

.result-placeholder {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-style: italic;
}

.loading {
    text-align: center;
    color: #667eea;
    padding: 40px 0;
    font-size: 18px;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-item.highlight {
    background: #fff3cd;
    border-left-color: #ffc107;
    font-size: 1.2em;
}

.result-label {
    font-weight: 600;
    color: #555;
}

.result-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1.3em;
}

.result-item.highlight .result-value {
    color: #764ba2;
    font-size: 1.5em;
}

.details-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.details-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: -10px -10px 15px -10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.details-toggle:hover {
    background-color: #f8f9fa;
}

.toggle-icon {
    font-size: 0.8em;
    color: #667eea;
    transition: transform 0.3s;
    margin-left: 10px;
}

.details-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.details-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.details-table tr:last-child {
    border-bottom: none;
}

.details-table td {
    padding: 12px;
    color: #555;
}

.details-table td:first-child {
    width: 60%;
}

.details-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.details-table .total-row {
    background: #f8f9fa;
    font-size: 1.1em;
}

.details-table .total-row td {
    padding: 15px 12px;
    color: #667eea;
    font-weight: 700;
}

