:root {
    --gold: #c6a75e;
    --gold-light: rgba(198, 167, 94, 0.1);
    --dark: #111111;
    --light: #f8f8f8;
    --white: #ffffff;
    --gray-text: #6b7280;
    --gray-border: #e5e7eb;
    --font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif;
    --font-sans: Outfit, var(--font-arabic);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--light);
    color: var(--dark);
}

html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

[dir="rtl"] body {
    letter-spacing: 0;
}

a {
    color: inherit;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    font-family: Outfit, var(--font-arabic);
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    line-height: 1;
}

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

.app-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-nav a:hover {
    background: var(--gold-light);
    color: var(--dark);
}

.app-user {
    font-size: 1rem;
    color: var(--gray-text);
    white-space: nowrap;
}

.header-tools,
.public-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    background: var(--white);
}

.language-option {
    appearance: none;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-text);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    padding: 7px 9px;
}

.language-option.active {
    background: var(--gold);
    color: var(--white);
}

.language-option:hover {
    background: var(--gold-light);
    color: var(--dark);
}

.language-option.active:hover {
    background: var(--gold);
    color: var(--white);
}

[dir="rtl"] .ph-arrow-right::before {
    transform: scaleX(-1);
}

main {
    width: 100%;
}

@media (max-width: 900px) {
    .app-header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .app-user {
        width: 100%;
        text-align: center;
    }

    .header-tools,
    .public-actions {
        justify-content: center;
    }
}
