/* ==========================================================================
   في عالمٍ آخر — IN ANOTHER LIFE
   Cinematic Dark Atmospheric Stylesheet — v3.0 Premium Overhaul
   ========================================================================== */

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

/* ============================================
   TOKEN SYSTEM — DESIGN FOUNDATION
   ============================================ */
:root {
    --bg-color:             #020202;
    --bg-grid:              rgba(255, 255, 255, 0.004);
    --text-primary:         #dddddd;
    --text-muted:           #777777;
    --text-dim:             #444444;
    --accent-gold:          #c5a880;
    --accent-gold-glow:     rgba(197, 168, 128, 0.15);
    --accent-gold-faint:    rgba(197, 168, 128, 0.04);
    --accent-gold-ultra:    rgba(197, 168, 128, 0.02);
    --system-red:           #ff3333;
    --system-green:         #00ff66;
    --terminal-bg:          rgba(10, 8, 6, 0.82);
    --terminal-border:      rgba(197, 168, 128, 0.12);
    --terminal-border-soft: rgba(197, 168, 128, 0.06);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', 'Tajawal', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ATMOSPHERIC LAYERS — VIGNETTE + GRID
   ============================================ */

/* Heavy cinematic vignette — claustrophobic prison cell framing */
.cinema-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(0, 0, 0, 0.5) 65%,
        rgba(0, 0, 0, 0.92) 100%
    );
    z-index: 9;
    pointer-events: none;
}

/* Ancient terminal tracking grid with infinite 3D parallax drift */
.simulation-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
    background-size: 65px 65px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
    animation: gridDrift 90s linear infinite;
    transform-origin: center center;
}

@keyframes gridDrift {
    0%   { background-position: 0 0, 0 0;       transform: perspective(800px) rotateX(0deg); }
    50%  { background-position: 32px 32px, 32px 32px; transform: perspective(800px) rotateX(1.5deg); }
    100% { background-position: 65px 65px, 65px 65px; transform: perspective(800px) rotateX(0deg); }
}

/* ============================================
   BOOT SCREEN — CINEMATIC INTRO
   ============================================ */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.boot-text-wrapper {
    text-align: center;
    width: 100%;
    max-width: 680px;
    padding: 0 30px;
}

#cinema-text {
    font-family: 'Tajawal', sans-serif;
    font-size: 22px;
    font-weight: 200;
    line-height: 1.9;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    direction: rtl;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 2em;
    display: block;
}

/* Blinking cursor appended to cinema text */
#cinema-text::after {
    content: '▋';
    animation: cursorPulse 0.9s step-end infinite;
    color: var(--accent-gold);
    opacity: 0.8;
    font-size: 0.85em;
    margin-right: 3px;
}

@keyframes cursorPulse {
    0%, 100% { opacity: 0.8; }
    50%       { opacity: 0; }
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */
#main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 60px;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-content.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
    margin-bottom: 65px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-eyebrow {
    font-family: 'Inter', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 5px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.roman-title {
    font-size: 46px;
    font-weight: 200;
    letter-spacing: 12px;
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(221, 221, 221, 0.08);
    font-family: 'Tajawal', sans-serif;
    line-height: 1;
}

.roman-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-top: 4px;
}

/* ============================================
   COVER SECTION — CORE DISINTEGRATION EFFECT
   ============================================ */
.cover-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 55px;
    position: relative;
}

.glitch-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 3px;
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(197, 168, 128, 0.04);
    animation: ambientBreath 7s ease-in-out infinite alternate;
    cursor: pointer;
}

@keyframes ambientBreath {
    0%   { transform: scale(1);     box-shadow: 0 40px 90px rgba(0,0,0,0.95), 0 0 0 1px rgba(197,168,128,0.04); }
    100% { transform: scale(1.012); box-shadow: 0 50px 100px rgba(0,0,0,0.98), 0 0 20px rgba(197,168,128,0.03); }
}

.glitch-wrapper:hover {
    animation-play-state: paused;
}

/* Hidden message — revealed on hover beneath the disintegrating cover */
.hidden-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    text-align: center;
    color: var(--accent-gold);
    font-family: 'Tajawal', sans-serif;
    font-size: 20px;
    font-weight: 200;
    line-height: 2;
    direction: rtl;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    /* Gold neon pulse glow on the revealed text */
    text-shadow:
        0 0 15px rgba(197, 168, 128, 0.6),
        0 0 35px rgba(197, 168, 128, 0.3),
        0 0 70px rgba(197, 168, 128, 0.15);
    transition:
        opacity 1.4s ease-in-out 0.3s,
        transform 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    animation: hiddenMsgPulse 3s ease-in-out infinite alternate;
    animation-play-state: paused;
}

