/* Global Colors */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
}

/* Calculator Card */
.calculator-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 30px;
    padding: 0;
    border: 3px solid var(--primary-color);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 25px;
    text-align: center;
}

/* Form Elements */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
    font-size: 1.1em;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.input-group-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: bold;
}

/* Calculate Button */
.btn-calculate {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    width: 100%;
    color: white;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-calculate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.6);
    background: linear-gradient(135deg, #2ecc71, var(--success-color));
}

/* Reset Button */
.btn-outline-primary {
    border: 2px solid var(--info-color);
    color: var(--info-color);
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: var(--info-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Result Items - Different Colors */
.result-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border-right: 5px solid;
}

.result-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Different border colors for each result item */
.result-item:nth-child(1) {
    border-right-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff, #e3f2fd);
}

.result-item:nth-child(2) {
    border-right-color: var(--warning-color);
    background: linear-gradient(135deg, #ffffff, #fff3e0);
}

.result-item:nth-child(3) {
    border-right-color: var(--info-color);
    background: linear-gradient(135deg, #ffffff, #e1f5fe);
}

.result-item:nth-child(4) {
    border-right-color: var(--success-color);
    background: linear-gradient(135deg, #ffffff, #e8f5e8);
}

.result-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--dark-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.result-label {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Final Result */
.final-result {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    margin-top: 25px;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
    border: 3px solid white;
}

.final-amount {
    font-size: 3.2em;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-label {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.final-note {
    opacity: 0.9;
    font-size: 1.1em;
    font-weight: 500;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    margin: 20px 0;
}

.spinner-border {
    color: var(--primary-color);
    width: 3rem;
    height: 3rem;
}

/* Alert */
.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid var(--danger-color);
    border-radius: 12px;
    color: #721c24;
    font-weight: 600;
}

/* Footer Links */
.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 8px;
}

.footer-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

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

.result-section {
    animation: fadeIn 0.5s ease-in;
}

/* Responsive Design */
@media (max-width: 768px) {
    .result-value {
        font-size: 1.6em;
    }
    
    .final-amount {
        font-size: 2.6em;
    }
    
    .btn-calculate {
        font-size: 1.2em;
        padding: 12px 25px;
    }
}

@media (max-width: 576px) {
    .result-value {
        font-size: 1.4em;
    }
    
    .final-amount {
        font-size: 2.2em;
    }
    
    .calculator-card {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 20px 15px;
    }
}

/* Colorful background for the page */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Header styling */
header h1 a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

header .lead {
    color: var(--dark-color);
    font-weight: 500;
}