:root {
     --brand: #4F46E5;
     --dark-bg: #0f172a;
     --card-bg: #ffffff;
     --text-main: #1e293b;
     --text-muted: #64748b;
     --border: #e2e8f0;
     --radius: 16px;
     --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
     --green-bg: #dcfce7;
     --green-text: #166534;
     --orange-bg: #ffedd5;
     --orange-text: #9a3412;
     --red-bg: #fee2e2;
     --red-text: #991b1b;
}
 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
}
 body {
     font-family: 'Cairo', sans-serif;
     background-color: #f8fafc;
     color: var(--text-main);
     line-height: 1.5;
}

 .container {
     max-width: 1100px;
     margin: 0 auto;
     padding: 0 20px;
}
 header {
     padding: 20px 0;
     position: absolute;
     width: 100%;
     top: 0;
     z-index: 10;
}
 .nav-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
}
 .logo {
     width: 150px;
     text-decoration: none;
}
 .lang-btn {
     background: rgba(255,255,255,0.1);
     color: white;
     border: 1px solid rgba(255,255,255,0.2);
     padding: 8px 16px;
     border-radius: 50px;
     cursor: pointer;
     font-size: 0.9rem;
     transition: all 0.2s;
     font-family: inherit;
}
 .lang-btn:hover {
     background: rgba(255,255,255,0.2);
}
 .hero {
     background-color: var(--dark-bg);
     color: white;
     text-align: center;
     padding: 140px 20px 180px;
     position: relative;
     overflow: hidden;
}
 .hero::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -20%;
     width: 80%;
     height: 200%;
     background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, rgba(0,0,0,0) 70%);
     transform: rotate(-15deg);
     pointer-events: none;
}
 .hero h1 {
     font-size: 2.8rem;
     font-weight: 900;
     margin-bottom: 15px;
     line-height: 1.2;
}
 .hero p {
     font-size: 1.1rem;
     color: #94a3b8;
     max-width: 600px;
     margin: 0 auto;
}
 .calculator-wrapper {
     margin-top: -100px;
     position: relative;
     z-index: 5;
     margin-bottom: 60px;
}
 .card {
     background: var(--card-bg);
     border-radius: 24px;
     box-shadow: var(--shadow-xl);
     padding: 40px;
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 40px;
     align-items: start;
}
 .inputs-area h2 {
     font-size: 1.25rem;
     margin-bottom: 24px;
     color: var(--text-main);
}
 .input-group {
     margin-bottom: 20px;
}
 label {
     font-weight: 600;
     font-size: 0.9rem;
     color: var(--text-main);
     display: block;
     margin-bottom: 8px;
}
 .field-wrapper {
     position: relative;
     display: flex;
     align-items: center;
}
 input {
     width: 100%;
     padding: 14px 16px;
     border: 1px solid var(--border);
     border-radius: 12px;
     font-size: 1rem;
     background: #f9fafb;
     transition: border 0.2s;
     font-family: inherit;
}
 input:focus {
     outline: none;
     border-color: var(--brand);
     background: white;
}
 .input-icon {
     position: absolute;
     color: var(--text-muted);
     pointer-events: none;
}
 html[dir="ltr"] input {
     padding-left: 44px;
}
 html[dir="ltr"] .input-icon {
     left: 16px;
}
 html[dir="rtl"] input {
     padding-right: 44px;
}
 html[dir="rtl"] .input-icon {
     right: 16px;
}
 .results-area {
     background: #f1f5f9;
     border-radius: 20px;
     padding: 30px;
     text-align: center;
     min-height: 320px;
     display: flex;
     flex-direction: column;
     justify-content: center;
}
 .empty-state {
     color: var(--text-muted);
     font-size: 0.95rem;
}
 .result-content {
     display: none;
     animation: fadeIn 0.4s ease;
}
 .result-content.active {
     display: block;
}
 .big-number {
     font-size: 3.5rem;
     font-weight: 900;
     line-height: 1;
     margin-bottom: 5px;
}
 .unit-label {
     text-transform: uppercase;
     letter-spacing: 1px;
     font-size: 0.85rem;
     color: var(--text-muted);
     margin-bottom: 20px;
     font-weight: 700;
}
 .alert-message {
     margin-bottom: 20px;
     padding: 12px 15px;
     border-radius: 10px;
     font-size: 0.9rem;
     font-weight: 600;
     line-height: 1.4;
}
 .alert-green {
     background-color: var(--green-bg);
     color: var(--green-text);
}
 .alert-orange {
     background-color: var(--orange-bg);
     color: var(--orange-text);
}
 .alert-red {
     background-color: var(--red-bg);
     color: var(--red-text);
}
 .stats-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 15px;
     border-top: 1px solid #cbd5e1;
     padding-top: 20px;
}
 .stat-item strong {
     display: block;
     font-size: 1.2rem;
     color: var(--text-main);
}
 .stat-item span {
     font-size: 0.8rem;
     color: var(--text-muted);
}
 .content-area {
     max-width: 700px;
     margin: 0 auto 60px;
     text-align: center;
}
 .content-area h3 {
     margin-bottom: 10px;
}
 .content-area p {
     color: var(--text-muted);
}
 footer {
     border-top: 1px solid var(--border);
     padding: 40px 0;
     text-align: center;
     font-size: 0.9rem;
     color: var(--text-muted);
}
 .developer-tag {
     display: inline-block;
     margin-top: 10px;
     font-weight: 700;
     color: var(--brand);
     text-decoration: none;
     border: 1px solid rgba(79, 70, 229, 0.2);
     padding: 5px 12px;
     border-radius: 50px;
     transition: all 0.2s;
}
 .developer-tag:hover {
     background: var(--brand);
     color: white;
}
 @media (max-width: 768px) {
     .hero {
         padding: 120px 20px 120px;
    }
     .hero h1 {
         font-size: 2rem;
    }
     .card {
         grid-template-columns: 1fr;
         padding: 25px;
         gap: 30px;
    }
     .calculator-wrapper {
         margin-top: -50px;
    }
     .results-area {
         min-height: auto;
    }
}
 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(10px);
    }
     to {
         opacity: 1;
         transform: translateY(0);
    }
}
