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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease-in;
}

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

.info-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.info-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.formula {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border-right: 4px solid #667eea;
}

.section {
    margin-bottom: 25px;
}

.section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

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

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

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

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

.btn-calculate {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.result {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

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

.result h3 {
    color: white;
    margin-bottom: 15px;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.status {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin: 15px 0;
    display: inline-block;
}

.status.success {
    background: #4caf50;
    color: white;
}

.status.warning {
    background: #ff9800;
    color: white;
}

.status.danger {
    background: #f44336;
    color: white;
}

.details {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    color: white;
    text-align: right;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

footer a:hover {
    border-bottom-color: white;
}

.note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 20px;
    }
    
    .result-value {
        font-size: 2rem;
    }
}
