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

html, body {
    overflow-x: hidden;
    font-size: 25px;
    font-family: 'Adobe Arabic', sans-serif;
    background: linear-gradient(135deg, #b0c4de, #708090);
    color: #333;
    min-height: 100vh;
    text-align: right;
    direction: rtl;
}

@font-face {
    font-family: 'Adobe Arabic';
    src: url('/fonts/adobe_arabic.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

h1, h2, h3 {
    color: navy;
    font-family: Arial, sans-serif;
}

header {
    background: linear-gradient(-90deg, #036, #00509e);
    color: #fff;
    border-bottom: 5px solid #2e4ba7;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em 0;
}

header h1 {
    margin: 0;
    font-size: 21px;
}

.container {
    margin: 50px auto;
    max-width: 800px;
    width: 90%;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-family: 'Adobe Arabic', sans-serif;
    font-size: 16px;
}

input[type="text"]:focus {
    border-color: #336;
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.3);
}

button {
    background-color: #336;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Adobe Arabic', sans-serif;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover, button:focus {
    background-color: navy;
    outline: none;
}

button:focus {
    box-shadow: 0 0 5px rgba(0, 0, 128, 0.5);
}

table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

td, th {
    padding: 12px;
    font-size: 23px;
    color: #444;
}

th {
    background-color: #add8e6;
    color: #fff;
    border-radius: 5px 5px 0 0;
}

tr:nth-child(even) td {
    background-color: #f2f2f2;
}

.dotted-line {
    border: none;
    border-top: 1.5px dotted #000;
    margin: 20px 0;
}

#results, .error-message, .info {
    margin-top: 20px;
    font-size: 25px;
}

.error-message {
    color: red;
    text-align: center;
}

#loading {
    text-align: center;
    font-size: 20px;
    color: #336;
}

#show-more {
    font-family: sans-serif;
    color: #007bff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #e8f0fe;
    border: 1px solid #007bff;
    transition: background-color 0.3s, color 0.3s;
}

#show-more:hover, #show-more:focus {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}

#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #003f6f;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    font-size: 16px;
    z-index: 100;
    display: none;
    transition: background-color 0.3s ease;
}

#scrollTopBtn:hover, #scrollTopBtn:focus {
    background-color: #1A6899;
    outline: none;
}

#scrollTopBtn .arrow {
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
}

@media (max-width: 1024px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 18px; }
    h2 { font-size: 17px; }
    h3 { font-size: 16px; }
    header { padding: 1em 0; }
}

@media (max-width: 480px) {
    h1 { font-size: 16px; }
    h2 { font-size: 15px; }
    h3 { font-size: 14px; }
}

@media (max-height: 660px) {
    .container { margin-top: 20px; }
}