/* =========================================================
   GAMING THEME  -  "NEON HUD"
   - Light is the default; dark applies with data-theme="dark".
   - Header, hero, footer and the modal top bar are always dark
     ("cockpit" look), so even light mode feels like a game UI.
   - Same class names as before: HTML and JS do not change.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Cairo:wght@400;600;700;800&display=swap');

/* --- Tokens: LIGHT (default) --- */
:root {
    color-scheme: light;
    --font-display: 'Chakra Petch', 'Inter', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;

    --bg: #eceff6;
    --surface: #ffffff;
    --surface-2: #f2f4fa;
    --text: #0a0f1e;
    --muted: #566079;
    --line: #d7dcea;
    --line-strong: #b9c1d6;
    --grid: rgba(10, 15, 30, 0.055);

    --accent: #5b2bff;
    --accent-2: #00b8e6;
    --accent-3: #ff2e88;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(91, 43, 255, 0.1);
    --glow: rgba(91, 43, 255, 0.35);
    --btn-1: #5b2bff;
    --btn-2: #8a4dff;

    --success: #00a86b;
    --success-soft: rgba(0, 168, 107, 0.14);
    --danger: #e5254f;
    --danger-soft: rgba(229, 37, 79, 0.12);
    --star: #ffb000;

    --overlay: rgba(6, 8, 20, 0.7);
    --shadow-md: 0 12px 30px rgba(10, 15, 30, 0.1);
    --shadow-lg: 0 30px 80px rgba(10, 15, 30, 0.3);
}

/* --- Tokens: DARK (theme dark + areas that are always dark) --- */
:root[data-theme="dark"],
.main-header,
.hero-section,
.main-footer,
.modal-head {
    color-scheme: dark;
    --bg: #060814;
    --surface: #0d1226;
    --surface-2: #141a35;
    --text: #eaf0ff;
    --muted: #8e9bc0;
    --line: #1d2748;
    --line-strong: #2c3a66;
    --grid: rgba(120, 150, 255, 0.08);

    --accent: #22e1ff;
    --accent-2: #8b5cff;
    --accent-3: #ff3d9a;
    --accent-contrast: #04121a;
    --accent-soft: rgba(34, 225, 255, 0.12);
    --glow: rgba(34, 225, 255, 0.45);
    --btn-1: #22e1ff;
    --btn-2: #6ea8ff;

    --success: #38f2a2;
    --success-soft: rgba(56, 242, 162, 0.14);
    --danger: #ff5c7a;
    --danger-soft: rgba(255, 92, 122, 0.14);
    --star: #ffd24a;

    --overlay: rgba(2, 4, 12, 0.78);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.main-header,
.hero-section,
.main-footer,
.modal-head {
    color: var(--text);
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* =========================================================
   BUTTONS  (cut-corner shape)
   ========================================================= */

.btn {
    --cut: 12px;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    background: var(--line-strong);
    border: 0;
    cursor: pointer;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
                       calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    transition: background 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

/* inner fill = the "border" look for the outlined button */
.btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    background: var(--surface);
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)),
                       calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    transition: background 0.15s ease;
}

.btn:hover {
    background: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
}

/* Primary: solid neon gradient */
.btn-primary,
.btn-primary:hover {
    color: var(--accent-contrast);
    background: linear-gradient(120deg, var(--btn-1), var(--btn-2));
    color: #fff;
}
.btn-primary img,
.btn-secondary img{
    width: 30px;
    object-fit: contain;
    /* Ila kan l-color dyal text byad w tswira k7la, had l-filter kay-rddha byda */
    filter: brightness(0) invert(1); 
    transition: filter 0.3s ease;
}

.btn-primary::before {
    display: none;
}

.btn-primary:hover {
    filter: brightness(1.12) saturate(1.1);
}

/* Secondary: outlined */
.btn-secondary {
    color: var(--text);
}

.btn:disabled,
.btn:disabled:hover {
    color: var(--muted);
    background: var(--line);
    filter: none;
    transform: none;
    cursor: not-allowed;
}

.btn:disabled::before {
    display: none;
}

.btn-buy {
    --cut: 9px;
    padding: 10px 18px;
    font-size: 0.8rem;
}

.btn-small {
    --cut: 9px;
    padding: 9px 18px;
    font-size: 0.8rem;
}

/* =========================================================
   HUD CORNER BRACKETS (shared by all cards)
   ========================================================= */

