
/* ===== Glassmorphism & Dark/Light Theme ===== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: 10px;
    --text: #fff;
    --text-muted: rgba(255, 255, 255, 0.85);
    --accent: #ff9800;
    --accent-2: #ff5722;
    --danger: #c62828;
}

body.light {
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text: #111;
    --text-muted: rgba(0, 0, 0, 0.75);
}

.active {
    display: block;
}

        
/* ======= تحسين الأزرار ======= */
button {
    width: 80%;
    padding: 15px;
    margin: 10px auto;

    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0.5px;

    border: none;
    border-radius: 15px;
    cursor: pointer;

    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: #fff;

    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


button:hover {
    transform: scale(1.05);
}


button:active {
    transform: scale(0.97);
}


      
  /* ======= تأثير ظهور الشاشات (Fade In) ======= */
.screen {
    display: none;
    padding: 20px;
    opacity: 0;
    transform: scale(0.97);
    transition: all 0.4s ease;
   
}

.screen.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* منع تحديد النصوص ونسخها (تناسب تطبيق) */
* {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* تحسين النصوص */
h1, h2 {
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* تحسين المظهر العام للأزرار */


/* ----- End Round & Reveal + Next question ----- */
.btn-reveal {
    background: linear-gradient(135deg, var(--danger), #b71c1c) !important;
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.4) !important;
}

.question-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.challenge-next-wrap {
    margin-bottom: 4px;
}

.challenge-end-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.challenge-btn-red {
    background: linear-gradient(135deg, #c62828, #b71c1c) !important;
}

.challenge-btn-blue {
    background: linear-gradient(135deg, #1565c0, #0d47a1) !important;
}

.question-text {
    font-size: 22px;
    margin: 20px 0;
    font-weight: 500;
}

#nextQuestionBtn {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ----- Last Chance: 20 choices grid (mobile-friendly) ----- */
.last-chance-title {
    font-size: 1.15rem;
    margin-bottom: 16px;
}

.last-chance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    text-align: center;
}

.last-chance-btn {
    width: 100% !important;
    max-width: none !important;
    padding: 12px 10px !important;
    font-size: 14px !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.last-chance-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
}
/* =====================
   Game Professional Theme
===================== */





/* =====================
   Screens animation
===================== */





/* =====================
   Buttons style
===================== */





/* =====================
   Inputs style
===================== */

input {
    width: 70%;
    max-width: 280px;
    padding: 12px 14px;
    margin: 6px auto;
    font-size: 16px;
    border-radius: 10px;
    background: var(--glass-bg);
    color: var(--text);
    border: 1px solid var(--glass-border);
    outline: none;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.25);
}


/* =====================
   Role Screen emphasis
===================== */

#roleTitle {
    font-size: 26px;
    margin-bottom: 15px;
}

#secretWord {
    font-size: 20px;
    margin: 20px 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* =====================
   Imposter highlight
===================== */

.imposter {
    color: #ff1744;
    font-weight: bold;
}

/* =====================
   Safe Area for mobile
===================== */

#app {
    max-width: 420px;
    margin: auto;
}







/* =====================
   Advertisement Banner
===================== */

#adBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.95), rgba(44, 83, 100, 0.95));
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    z-index: 1000;
    padding: 10px 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

body.light #adBanner {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,248,252,0.95));
}
/* =====================
   Game Control Buttons
===================== */

#gameControls {
    position: fixed;
    bottom: 135px; /* فوق الشريطين معًا */
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 1100;
}


#gameControls button {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

#gameControls button:hover {
    transform: scale(1.05);
}

.ad-content {
    max-width: 420px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ad-badge {
    background: #ff1744;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
}

.ad-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    color: var(--text);
}


.ad-btn {
    background: #25D366;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.ad-btn:hover {
    opacity: 0.9;
}
body {
    margin: 0;
    padding: 0;
    padding-bottom: 140px;

    font-family: Arial, sans-serif;
    text-align: center;
    color: #fff;

    background:
       linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7))
,
        url("../assets/images/bg-main.jpg") center / cover no-repeat fixed;
}

body.light {
    color: #111;
    background:
        linear-gradient(rgba(255,255,255,0.45), rgba(255,255,255,0.45))
,
        url("../assets/images/bg-main.jpg") center / cover no-repeat fixed;
}
/* =====================
   Exit Social Modal (نافذة عند ضغط خروج)
===================== */

.exit-social-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.exit-social-overlay.exit-social-open {
    opacity: 1;
    visibility: visible;
}

.exit-social-modal-box {
    position: relative;
    width: 100%;
    max-width: min(400px, 92vw);
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.exit-social-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    max-width: none;
    width: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
}

.exit-social-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.exit-social-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.exit-social-ad {
    display: block;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    line-height: 0;
}

