/* =========================================================
   3liStore — Custom Styles & Gaming Effects
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    --bg: #0b0e14;
    --bg-soft: #161b22;
    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.12);
    --purple: #a855f7;
    --green: #22c55e;
    --border: rgba(255, 255, 255, 0.08);
    --glow-cyan: 0 0 18px rgba(6, 182, 212, 0.45);
    --glow-purple: 0 0 18px rgba(168, 85, 247, 0.45);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: #f3f4f6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Subtle grid background overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0e14; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1f2937, #111827);
    border-radius: 10px;
    border: 2px solid #0b0e14;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #06b6d4, #0e7490);
}

/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-14px) scale(1.05); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(6, 182, 212, 0.3); }
    50%      { box-shadow: 0 0 20px rgba(6, 182, 212, 0.55); }
}
@keyframes shimmer {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(220%); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Game Cards ---------- */
.game-card {
    animation: fadeInUp 0.55s var(--ease-out) both;
    will-change: transform, box-shadow;
}
.game-card:nth-child(1) { animation-delay: 0.04s; }
.game-card:nth-child(2) { animation-delay: 0.08s; }
.game-card:nth-child(3) { animation-delay: 0.12s; }
.game-card:nth-child(4) { animation-delay: 0.16s; }
.game-card:nth-child(5) { animation-delay: 0.20s; }
.game-card:nth-child(6) { animation-delay: 0.24s; }

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 22px rgba(6, 182, 212, 0.18);
}

/* Shimmer sweep on hover (targets the image container) */
.game-card .aspect-\[4\/3\]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
    transform: translateX(-120%);
    pointer-events: none;
}
.game-card:hover .aspect-\[4\/3\]::after {
    animation: shimmer 0.9s var(--ease-out);
}

/* ---------- Hero Blobs ---------- */
.blob {
    filter: blur(60px);
    border-radius: 50%;
    pointer-events: none;
}
.blob-cyan {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, transparent 65%);
    animation: float 7s ease-in-out infinite;
}
.blob-purple {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 65%);
    animation: float 9s ease-in-out infinite reverse;
}

/* ---------- Glow utilities ---------- */
.glow-cyan:hover { box-shadow: var(--glow-cyan); }
.glow-purple:hover { box-shadow: var(--glow-purple); }

/* Pulsing live dot */
.animate-pulse { animation: pulseGlow 2.5s ease-in-out infinite; }

/* ---------- Glassmorphism ---------- */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

/* ---------- Modal slide-up ---------- */
.animate-slide-up {
    animation: slideUp 0.35s var(--ease-out) both;
}

/* ---------- Filter Buttons ---------- */
.filter-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    background: transparent;
    transition: all 0.2s var(--ease-out);
}
.filter-btn:hover {
    border-color: rgba(6, 182, 212, 0.4);
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.05);
}
.filter-btn.active {
    border-color: #06b6d4;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

/* ---------- ShamCash Payment Card ---------- */
.shamcash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(8, 145, 178, 0.04));
    border: 1.5px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.shamcash-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(6, 182, 212, 0.08) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s var(--ease-out);
    pointer-events: none;
}
.shamcash-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
    transform: translateY(-2px);
}
.shamcash-card:hover::before { transform: translateX(100%); }
.shamcash-card.active {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 4px 20px rgba(6, 182, 212, 0.2);
}
.shamcash-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}
.shamcash-check {
    color: #22c55e;
    flex-shrink: 0;
}

/* ---------- Pack Options ---------- */
.pack-option > div {
    transition: all 0.2s var(--ease-out);
}
.pack-option:hover > div {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

/* ---------- Cart Drawer ---------- */
#cartDrawer {
    transition: transform 0.35s var(--ease-out);
}

/* ---------- Inputs (autofill fix) ---------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px #161b22 inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Focus ring for accessibility */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(6, 182, 212, 0.6);
    outline-offset: 2px;
}

/* ---------- Toast ---------- */
#toast {
    transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

/* ---------- Button press feedback ---------- */
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* ---------- Spinner (for loading states) ---------- */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   AUTH MODAL — Redesigned
   ========================================================= */

/* Modal entrance animations */
@keyframes backdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fieldIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(20px, -24px); }
}
@keyframes floatSlower {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-18px, 18px); }
}
@keyframes shine {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes pulseRing {
    0%   { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(2.2); opacity: 0; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}

.animate-shake { animation: shake 0.4s ease; }

.animate-backdrop-in { animation: backdropIn 0.3s ease both; }
.animate-modal-in   { animation: modalIn 0.45s var(--ease-out) both; }
.animate-float-slow  { animation: floatSlow 8s ease-in-out infinite; }
.animate-float-slower { animation: floatSlower 10s ease-in-out infinite; }

/* Left visual panel */
.auth-visual {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 30%, #4c1d95 70%, #1e1b4b 100%);
    position: relative;
}
.auth-visual-bg {
    background:
        radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.35) 0%, transparent 45%);
    animation: floatSlow 12s ease-in-out infinite;
}
.auth-grid-overlay {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}

