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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.input-section {
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 15px;
    color: #666;
    font-size: 1.1rem;
}

.input-wrapper input {
    padding-left: 35px;
}

input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hint {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.bonus-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.result-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-label {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.result-value {
    font-size: 1.8rem;
    font-weight: bold;
}

.schedule-section {
    margin-top: 40px;
}

.schedule-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.schedule-toggle {
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: #e0e0e0;
}

.schedule-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background: #f8f9fa;
}

.comparison-section {
    margin-top: 40px;
}

.comparison-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.comparison-bar {
    margin-bottom: 15px;
}

.bar-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
}

.bar-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.bar-value {
    font-weight: 600;
    color: #333;
}

.info-section {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
}

.info-section h2 {
    margin-bottom: 15px;
    color: #333;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.info-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
}

footer a {
    color: white;
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
    
    .bonus-inputs {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    main {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    h2, h3, .result-card:not(.highlight) .result-value {
        color: #e2e8f0;
    }
    
    input[type="number"],
    select {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .result-card:not(.highlight) {
        background: #2d3748;
    }
    
    .info-section {
        background: #2d3748;
    }
    
    label, .hint, .bar-label {
        color: #a0aec0;
    }
    
    td {
        border-bottom-color: #4a5568;
    }
    
    tbody tr:hover {
        background: #2d3748;
    }
    
    .toggle-btn {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .toggle-btn:hover {
        background: #4a5568;
    }
    
    .bar-container {
        background: #2d3748;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section:not(.hidden) {
    animation: fadeIn 0.5s ease;
}