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

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

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

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 50px;
    animation: bounce 2s infinite;
}

.logo h1 {
    font-size: 42px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.95;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-header.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.card-header i {
    font-size: 28px;
}

.card-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.card-body {
    padding: 35px;
}

/* Form Styles */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.input-group label i {
    color: #667eea;
    font-size: 18px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    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);
}

/* Buttons */
.btn-calculate,
.btn-new {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.btn-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 10px;
}

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

.btn-new {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    margin-top: 20px;
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

/* Result Styles */
.result-card {
    display: none;
}

.result-card.show {
    display: block;
}

.hidden {
    display: none;
}

.result-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
}

.result-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.result-value .label {
    color: white;
    font-size: 20px;
    font-weight: 300;
}

.result-value .value {
    color: #ffeb3b;
    font-size: 48px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-value .unit {
    color: white;
    font-size: 24px;
    font-weight: 600;
}

/* Result Details */
.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-item i {
    color: #667eea;
    font-size: 24px;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

.detail-unit {
    color: #777;
}

/* Recommendations */
.recommendations {
    background: #f0f7ff;
    border-right: 4px solid #667eea;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.recommendations h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    margin-bottom: 15px;
    font-size: 20px;
}

.recommendations h3 i {
    font-size: 22px;
}

.recommendations ul {
    list-style: none;
    padding: 0;
}

.recommendations li {
    padding: 10px 0;
    color: #555;
    display: flex;
    align-items: start;
    gap: 10px;
}

.recommendations li:before {
    content: "✓";
    color: #11998e;
    font-weight: 700;
    font-size: 18px;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.info-card i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 15px;
}

.info-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.info-card p {
    color: #666;
    line-height: 1.8;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    color: #666;
    display: flex;
    align-items: start;
    gap: 10px;
}

.info-card li:before {
    content: "•";
    color: #667eea;
    font-weight: 700;
    font-size: 20px;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.footer p {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer i {
    color: #ffeb3b;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffeb3b;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 32px;
    }
    
    .logo i {
        font-size: 40px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .card-body {
        padding: 25px;
    }
    
    .result-value .value {
        font-size: 36px;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .footer p {
        font-size: 14px;
    }
}