@keyframes hiddenMsgPulse {
    0%   { text-shadow: 0 0 15px rgba(197,168,128,0.6), 0 0 35px rgba(197,168,128,0.3), 0 0 70px rgba(197,168,128,0.15); }
    100% { text-shadow: 0 0 20px rgba(197,168,128,0.8), 0 0 50px rgba(197,168,128,0.45), 0 0 100px rgba(197,168,128,0.25); }
}

/* Main cover — disintegration into digital ash */
.main-cover {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;

    /* Initial mask — fully visible */
    -webkit-mask-image: radial-gradient(
        ellipse at center,
        #000 100%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse at center,
        #000 100%,
        transparent 100%
    );
    -webkit-mask-size: 120% 120%;
    mask-size: 120% 120%;
    -webkit-mask-position: center;
    mask-position: center;

    transition:
        -webkit-mask-size 1.8s cubic-bezier(0.4, 0, 0.2, 1),
        mask-size 1.8s cubic-bezier(0.4, 0, 0.2, 1),
        -webkit-mask-image 1.8s ease,
        mask-image 1.8s ease,
        opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1.8s cubic-bezier(0.4, 0, 0.2, 1),
        filter 1.8s ease;

    opacity: 1;
    filter: brightness(1) saturate(1);
}

/* Hover: disintegration / evaporation into digital ash */
.glitch-wrapper:hover .main-cover {
    opacity: 0.04;
    transform: scale(1.04) translateY(-8px);
    filter: brightness(1.4) saturate(0) blur(2px);
    -webkit-mask-image: radial-gradient(
        ellipse at 52% 48%,
        transparent 8%,
        rgba(0,0,0,0.15) 20%,
        transparent 32%,
        rgba(0,0,0,0.08) 45%,
        transparent 60%,
        rgba(0,0,0,0.05) 75%,
        transparent 88%
    );
    mask-image: radial-gradient(
        ellipse at 52% 48%,
        transparent 8%,
        rgba(0,0,0,0.15) 20%,
        transparent 32%,
        rgba(0,0,0,0.08) 45%,
        transparent 60%,
        rgba(0,0,0,0.05) 75%,
        transparent 88%
    );
    -webkit-mask-size: 400% 400%;
    mask-size: 400% 400%;
}

/* Hover: reveal hidden message */
.glitch-wrapper:hover .hidden-message {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
    animation-play-state: running;
}

/* ============================================
   QUANTUM CHAT TERMINAL — FULL REDESIGN
   ============================================ */
.quantum-chat-container {
    width: 100%;
    max-width: 660px;
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 6px;
    margin: 30px 0 65px 0;
    overflow: hidden;
    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(197, 168, 128, 0.03),
        inset 0 1px 0 rgba(197, 168, 128, 0.05);
}

/* Terminal header bar */
.chat-header {
    background: rgba(197, 168, 128, 0.02);
    border-bottom: 1px solid var(--terminal-border-soft);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Pulsing connection status dot */
.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold), 0 0 20px rgba(197, 168, 128, 0.3);
    animation: statusPulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.25; transform: scale(0.85); box-shadow: 0 0 6px var(--accent-gold); }
    50%       { opacity: 1;    transform: scale(1.1);  box-shadow: 0 0 14px var(--accent-gold), 0 0 28px rgba(197,168,128,0.3); }
}

.chat-header h3 {
    font-family: 'Inter', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 2.5px;
    color: var(--accent-gold);
    opacity: 0.75;
    text-transform: uppercase;
}

/* ============================================
   LOCK SCREEN — HIGH-SECURITY CRYPTOGRAPHIC INPUT
   ============================================ */
#chat-lock-screen {
    padding: 55px 40px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Large decorative glyph above the lock */
.lock-glyph {
    font-size: 32px;
    color: var(--accent-gold);
    opacity: 0.25;
    margin-bottom: 28px;
    letter-spacing: 0;
    animation: glyphRotate 8s linear infinite;
}

@keyframes glyphRotate {
    0%   { transform: rotate(0deg); opacity: 0.2; }
    50%  { opacity: 0.4; }
    100% { transform: rotate(360deg); opacity: 0.2; }
}

.lock-instruction {
    font-size: 14.5px;
    color: #a0a0a0;
    margin-bottom: 36px;
    line-height: 1.9;
    font-weight: 200;
    max-width: 420px;
    font-family: 'Tajawal', sans-serif;
}

.lock-hint {
    color: var(--accent-gold);
    opacity: 0.7;
}

/* Lock input frame with blinking cursor bar */
.lock-input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
}

