/**
 * Base styles - Reset and foundational styles
 */

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

html {
    /* Stop iOS Safari from inflating text in landscape. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    /* Plus Jakarta Sans has no Arabic glyphs, so a broad system stack follows it
       and each platform picks a good Arabic face automatically. */
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif,
        'Segoe UI', 'Noto Sans Arabic', 'Geeza Pro', 'Arabic Typesetting', 'Tahoma';
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Arabic script needs a little more leading to stay comfortable to read. */
[lang="ar"] body {
    line-height: 1.9;
}

/* Media never overflows its container. */
img, video {
    max-width: 100%;
}

/* Floating page up/down controls, revealed while the page is scrolling. One
   click moves six video cards' worth of content; a double click goes all the
   way to the end. */
.scroll-arrows {
    position: fixed;
    inset-inline-start: 16px;
    inset-block-end: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 900;
}

.scroll-arrows[hidden] {
    display: none;
}

.scroll-arrows:not([hidden]) {
    animation: scroll-arrows-reveal 0.16s ease-out;
}

@keyframes scroll-arrows-reveal {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-arrows:not([hidden]) {
        animation: none;
    }
}

.scroll-arrows button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(28, 28, 28, 0.88);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast),
                opacity var(--transition-fast);
}

.scroll-arrows button:hover:not(:disabled) {
    background: rgba(58, 58, 58, 0.96);
    border-color: rgba(255, 255, 255, 0.4);
}

.scroll-arrows button:active:not(:disabled) {
    transform: scale(0.92);
}

.scroll-arrows button:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

.scroll-arrows button:disabled {
    opacity: 0.4;
    cursor: default;
    box-shadow: none;
}

.scroll-arrow-icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.scroll-arrows button:hover:not(:disabled) .scroll-arrow-icon-up {
    transform: translateY(-2px);
}

.scroll-arrows button:hover:not(:disabled) .scroll-arrow-icon-down {
    transform: translateY(2px);
}

/* The Shorts feed has its own full-screen scroller, so page arrows do not
   apply there. */
body.shorts-immersive .scroll-arrows {
    display: none;
}

@media (max-width: 768px) {
    .scroll-arrows {
        inset-inline-start: 12px;
        inset-block-end: calc(84px + env(safe-area-inset-bottom, 0px));
    }
}

/* Main Content Container */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Tablet and phones */
@media (max-width: 768px) {
    .main-content {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 12px;
    }
}


.fz-splash{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#0f0f0f;transition:opacity .4s ease}.fz-splash.is-hidden{opacity:0;pointer-events:none}.fz-splash img{max-width:100%;max-height:100%;object-fit:contain}
