/* إقرأ — Official brand kit (fonts, logo, patterns) */

@font-face {
    font-family: 'GE SS Two';
    src: url('../brand/fonts/GE_SS_Two_Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GE SS Two';
    src: url('../brand/fonts/GE_SS_Two_Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GE SS Two';
    src: url('../brand/fonts/GE_SS_Two_Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Logo */
.brand-logo { display: block; object-fit: contain; }
.brand-logo-header { height: 52px; width: auto; }
.brand-logo-footer { height: 56px; width: auto; }
.brand-logo-loader { height: 88px; width: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.2)); }
.brand-logo-admin { height: 36px; width: auto; }
.brand-logo-hero { height: 140px; width: auto; margin: 0 auto; display: block; }

/* Brand pattern backgrounds */
.brand-pattern-bg {
    background-color: var(--background);
    background-image: url('../brand/patterns/wrapping-paper.jpg');
    background-size: 420px;
    background-repeat: repeat;
}
.hero-bg.brand-pattern-bg { opacity: 1; }
.hero-bg.brand-pattern-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(240,250,248,0.92) 0%, rgba(188,227,222,0.75) 50%, rgba(255,255,255,0.88) 100%);
}

.page-header.brand-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    position: relative; overflow: hidden;
}
.page-header.brand-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('../brand/patterns/wrapping-paper.jpg');
    background-size: 300px;
    opacity: 0.12;
    mix-blend-mode: overlay;
}

/* Floating brand shapes */
.brand-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.brand-shape {
    position: absolute; opacity: 0.55;
    animation: brandFloat 8s ease-in-out infinite;
}
.brand-shape img { width: 100%; height: 100%; object-fit: contain; }
.brand-shape-1 { width: 90px; height: 90px; top: 8%; right: 5%; animation-delay: 0s; }
.brand-shape-2 { width: 70px; height: 70px; bottom: 15%; left: 8%; animation-delay: 1.5s; }
.brand-shape-3 { width: 55px; height: 55px; top: 40%; left: 3%; animation-delay: 3s; opacity: 0.4; }
.brand-shape-4 { width: 80px; height: 80px; bottom: 8%; right: 12%; animation-delay: 2s; }
@keyframes brandFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(6deg); }
}

/* Hero with brand artwork */
.hero-brand-visual {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1.5rem;
}
.hero-tagline-art {
    max-width: 320px; width: 100%; height: auto;
    filter: drop-shadow(0 8px 20px rgba(55,66,97,0.12));
}
.hero-illustration.brand-hero { height: auto; min-height: 380px; }

/* Auth page brand panel */
.auth-characters.brand-panel {
    background: linear-gradient(160deg, rgba(22,177,155,0.12) 0%, rgba(188,227,222,0.35) 50%, rgba(233,51,95,0.08) 100%);
    border: 2px solid rgba(22,177,155,0.15);
}
.auth-characters.brand-panel::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('../brand/patterns/wrapping-paper.jpg');
    background-size: 280px;
    opacity: 0.15;
    border-radius: inherit;
}

/* Loader brand theme */
.page-loader.brand-loader {
    background: linear-gradient(145deg, #0D8A78 0%, #16B19B 40%, #4ECDB8 100%);
}

.auth-brand-logo { text-align: center; padding: 2rem 1rem 1rem; position: relative; z-index: 1; }
.auth-logo-large { height: 160px; width: auto; margin: 0 auto; filter: drop-shadow(0 10px 30px rgba(22,177,155,0.25)); }
.auth-characters.brand-panel .auth-welcome-text { position: relative; bottom: auto; left: auto; transform: none; margin-top: 1rem; z-index: 1; }
.footer-logo { margin-bottom: 1rem; }

/* Footer brand accent */
.site-footer.brand-footer {
    background: linear-gradient(180deg, #374261 0%, #2a3347 100%);
    position: relative;
}
.site-footer.brand-footer::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary), var(--primary));
}

/* Subtle shapes for CTA / inner sections */
.brand-shapes-subtle .brand-shape { opacity: 0.25; }
.brand-shapes-subtle .brand-shape-1 { width: 60px; height: 60px; top: 10%; left: 5%; right: auto; }
.brand-shapes-subtle .brand-shape-2 { width: 50px; height: 50px; bottom: 10%; right: 8%; left: auto; }

/* Section headers — decorative */
.section-header-deco {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--secondary-rgb), 0.2));
    color: var(--primary); margin: 0 auto 0.75rem;
}
.section-header h2 {
    position: relative; display: inline-block;
}
.section-header h2::after {
    content: '';
    display: block; width: 60px; height: 4px; margin: 0.65rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}
.section-header p { color: var(--text-muted); margin-top: 0.5rem; }

/* Branded cards */
.feature-card, .product-card, .game-card, .value-card {
    background: var(--surface);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: var(--shadow);
}
.feature-card:hover, .product-card:hover, .game-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.2);
}

/* Product image frame */
.product-image {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.06), rgba(var(--secondary-rgb), 0.1));
}
.product-image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(var(--primary-rgb), 0.04), transparent 40%);
    pointer-events: none;
}