.passkey-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#chat-passkey {
    background: rgba(5, 4, 3, 0.9);
    border: 1px solid rgba(197, 168, 128, 0.18);
    border-bottom: none;
    color: var(--accent-gold);
    text-align: center;
    font-size: 26px;
    font-family: 'Inter', monospace;
    font-weight: 200;
    padding: 16px 8px 12px;
    width: 80px;
    border-radius: 4px 4px 0 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    caret-color: transparent; /* hide default caret, we use our own */
    letter-spacing: 4px;
}

#chat-passkey:focus {
    outline: none;
    border-color: rgba(197, 168, 128, 0.45);
    box-shadow:
        0 0 20px rgba(197, 168, 128, 0.08),
        inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Custom blinking underline cursor bar */
.passkey-cursor-bar {
    width: 80px;
    height: 2px;
    background: rgba(197, 168, 128, 0.35);
    border-radius: 0 0 4px 4px;
    animation: passCursorBlink 1s step-end infinite;
}

#chat-passkey:focus ~ .passkey-cursor-bar {
    background: var(--accent-gold);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.5);
}

@keyframes passCursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.15; }
}

/* Unlock button */
#chat-lock-screen button {
    background: var(--accent-gold-faint);
    border: 1px solid rgba(197, 168, 128, 0.2);
    color: var(--text-primary);
    padding: 14px 28px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    /* Glow expands from center outward on hover */
    transition:
        background 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.45s ease,
        color 0.45s ease,
        letter-spacing 0.45s ease,
        box-shadow 0.45s ease;
    position: relative;
    overflow: hidden;
}

#chat-lock-screen button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(197,168,128,0.18) 0%, transparent 70%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

#chat-lock-screen button:hover::before {
    transform: translate(-50%, -50%) scale(2.5);
}

#chat-lock-screen button:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    letter-spacing: 1.8px;
    box-shadow: 0 0 25px rgba(197, 168, 128, 0.1);
}

/* Error message — decode failure */
.hidden-error {
    opacity: 0 !important;
    color: var(--system-red) !important;
    font-size: 12.5px !important;
    font-family: 'Inter', monospace !important;
    font-weight: 300 !important;
    letter-spacing: 0.5px;
    margin-top: 22px;
    transition: opacity 0.4s ease;
    direction: rtl;
}

.hidden-error.visible {
    opacity: 1 !important;
}

/* ============================================
   ACTIVE CHAT BOX — TIMELINE MESSAGE LOG
   ============================================ */
#active-chat-box {
    padding: 28px 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#chat-messages-log {
    height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-left: 8px;
    scroll-behavior: smooth;
}

/* Paper-thin scrollbar — gold tint, visible only when scrolling */
#chat-messages-log::-webkit-scrollbar {
    width: 3px;
}
#chat-messages-log::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages-log::-webkit-scrollbar-thumb {
    background: rgba(197, 168, 128, 0.08);
    border-radius: 2px;
    transition: background 0.3s ease;
}
#chat-messages-log:hover::-webkit-scrollbar-thumb {
    background: rgba(197, 168, 128, 0.22);
}

/* Base chat bubble */
.chat-msg {
    max-width: 88%;
    padding: 14px 18px;
    border-radius: 3px;
    font-size: 15px;
    line-height: 1.85;
    font-weight: 200;
    font-family: 'Tajawal', sans-serif;
    position: relative;
    animation: msgAppear 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes msgAppear {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Bassem's messages — left-aligned, from the cosmic prison */
.chat-msg.bassem {
    align-self: flex-start;
    background: rgba(197, 168, 128, 0.022);
    border: 1px solid rgba(197, 168, 128, 0.07);
    border-right: 3px solid var(--accent-gold);
    color: #dfd8c7;
    border-top-right-radius: 0;
    text-align: right;
    direction: rtl;
}

/* Manal's messages — right-aligned, the visitor's voice */
.chat-msg.manal {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-left: 3px solid #555555;
    color: #cccccc;
    border-top-left-radius: 0;
    text-align: right;
    direction: rtl;
}

/* Decoding placeholder — temporal distortion indicator */
.chat-msg.decoding {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--accent-gold);
    opacity: 0.45;
    font-family: 'Inter', monospace;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    padding: 8px 4px;
    animation: decodePulse 0.8s ease-in-out infinite alternate;
}

@keyframes decodePulse {
    0%   { opacity: 0.3; }
    100% { opacity: 0.65; }
}

/* Interactive option buttons */
#chat-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(197, 168, 128, 0.08);
    padding-top: 18px;
}

