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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tg-text);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }

.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--tab-height);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.screen.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.screen.hide-tabs {
    bottom: 0;
}

.screen-content {
    padding: var(--gap);
    padding-bottom: calc(var(--gap) + 20px);
}

.screen-title {
    margin-bottom: var(--gap);
}

/* Arabic text */
.arabic-text {
    font-family: 'Traditional Arabic', 'Scheherazade New', 'Amiri', serif;
    font-size: 22px;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

/* Scrollbar */
.screen::-webkit-scrollbar {
    width: 3px;
}

.screen::-webkit-scrollbar-thumb {
    background: var(--tg-hint);
    border-radius: 3px;
}
