@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

:root {
    --main-background: #0f1419;
    --card-background: #1e2328;
    --primary-brand: #2563eb;
    --secondary-brand: #7c3aed;
    --accent-gold: #f59e0b;
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --border-subtle: #334155;
    --hover-overlay: #475569;
}

body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--main-background);
    color: var(--text-main);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

header {
    background-color: var(--card-background);
    padding: 1.5em 0;
    text-align: center;
    border-bottom: 2px solid var(--primary-brand);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 2.4em;
    font-weight: 700;
    color: var(--primary-brand);
    text-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

nav ul {
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease-in-out;
    position: relative;
}

nav ul li a::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--primary-brand);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

nav ul li a:hover::before, nav ul li a.active::before {
    visibility: visible;
    transform: scaleX(1);
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-brand);
}

main {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 40px auto;
}

section {
    background-color: var(--card-background);
    margin-bottom: 35px;
    padding: 35px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

section h2 {
    color: var(--primary-brand);
    font-size: 2em;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 15px;
}

p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

footer {
    background-color: #111317;
    color: var(--text-secondary);
    text-align: center;
    padding: 2.5em 0;
    width: 100%;
    border-top: 2px solid var(--primary-brand);
}

/* Form styling */
form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1.05em;
    color: var(--text-main);
}

form input[type="text"],
form input[type="url"],
form input[type="email"],
form input[type="tel"],
form select,
form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 22px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-sizing: border-box;
    background-color: var(--main-background);
    color: var(--text-main);
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
}

form input[type="text"]:focus,
form input[type="url"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form select:focus,
form textarea:focus {
    border-color: var(--primary-brand);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
    outline: none;
}

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--primary-brand);
    transform: scale(1.3);
    margin-left: 10px;
}

form button, button {
    background-color: var(--primary-brand);
    color: #fff;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

form button[type="reset"] {
    background-color: #4f545c;
    margin-right: 15px;
}

form button:hover, button:hover:not(:disabled) {
    background-color: #1d4ed8;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

form button[type="reset"]:hover {
    background-color: #666b74;
}

button:disabled {
    background-color: #3a3f47;
    cursor: not-allowed;
    transform: none;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 18px;
    text-align: right;
    border-bottom: 1px solid var(--border-subtle);
}

th {
    background-color: #111317;
    color: var(--primary-brand);
    font-weight: 700;
    font-size: 1.15em;
    text-transform: uppercase;
}

tr {
    transition: background-color 0.3s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: var(--hover-overlay);
}

.app-details-row td {
    background-color: var(--hover-overlay);
    padding: 0;
}

.app-details {
    padding: 25px;
    background-color: var(--main-background);
    border-right: 5px solid var(--accent-gold);
    border-left: none;
}

.app-details p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.app-details img {
    border-radius: 8px;
    border: 2px solid var(--border-subtle);
    max-width: 150px;
    margin-top: 10px;
}

a {
    color: var(--primary-brand);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}