.shop-card::before,
.shop-card::after,
.how-card::before,
.how-card::after,
.review-card::before,
.review-card::after,
.modal::before,
.modal::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    z-index: 5;
    pointer-events: none;
    border: 0 solid var(--accent);
}

.shop-card::before,
.how-card::before,
.review-card::before,
.modal::before {
    top: 0;
    left: 0;
    border-top-width: 2px;
    border-left-width: 2px;
}

.shop-card::after,
.how-card::after,
.review-card::after,
.modal::after {
    right: 0;
    bottom: 0;
    border-right-width: 2px;
    border-bottom-width: 2px;
}

/* =========================================================
   HEADER  (always dark)
   ========================================================= */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 24px;
    background: var(--surface);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(34, 225, 255, 0.12), 0 8px 30px rgba(0, 0, 0, 0.25);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    display: block;
    height: 40px;
    width: auto;
}

/* Logo is white on the dark header / footer */
.main-header .logo img,
.main-footer .footer-logo img {
    filter: brightness(0) invert(1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Language switcher --- */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--glow);
}

.lang-btn .arrow {
    font-size: 0.65rem;
    color: var(--muted);
}

.lang-btn .fi {
    border-radius: 2px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    list-style: none;
    display: none;
    overflow: hidden;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-dropdown li:hover {
    background: var(--surface-2);
    color: var(--accent);
}

.lang-dropdown li.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

.lang-dropdown li:focus-visible {
    outline-offset: -2px;
}

/* --- Theme toggle --- */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--glow);
}

/* =========================================================
   HERO  (always dark, slanted bottom edge)
   ========================================================= */

.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 73px);
    padding: 80px 24px 130px;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 88% 8%, rgba(139, 92, 255, 0.38), transparent 62%),
        radial-gradient(700px 520px at 4% 92%, rgba(34, 225, 255, 0.24), transparent 62%),
        var(--bg);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 0 100%);
}

/* HUD grid that fades out toward the edges */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 55% 40%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse at 55% 40%, #000 25%, transparent 75%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
}

.hero-content {
    flex: 1;
    max-width: 620px;
}

.hero-title {
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    background: linear-gradient(100deg, #ffffff 35%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(34, 225, 255, 0.28));
}

.hero-subtitle {
    max-width: 52ch;
    margin-bottom: 34px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-image-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 46px var(--glow)) drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* =========================================================
   SECTION HEADINGS  ( // TITLE )
   ========================================================= */

.shop-title,
.faq-title,
.reviews-title,
.how-title {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.shop-title::before,
.faq-title::before,
.reviews-title::before,
.how-title::before {
    content: "//";
    margin-inline-end: 0.4em;
    color: var(--accent);
}

.shop-subtitle,
.faq-subtitle,
.reviews-subtitle,
.how-subtitle {
    max-width: 52ch;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--muted);
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */

.how-section {
    padding: 70px 24px 40px;
}

.how-container {
    max-width: 1200px;
    margin: 0 auto;
}

.how-header {
    margin-bottom: 48px;
    text-align: center;
}

.how-subtitle {
    margin: 0 auto;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.how-card {
    position: relative;
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.how-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 28px var(--glow);
}

.how-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-soft);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.how-number::before {
    content: "0";
}

.how-card-title {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.how-card-text {
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--muted);
}

/* =========================================================
   ITEM SHOP
   ========================================================= */

.shop-section {
    padding: 80px 24px 90px;
}

.shop-container {
    max-width: 1200px;
    margin: 0 auto;
}

.shop-header {
    margin-bottom: 44px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-img-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 22px;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px),
        linear-gradient(160deg, var(--surface-2), var(--accent-soft));
    background-size: 24px 24px, 24px 24px, auto;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.card-img-box img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    padding: 18px 18px 20px;
}

.card-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.card-desc {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
}

.price {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.price small {
    margin-left: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

/* In stock: glowing card with a light sweep */
.shop-card--in {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 34px var(--glow);
}

.shop-card--in:hover {
    transform: translateY(-5px);
}

.shop-card--in:hover .card-img-box img {
    transform: scale(1.06);
}

.shop-card--in .card-img-box::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.4) 50%, transparent 58%);
    transform: translateX(-120%);
    animation: sweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sweep {
    0%, 55% { transform: translateX(-120%); }
    100%    { transform: translateX(120%); }
}

.stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #00150d;
    background: #38f2a2;
    clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.stock-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #00150d;
    border-radius: 50%;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

/* Sold out */
.shop-card--out .card-img-box img {
    filter: grayscale(1);
    opacity: 0.4;
}

.shop-card--out .card-name,
.shop-card--out .card-desc {
    opacity: 0.55;
}

.shop-card--out .price {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

/* "SOLD OUT" stamp */
.sold-ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) rotate(-8deg);
    padding: 6px 18px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    white-space: nowrap;
    text-transform: uppercase;
    color: var(--danger);
    background: rgba(8, 10, 24, 0.82);
    border: 2px solid var(--danger);
    border-radius: 4px;
    pointer-events: none;
}

/* =========================================================
   FAQ
   ========================================================= */

.faq-section {
    padding: 80px 24px 90px;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    align-items: start;
}

.faq-header {
    position: sticky;
    top: 110px;
}

.faq-subtitle {
    max-width: 38ch;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--line-strong);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: var(--line-strong);
    border-inline-start-color: var(--accent);
}

.faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 0 26px var(--glow);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    list-style: none;
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
    content: "\2212";
    color: var(--accent-contrast);
    background: var(--accent);
}

.faq-answer {
    max-width: 62ch;
    padding: 0 20px 20px;
    font-size: 0.96rem;
    line-height: 1.75;
    color: var(--muted);
}

.faq-answer strong {
    font-weight: 600;
    color: var(--text);
}

/* =========================================================
   REVIEWS
   ========================================================= */

.reviews-section {
    padding: 80px 24px 100px;
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
}

.reviews-header {
    margin-bottom: 48px;
    text-align: center;
}

.reviews-subtitle {
    margin: 0 auto;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.review-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 24px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 28px var(--glow);
}

.review-stars {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--star);
}

.review-text {
    flex: 1;
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--text);
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-strong);
}

/* Hexagon avatar */
.review-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
}

.review-avatar--blue   { background: linear-gradient(135deg, #22d3ee, #2563eb); }
.review-avatar--purple { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.review-avatar--orange { background: linear-gradient(135deg, #fb7185, #f97316); }

.review-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
    color: var(--text);
}

.review-role {
    font-size: 0.85rem;
    color: var(--muted);
}

/* =========================================================
   FOOTER  (always dark, slanted top edge)
   ========================================================= */

.main-footer {
    position: relative;
    padding: 96px 24px 0;
    background:
        radial-gradient(800px 300px at 15% 0%, rgba(139, 92, 255, 0.22), transparent 70%),
        var(--bg);
    clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo img {
    display: block;
    height: 40px;
    width: auto;
    margin-bottom: 16px;
}

.footer-about {
    max-width: 38ch;
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--muted);
}

.footer-heading {
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links a {
    display: inline-block;
    font-size: 0.93rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-bottom {
    margin: 0 -24px;
    padding: 20px 24px;
    border-top: 1px solid var(--line);
}

.footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.86rem;
    color: var(--muted);
}

.footer-copy strong {
    font-weight: 600;
    color: var(--text);
}

/* =========================================================
   MODAL
   ========================================================= */

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    box-shadow: var(--shadow-lg), 0 0 50px var(--glow);
    overflow: hidden;
    animation: modal-pop 0.2s ease-out;
    transition: max-width 0.2s ease;
}

.modal.modal--wide {
    max-width: 920px;
}

@keyframes modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 64px 18px 24px;
    background:
        linear-gradient(100deg, rgba(139, 92, 255, 0.35), transparent 70%),
        var(--surface);
    border-bottom: 1px solid var(--accent);
}

.modal-item-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text);
}

.modal-item-price {
    padding: 4px 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    line-height: 1;
    color: #aab4d4;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.modal-body {
    padding: 26px 24px 28px;
    overflow-y: auto;
}

.modal-panel[hidden] {
    display: none;
}

.modal-panel--center {
    text-align: center;
}

.modal-title {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.modal-text {
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.modal-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.modal-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px var(--glow);
}

.modal-input.has-error {
    border-color: var(--danger);
}

.modal-hint {
    min-height: 1.3em;
    margin-top: 8px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--danger);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.modal-panel--center .modal-actions {
    justify-content: center;
}

.modal-actions .btn {
    padding: 12px 26px;
    font-size: 0.85rem;
}

/* Segmented loading bar */
.loader-track {
    position: relative;
    height: 10px;
    margin: 12px 6px 18px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    overflow: hidden;
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 13px);
    mask-image: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 13px);
}

.loader-track::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 38%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px var(--glow);
    animation: loader-slide 1.1s ease-in-out infinite;
}

@keyframes loader-slide {
    0%   { left: -40%; }
    100% { left: 102%; }
}