.chat-opt-btn {
    background: rgba(255, 255, 255, 0.008);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: #9a9a9a;
    padding: 13px 20px;
    text-align: right;
    cursor: pointer;
    border-radius: 3px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 200;
    line-height: 1.6;
    direction: rtl;
    position: relative;
    overflow: hidden;
    /* Smooth expansion of letter-spacing + glow from center */
    transition:
        background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s ease,
        color 0.4s ease,
        padding-right 0.4s ease,
        box-shadow 0.4s ease;
}

.chat-opt-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(197,168,128,0.06) 0%, transparent 70%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-opt-btn:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

.chat-opt-btn:hover {
    background: rgba(197, 168, 128, 0.025);
    border-color: rgba(197, 168, 128, 0.2);
    color: var(--accent-gold);
    padding-right: 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* ============================================
   NAVIGATION GRID — FOUR DIMENSIONAL PORTALS
   ============================================ */
.navigation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 980px;
    margin-bottom: 70px;
}

.nav-card {
    background: rgba(255, 255, 255, 0.004);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.018);
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    transition:
        background 0.55s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.55s ease,
        transform 0.55s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.55s ease;
    display: block;
}

.nav-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.nav-index {
    font-family: 'Inter', monospace;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--text-dim);
    display: block;
    transition: color 0.4s ease;
}

.nav-card h3 {
    color: var(--text-primary);
    font-size: 15.5px;
    font-weight: 300;
    letter-spacing: 0.5px;
    font-family: 'Tajawal', sans-serif;
    transition: color 0.4s ease;
    line-height: 1.3;
}

.nav-label {
    color: var(--text-muted);
    font-size: 9.5px;
    letter-spacing: 2.5px;
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.nav-card:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.nav-card:hover .nav-index {
    color: var(--text-muted);
}

.nav-card:hover .nav-label {
    letter-spacing: 3.2px;
}

/* Trailer card — gold accent */
.trailer-card:hover {
    border-color: rgba(197, 168, 128, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(197, 168, 128, 0.05);
}
.trailer-card:hover h3   { color: var(--accent-gold); }
.trailer-card:hover .nav-label { color: var(--accent-gold); }
.trailer-card:hover .nav-index { color: var(--accent-gold); opacity: 0.5; }

/* Download card — system red accent */
.download-card:hover {
    border-color: rgba(255, 51, 51, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 51, 51, 0.04);
}
.download-card:hover h3   { color: var(--system-red); }
.download-card:hover .nav-label { color: var(--system-red); }
.download-card:hover .nav-index { color: var(--system-red); opacity: 0.5; }

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197,168,128,0.15), transparent);
}

.footer-quote {
    font-size: 13px;
    font-weight: 200;
    color: var(--text-muted);
    letter-spacing: 3px;
    font-style: italic;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

.footer-meta {
    font-family: 'Inter', monospace;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* ============================================
   MODALS — DIMENSIONAL OVERLAY PORTALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 24px;
    animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: #060504;
    border: 1px solid rgba(197, 168, 128, 0.08);
    padding: 55px 48px;
    max-width: 580px;
    width: 100%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 5px;
    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.98),
        inset 0 1px 0 rgba(197, 168, 128, 0.04);
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.video-content {
    background: #000000 !important;
    padding: 16px !important;
    max-width: 860px !important;
    border-color: rgba(197, 168, 128, 0.06) !important;
}

.close-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 22px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    font-weight: 200;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-text {
    font-size: 15.5px;
    line-height: 1.95;
    color: #c0c0c0;
    font-weight: 200;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
}

/* ============================================
   AUDIO CONTROL BUTTON
   ============================================ */
#audio-control {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 10001;
    cursor: pointer;
    background: rgba(2, 2, 2, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        border-color 0.4s ease,
        background 0.4s ease,
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s ease;
}

#audio-control:hover {
    border-color: rgba(197, 168, 128, 0.35);
    background: rgba(197, 168, 128, 0.04);
    transform: scale(1.1);
    box-shadow: 0 0 22px rgba(197, 168, 128, 0.15);
}

#audio-icon {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    line-height: 1;
}

/* ============================================
   UTILITY
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE — MOBILE OPTIMIZATION
   ============================================ */
@media (max-width: 900px) {
    .navigation-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .roman-title {
        font-size: 34px;
        letter-spacing: 7px;
    }
    .modal-content {
        padding: 40px 24px;
    }
    #main-content {
        padding: 60px 18px 50px;
    }
}

@media (max-width: 560px) {
    .navigation-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .roman-title {
        font-size: 28px;
        letter-spacing: 5px;
    }
    .quantum-chat-container {
        margin: 24px 0 50px;
    }
    #chat-lock-screen {
        padding: 40px 24px;
    }
    .lock-instruction {
        font-size: 14px;
    }
}