.exit-social-ad img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
}

.exit-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.exit-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.exit-social-btn img {
    width: 20px;
    height: 20px;
}

.exit-social-btn.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.exit-social-btn.facebook {
    background: #1877f2;
}

.exit-social-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.exit-social-back {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.exit-social-back:hover {
    background: rgba(255, 255, 255, 0.08);
}






/* Social buttons inside image ad */

.ad-social {
    display: flex;
    gap: 8px;
}

.social-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.social-btn img {
    width: 14px;
    height: 14px;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn.instagram:hover {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.social-btn.facebook:hover {
    background: #1877f2;
}


/* Image inside strip */
.ad-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    
}

.ad-image img {
    height: 28px;
    max-width: 260px;
    width: auto;
    object-fit: contain;
    display: block;
}

.ad-views {
    font-size: 12px;
    color: var(--text-muted);
    margin-inline: 10px;
    white-space: nowrap;
}

/* ===== Mode Buttons Text Layout ===== */

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mode-name {
    font-size: 18px;
    font-weight: bold;
}

.mode-desc {
    font-size: 13px;
    font-weight: normal;
    opacity: 0.85;
}

/* ===== أزرار القوائم كصور (لغة / مود / فئة) ===== */
.menu-screen-title {
    text-align: center;
    margin-bottom: 18px;
}
.menu-img-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 305px;
    margin: 0 auto;
    padding-bottom: 8px;
}
.menu-img-stack--categories {
    max-width: 285px;
    gap: 16px;
}
.menu-img-btn {
    /* إلغاء ستايل الأزرار العامة */
    all: unset;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    border-radius: 18px;
    overflow: hidden;
    line-height: 0;
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.menu-img-btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
.menu-img-btn:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 152, 0, 0.35);
    filter: brightness(1.05);
}
.menu-img-btn:active {
    transform: translateY(0) scale(0.99);
    filter: brightness(0.97);
}
.menu-img-btn img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* Caption under menu images */
.menu-img-block {
    width: 100%;
}

.menu-img-caption {
    text-align: center;
    background: transparent;
    border-top: none;
    padding: 0;
    margin-top: 12px;
    line-height: 1.25;
}

.menu-img-caption .lang-ar {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.menu-img-caption .lang-en {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
/* زر ثانوي (تحميل التطبيق) */
.menu-img-btn--secondary {
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28),
        0 0 0 2px rgba(255, 152, 0, 0.45);
}
.menu-img-btn--secondary:hover {
    box-shadow:
        0 12px 32px rgba(255, 87, 34, 0.25),
        0 0 0 2px rgba(255, 152, 0, 0.65);
}

/* زر نصي: تعليمات تحميل اللعبة (ليس صورة) */
.download-game-btn {
    background: transparent !important;
    border: 2px solid var(--accent) !important;
    color: var(--accent) !important;
    box-shadow: none !important;
    margin-top: 14px;
}
.download-game-btn:hover {
    background: rgba(255, 152, 0, 0.15) !important;
}

/* ===== Download Guide Screen (bilingual) ===== */
.download-guide-screen {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 20px 100px;
}
.download-guide-inner {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.download-guide-screen .download-welcome {
    font-size: 1.5rem;
    margin: 0 0 12px;
    color: var(--text);
    text-align: center;
}
.download-guide-screen .lang-ar,
.download-guide-screen .lang-en {
    display: block;
}
.download-guide-screen .lang-en {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-top: 4px;
}
.download-intro.lang-both {
    margin-bottom: 24px;
    line-height: 1.6;
    color: var(--text);
}
.download-section {
    margin-bottom: 22px;
    padding: 18px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
}
body.light .download-section {
    background: rgba(0,0,0,0.04);
}
.download-platform {
    font-size: 1.15rem;
    margin: 0 0 12px;
    color: var(--accent);
}
.download-steps {
    margin: 0;
    padding-inline-start: 22px;
    line-height: 1.7;
    color: var(--text);
}
.download-steps li {
    margin-bottom: 10px;
}
.download-steps li:last-child {
    margin-bottom: 0;
}
.download-back-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    background: var(--glass-bg) !important;
    border: 2px solid var(--glass-border) !important;
    color: var(--text) !important;
}
.download-back-btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* ----- Mobile: Last Chance grid 1 col on very small width ----- */
@media (max-width: 380px) {
    .last-chance-grid {
        grid-template-columns: 1fr;
    }
    .last-chance-btn {
        font-size: 13px !important;
    }
}

@media (max-width: 420px) {
    body {
        padding-bottom: 150px;
    }
    .screen {
        padding: 16px 12px;
    }
    button {
        width: 90%;
        font-size: 16px;
    }
    button.menu-img-btn {
        width: 100%;
        max-width: 100%;
    }
}

