/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* Main Calculator Container */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Input Section */
.input-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-section h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Buttons */
.calculate-btn, .reset-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.reset-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.reset-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-section h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-card {
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.result-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: 4px solid #ffd700;
    font-weight: 700;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Chart Container */
.chart-container {
    margin: 30px 0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

/* Breakdown Table */
.breakdown-section {
    margin-top: 30px;
}

.breakdown-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8fafc;
}

/* Information Section */
.info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.info-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.info-card h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-card p {
    color: #718096;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .input-section, .results-section {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .result-label, .result-value {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 20px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-section, .results-section, .info-section {
        padding: 15px;
    }
    
    .calculate-btn, .reset-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .calculate-btn {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* Error States */
.input-error {
    border-color: #e53e3e !important;
    background: #fed7d7 !important;
}

.error-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

