* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1 {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
    color: white;
    margin-bottom: 0;
}

.description {
    text-align: center;
    padding: 15px 20px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.currency-selector {
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.currency-btn-container {
    position: relative;
    display: inline-block;
}

.currency-toggle-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.currency-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4);
    background: linear-gradient(135deg, #7a1bdb 0%, #3585ff 100%);
}

.currency-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(37, 117, 252, 0.3);
}

.currency-label {
    opacity: 0.9;
}

.currency-value {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.toggle-indicator {
    font-size: 12px;
    opacity: 0.8;
}

.calculator {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}

.input-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.result-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-left: 1px solid #eee;
}

@media (max-width: 768px) {
    .result-section {
        border-left: none;
        border-top: 1px solid #eee;
    }
}

.results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.total {
    font-weight: bold;
    font-size: 18px;
    color: #3498db;
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 15px;
}

.chart-container {
    height: 250px;
    position: relative;
}

.formula-info {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
    text-align: center;
}

.info-section p {
    text-align: center;
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.formula-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.formula-display {
    display: inline-block;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #8e44ad;
    background: #f1f3f5;
    padding: 15px 25px;
    border-radius: 8px;
    display: inline-block;
}

.parameters-section {
    margin: 30px 0;
}

.parameters-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.parameter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.parameter-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
}

.param-label {
    background: #3498db;
    color: white;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    margin-right: 12px;
    min-width: 40px;
    text-align: center;
}

.param-desc {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

.calculation-steps {
    margin: 30px 0;
}

.calculation-steps h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.step {
    display: flex;
    margin-bottom: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.step-number {
    background: #8e44ad;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 20px;
    min-width: 60px;
    text-align: center;
}

.step-content {
    padding: 20px;
    flex: 1;
}

.step-content h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.step-content p {
    color: #495057;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.important-considerations {
    margin: 30px 0;
}

.important-considerations h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
}

.important-considerations ul {
    list-style-type: none;
    padding: 0;
}

.important-considerations li {
    background: white;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #e74c3c;
}

.important-considerations li strong {
    color: #e74c3c;
}

.formula-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}