/* Tab pill (sliding indicator) */
.auth-tab-pill {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 1rem;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
    transition: transform 0.4s var(--ease-out);
}
.auth-tab-pill.right { transform: translateX(100%); }

/* Form fields */
.auth-field {
    animation: fieldIn 0.4s var(--ease-out) both;
}
.auth-field:nth-child(1) { animation-delay: 0.05s; }
.auth-field:nth-child(2) { animation-delay: 0.10s; }
.auth-field:nth-child(3) { animation-delay: 0.15s; }

.auth-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-input-wrap {
    position: relative;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.2s ease;
    pointer-events: none;
}
.auth-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 13px 16px;
    color: #fff;
    font-size: 14px;
    transition: all 0.25s var(--ease-out);
}
.auth-input::placeholder { color: #4b5563; }
.auth-input:focus {
    outline: none;
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.06);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}
.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: #22d3ee;
}

.auth-error {
    color: #f87171;
    font-size: 11px;
    margin-top: 6px;
    padding-left: 4px;
    animation: fieldIn 0.25s ease both;
}

/* Password strength bars */
.strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.strength-bar.active.weak   { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.strength-bar.active.medium { background: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.5); }
.strength-bar.active.strong { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }

/* Checkbox */
.auth-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.auth-checkbox:checked {
    background: #06b6d4;
    border-color: #06b6d4;
}
.auth-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Submit button with glow + shine */
.auth-submit {
    position: relative;
    width: 100%;
    margin-top: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border-radius: 14px;
    border: none;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}
.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.45);
}
.auth-submit:active { transform: translateY(0) scale(0.98); }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.auth-submit-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    background-size: 200% 100%;
    transform: translateX(-100%);
    transition: transform 0.6s var(--ease-out);
    pointer-events: none;
}
.auth-submit:hover .auth-submit-glow { transform: translateX(100%); }

/* Social buttons */
.auth-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}
.auth-social:hover {
    color: #fff;
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.06);
    transform: translateY(-2px);
}
.auth-social i { transition: transform 0.25s ease; }
.auth-social:hover i { transform: scale(1.15); }

/* Mobile: hide visual panel, keep immersive form */
@media (max-width: 767px) {
    .auth-visual { display: none !important; }
}

/* =========================================================
   FAQ ACCORDION + FLOATING SUPPORT WIDGET
   ========================================================= */

/* ---------- FAQ ---------- */
.faq-item {
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}
.faq-item.open { border-color: rgba(6, 182, 212, 0.4); }
.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-weight: 700;
    font-size: 14px;
    color: #f3f4f6;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}
.faq-q:hover { color: #22d3ee; }
.faq-chevron { color: #6b7280; transition: transform 0.3s var(--ease-out); flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: #22d3ee; }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out);
}
.faq-a p {
    padding: 0 18px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #9ca3af;
}

/* ---------- Floating Support Widget ---------- */
.support-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
html[dir="rtl"] .support-widget { right: auto; left: 24px; }

@keyframes supportPulse {
    0%   { transform: scale(1);    opacity: 0.6; }
    100% { transform: scale(1.75); opacity: 0; }
}
.support-fab {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}
.support-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 36px rgba(6, 182, 212, 0.6), 0 0 24px rgba(168, 85, 247, 0.35);
}
.support-fab-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #22d3ee;
    animation: supportPulse 2s ease-out infinite;
    pointer-events: none;
}

.support-popup {
    width: 260px;
    background: #161b22;
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.12);
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.support-widget.open .support-popup {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.support-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    margin-top: 8px;
    transition: all 0.22s var(--ease-out);
}
.support-link span { display: flex; flex-direction: column; line-height: 1.3; }
.support-link span small { color: #9ca3af; font-size: 11px; }
.support-link.whatsapp { color: #4ade80; }
.support-link.whatsapp:hover {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
    transform: translateY(-2px);
    color: #4ade80;
}
.support-link.telegram { color: #38bdf8; }
.support-link.telegram:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.08);
    transform: translateY(-2px);
    color: #38bdf8;
}
.support-link span b { color: #fff; font-size: 13px; }

@media (max-width: 480px) {
    .support-widget { bottom: 16px; right: 16px; }
    html[dir="rtl"] .support-widget { left: 16px; }
    .support-popup { width: 230px; }
}
