* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
}

.calculator-container {
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.8s ease-out, float 6s ease-in-out infinite;
    overflow: hidden;
    background: white;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.header {
    text-align: center;
    margin-bottom: 25px;
    animation: slideInFromTop 0.6s ease-out;
}

.logo {
    height: 60px;
    margin-bottom: 10px;
    animation: pulse 3s infinite;
}

h1 {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    color: #4b5563;
    font-size: 14px;
}

@keyframes slideInFromTop {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.input-group {
    margin-bottom: 20px;
    animation: slideInFromLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.input-group:nth-child(2) { animation-delay: 0.1s; }
.input-group:nth-child(3) { animation-delay: 0.2s; }
.input-group:nth-child(4) { animation-delay: 0.3s; }
.input-group:nth-child(5) { animation-delay: 0.4s; }

@keyframes slideInFromLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-symbol {
    font-weight: 600;
    color: #1e40af;
}

input[type="number"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: #e5e7eb;
    border-radius: 10px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #1e3a8a;
}

.value-display {
    min-width: 80px;
    text-align: center;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    padding: 5px 10px;
    border-radius: 8px;
}

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #1e40af, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.results {
    margin-top: 30px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease-out;
    display: none;
    background: white;
    border: 1px solid #e5e7eb;
}

.results h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e3a8a;
    font-size: 22px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e5e7eb;
    animation: slideInFromRight 0.5s ease-out;
    animation-fill-mode: both;
}

.result-item:nth-child(2) { animation-delay: 0.1s; }
.result-item:nth-child(3) { animation-delay: 0.2s; }
.result-item:nth-child(4) { animation-delay: 0.3s; }

@keyframes slideInFromRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.result-label {
    font-weight: 500;
    color: #4b5563;
}

.result-value {
    font-weight: 700;
    color: #1e40af;
    font-size: 18px;
}

.chart-container {
    height: 150px;
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    animation: growUp 1s ease-out;
}

@keyframes growUp {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.chart-bar {
    width: 50px;
    background: linear-gradient(to top, #1e40af, #3b82f6);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: height 1s ease-out;
    box-shadow: 0 3px 10px rgba(30, 64, 175, 0.3);
}

.chart-label {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.chart-value {
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
}

.disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    line-height: 1.5;
    animation: fadeIn 1s ease-out;
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 20px;
    }
    
    .range-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .value-display {
        text-align: left;
    }
    
    h1 {
        font-size: 20px;
    }
}