/* Result icons */
.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 54px;
    margin: 0 auto 16px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.result-icon--ok  { color: var(--success); background: var(--success-soft); }
.result-icon--bad { color: var(--danger);  background: var(--danger-soft); }

.username-chip {
    display: inline-block;
    margin: 4px 0 16px;
    padding: 5px 16px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 4px;
    word-break: break-all;
}

.username-chip--sm {
    margin: 0;
    padding: 3px 12px;
    font-size: 0.95rem;
}

/* --- Skins step --- */
.account-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.account-ok {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--success);
}

.skins-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skins-tools .modal-input {
    padding: 10px 14px;
    font-size: 0.95rem;
}

.skins-tools #skin-search {
    flex: 1 1 200px;
    width: auto;
}

.modal-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 160px;
    cursor: pointer;
}

.skins-count {
    margin: 12px 0 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.skins-state {
    padding: 14px 0 6px;
    text-align: center;
}

.skins-scroll {
    max-height: 46vh;
    overflow-y: auto;
    margin-right: -8px;
    padding: 6px 8px 12px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.skins-scroll[hidden],
.skins-state[hidden],
.skins-more[hidden] {
    display: none;
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 14px;
}

.skins-more {
    margin-top: 20px;
    text-align: center;
}

.skin-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: start;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.skin-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--glow);
}

.skin-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.skin-name {
    padding: 8px 10px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    background: var(--surface);
    border-top: 1px solid var(--line-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skin-card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 0 24px var(--glow);
}

.skin-card.is-selected::after {
    content: "\2713";
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-contrast);
    background: var(--accent);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* Rarity backgrounds */
.rarity-common    { background: linear-gradient(160deg, #8b97ad, #3d475c); }
.rarity-uncommon  { background: linear-gradient(160deg, #4ade80, #14803c); }
.rarity-rare      { background: linear-gradient(160deg, #38bdf8, #1d4ed8); }
.rarity-epic      { background: linear-gradient(160deg, #c084fc, #6d28d9); }
.rarity-legendary { background: linear-gradient(160deg, #fbbf24, #c2410c); }
.rarity-mythic    { background: linear-gradient(160deg, #fde047, #a16207); }
.rarity-other     { background: linear-gradient(160deg, #22d3ee, #0e7490); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .how-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 900px) {
    .hero-section {
        padding-bottom: 100px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .faq-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .faq-header {
        position: static;
        text-align: center;
    }

    .faq-subtitle {
        margin: 0 auto;
    }

    .main-footer {
        clip-path: polygon(0 28px, 100% 0, 100% 100%, 0 100%);
        padding-top: 72px;
    }
}

@media (max-width: 800px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .shop-grid,
    .how-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        justify-content: center;
        text-align: center;
    }

    .modal-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal-actions .btn {
        flex: 1 1 100%;
    }

    .skins-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .skins-tools .modal-input {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* =========================================================
   ARABIC (font) + RTL (mirroring)
   Only the text font is swapped, so icon fonts keep working.
   ========================================================= */

[lang="ar"] {
    --font-display: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    --font-body: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

[lang="ar"] * {
    letter-spacing: 0 !important;
}

[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .price small { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .stock-badge { left: auto; right: 12px; }
[dir="rtl"] .modal-head { padding: 18px 24px 18px 64px; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }
[dir="rtl"] .skin-card.is-selected::after { right: auto; left: 6px; }
[dir="rtl"] .skins-scroll { margin-right: 0; margin-left: -8px; padding: 6px 4px 12px 8px; }
[dir="rtl"] .footer-links a:hover { transform: translateX(-4px); }
[dir="rtl"] .hero-section { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 56px)); }
[dir="rtl"] .main-footer { clip-path: polygon(0 0, 100% 48px, 100% 100%, 0 100%); }

/* HUD brackets move to the other corners in RTL */
[dir="rtl"] .shop-card::before,
[dir="rtl"] .how-card::before,
[dir="rtl"] .review-card::before,
[dir="rtl"] .modal::before {
    left: auto;
    right: 0;
    border-left-width: 0;
    border-right-width: 2px;
}

[dir="rtl"] .shop-card::after,
[dir="rtl"] .how-card::after,
[dir="rtl"] .review-card::after,
[dir="rtl"] .modal::after {
    right: auto;
    left: 0;
    border-right-width: 0;
    border-left-width: 2px;
}

@media (max-width: 900px) {
    [dir="rtl"] .hero-section { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 32px)); }
    [dir="rtl"] .main-footer { clip-path: polygon(0 0, 100% 28px, 100% 100%, 0 100%); }
}