body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

html[lang="ar"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial', sans-serif;
  }
  
  html[lang="ar"] .radio-group,
  html[lang="ar"] .form-group {
    text-align: right;
  }
  
  html[lang="ar"] table {
    direction: rtl;
  }

  html[lang="ar"] td {
    text-align: right;
  }

  html[lang="ar"] th {
    text-align: right;
  }

.language-selector {
    margin-bottom: 20px;
    text-align: right;
}

.language-selector a {
    margin-left: 10px;
    text-decoration: none;
    color: #3498db;
}

.language-selector a.active {
    font-weight: bold;
    color: #2c3e50;
}

.calculator {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

h1, h2, h3 {
    color: #2c3e50;
}

h1 {
    margin-top: 0;
    font-size: 28px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.radio-option input {
    width: auto;
    margin-right: 8px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #2980b9;
}

#result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 6px;
    font-weight: 600;
    background-color: #fff;
    border-left: 5px solid #3498db;
}

.info-section {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.info-section h2, .info-section h3 {
    color: #2c3e50;
    margin-top: 1.5em;
}

.info-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.info-section th, .info-section td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.info-section th {
    background-color: #3498db;
    color: white;
}

.info-section tr:nth-child(even) {
    background-color: #f2f2f2;
}

.info-section ul, .info-section ol {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
}

.info-section strong {
    font-weight: 600;
}

.hidden {
    display: none;
}

.percentile-chart {
    margin-top: 15px;
    font-size: 14px;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    .calculator {
        padding: 15px;
    }
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}