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

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

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title i {
    color: #667eea;
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #718096;
    font-weight: 400;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Calculator Section */
.calculator-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: grid;
    gap: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.date-input,
.number-input,
.select-input {
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

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

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit .number-input {
    flex: 1;
}

.unit {
    font-weight: 500;
    color: #718096;
    min-width: 80px;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    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-top: 10px;
}

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

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

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

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

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

.result-header h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.period-info {
    color: #718096;
    font-size: 1.1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.result-item {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.result-item.loss {
    border-left: 5px solid #e53e3e;
}

.result-item.gain {
    border-left: 5px solid #38a169;
}

.result-item.difference {
    border-left: 5px solid #667eea;
}

.result-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.result-item.loss .result-icon {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}

.result-item.gain .result-icon {
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.result-item.difference .result-icon {
    background: linear-gradient(135deg, #667eea, #5a67d8);
}

.result-content h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.result-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-item.loss .result-amount {
    color: #e53e3e;
}

.result-item.gain .result-amount {
    color: #38a169;
}

.result-item.difference .result-amount {
    color: #667eea;
}

.result-description {
    color: #718096;
    font-size: 0.9rem;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Motivation Section */
.motivation-section {
    text-align: center;
}

.motivation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.motivation-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.motivation-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.motivation-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.footer p {
    margin-bottom: 10px;
}

.footer small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .title i {
        font-size: 2rem;
    }
    
    .header-content,
    .calculator-section,
    .results-section {
        padding: 25px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .input-with-unit {
        flex-direction: column;
        align-items: stretch;
    }
    
    .unit {
        text-align: center;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .result-amount {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}