/* CTA boxes — brand gradients */
.cta-box {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 16px 48px rgba(var(--primary-rgb), 0.25);
}
.cta-box::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('../brand/patterns/wrapping-paper.jpg');
    background-size: 240px;
    opacity: 0.08;
    pointer-events: none;
}
.cta-box > * { position: relative; z-index: 1; }
.games-cta-box {
    background: linear-gradient(135deg, var(--accent) 0%, #c42855 50%, var(--primary-dark) 100%) !important;
}

/* How it works */
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
    counter-reset: step;
}
.step-card {
    text-align: center; padding: 2rem 1.5rem;
    background: var(--surface); border-radius: var(--radius-lg);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: var(--shadow); position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; font-family: var(--font-heading); font-weight: 700;
    font-size: 1.25rem; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}
.step-card h3 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.step-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.75; }
.step-icon {
    width: 56px; height: 56px; border-radius: var(--radius-md);
    background: rgba(var(--secondary-rgb), 0.2);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}

/* Testimonials */
.testimonials-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.testimonial-card {
    background: var(--surface); padding: 1.75rem; border-radius: var(--radius-lg);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: var(--shadow); position: relative;
    transition: transform 0.3s;
}
.testimonial-card:hover { transform: translateY(-4px); }
.testimonial-card::before {
    content: '"'; position: absolute; top: 0.75rem; left: 1.25rem;
    font-family: var(--font-heading); font-size: 3rem; line-height: 1;
    color: rgba(var(--primary-rgb), 0.15); font-weight: 700;
}
.testimonial-text {
    font-size: 0.95rem; color: var(--text); line-height: 1.85;
    margin-bottom: 1.25rem; padding-top: 1.5rem;
}
.testimonial-author {
    display: flex; align-items: center; gap: 0.75rem;
}
.testimonial-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
}
.testimonial-author strong { display: block; font-size: 0.9rem; color: var(--text); }
.testimonial-author span { font-size: 0.78rem; color: var(--text-muted); }
.testimonial-stars {
    display: flex;
    gap: 5px;
    margin-bottom: 0.75rem;
    direction: ltr;
    align-items: center;
}
.testimonial-star {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--secondary, #FFCC00);
    transform-origin: center;
    animation: starTwinkle 2.8s ease-in-out infinite;
    animation-delay: calc((var(--star-i, 1) - 1) * 0.22s);
    will-change: transform, filter, opacity;
}
.testimonial-card:hover .testimonial-star {
    animation-duration: 1.6s;
}
@keyframes starTwinkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.72;
        filter: drop-shadow(0 0 1px rgba(var(--secondary-rgb), 0.25));
        color: #d4a800;
    }
    35% {
        transform: scale(1.28) rotate(12deg);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(var(--secondary-rgb), 0.85));
        color: var(--secondary, #FFCC00);
    }
    55% {
        transform: scale(1.1) rotate(-4deg);
        opacity: 0.95;
        filter: drop-shadow(0 0 6px rgba(var(--secondary-rgb), 0.55));
        color: #ffe566;
    }
}

/* Footer WhatsApp pill */
.footer-whatsapp {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 1rem; padding: 0.625rem 1.25rem;
    background: var(--secondary); color: var(--text);
    border-radius: 999px; font-weight: 600; font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(var(--secondary-rgb), 0.35);
}
.footer-whatsapp:hover {
    color: var(--text); transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--secondary-rgb), 0.45);
}
.footer-whatsapp .icon { width: 20px; height: 20px; }

@media (max-width: 900px) {
    .steps-grid, .testimonials-grid { grid-template-columns: 1fr; }
}

/* ========== GAMES LOBBY ========== */
.games-section { position: relative; }
.games-section .container { position: relative; }
.challenge-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.78rem; color: var(--accent); font-weight: 600;
}
.game-meta { align-items: center; }
.games-filter .filter-btn.active {
    background: var(--primary); color: white; border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}
.difficulty-badge {
    display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}
.difficulty-easy { background: rgba(var(--primary-rgb), 0.12); color: var(--primary-dark); }
.difficulty-medium { background: rgba(var(--secondary-rgb), 0.25); color: #8B6914; }
.difficulty-hard { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }

.game-card {
    background: linear-gradient(180deg, var(--surface) 0%, rgba(var(--primary-rgb), 0.03) 100%);
}
.game-card-icon {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.18)) !important;
}
.registration-plan-card {
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: var(--radius-lg);
}
.registration-plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.registration-plan-card.free-plan {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, var(--surface), rgba(var(--primary-rgb), 0.04));
}
.registration-plans-section { background: rgba(var(--primary-rgb), 0.03); }

/* ========== 404 & SUCCESS PAGES ========== */
.error-page {
    position: relative; overflow: hidden;
    background-color: var(--background);
    background-image: url('../brand/patterns/wrapping-paper.jpg'), linear-gradient(180deg, var(--background) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    background-size: 320px, auto;
    background-repeat: repeat, no-repeat;
}
.error-page .container { position: relative; z-index: 1; }
.success-page {
    background: linear-gradient(180deg, var(--background) 0%, rgba(var(--secondary-rgb), 0.08) 100%);
}
.success-box {
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    position: relative; overflow: hidden;
}
.success-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}
.success-icon-wrap {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: rgba(var(--primary-rgb), 0.2) !important;
}

/* ========== FEATURES SECTION ========== */
.features.section {
    background: linear-gradient(180deg, transparent 0%, rgba(var(--primary-rgb), 0.03) 50%, transparent 100%);
}
.features .section-header { margin-bottom: 2rem; }

/* ========== AUTH ENHANCEMENTS ========== */
.auth-box-enhanced {
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}
.auth-box-enhanced h1 { color: var(--primary); }
