/* ========================================================
   QEYEX WEBSITE
   ======================================================== */

/* ── Smooth scroll ──────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ── Selection ──────────────────────────────────────────── */
::selection {
    background: rgba(240, 240, 240, 0.12);
    color: #f0f0f0;
}

/* ── Prevent drag & select on non-text elements ────────── */
img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}
a img, .preview-tilt img {
    pointer-events: none;
}
button,
a,
.nav-link,
.pricing-btn,
.pricing-card,
.feature-card,
.feature-icon,
.game-card,
.status-badge,
.popular-badge,
.pricing-tier-badge,
.section-pill,
label {
    -webkit-user-select: none;
    user-select: none;
}

/* ── Scrollbar (hidden) ─────────────────────────────────── */
::-webkit-scrollbar { width: 0; display: none; }
html { scrollbar-width: none; -ms-overflow-style: none; }


/* ========================================================
   NAVBAR
   ======================================================== */

.nav-blur {
    background: rgba(22, 22, 22, 0.8);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.nav-blur.scrolled {
    background: rgba(22, 22, 22, 0.95);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #7a7a7a;
    transition: color 0.18s, background 0.18s;
    text-decoration: none;
}
.nav-link:hover,
.nav-link.active {
    color: #f0f0f0;
    background: #1f1f1f;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #7a7a7a;
    text-decoration: none;
    transition: color 0.18s, background 0.18s;
}
.mobile-link:hover {
    color: #f0f0f0;
    background: #1f1f1f;
}


/* ========================================================
   HERO
   ======================================================== */

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 100%);
    pointer-events: none;
}

.text-gradient {
    background: linear-gradient(135deg, #f0f0f0 0%, #7a7a7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Preview tilt hover */
.preview-tilt {
    perspective: 800px;
}
.preview-tilt img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.preview-tilt:hover img {
    transform: rotateX(4deg) rotateY(-3deg) translateY(-6px);
}


/* ========================================================
   GAME CARDS
   ======================================================== */

/* Row layout: 2 equal, universal spans full width */
.games-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}


@media (max-width: 768px) {
    .games-row {
        grid-template-columns: 1fr;
    }

}

.game-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 24px;
    transition: transform 0.25s, background 0.25s;
}
.game-card:hover {
    background: #1a1a1a;
}

.game-card-small {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.game-card-small .game-card-header {
    gap: 10px;
    margin-bottom: 14px;
}

/* Game image icon */
.game-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.game-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.game-features-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-feature {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 500;
    color: #7a7a7a;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.02);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 4px;
}
.status-supported {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}


/* ========================================================
   GAME VIDEO EMBED
   ======================================================== */

.game-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.game-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.game-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}

.game-video-placeholder span {
    font-size: 11px;
    font-weight: 500;
    color: #404040;
    letter-spacing: 0.02em;
}


/* ========================================================
   FEATURE CARDS
   ======================================================== */

.feature-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 24px;
    transition: transform 0.25s, background 0.25s;
}
.feature-card:hover {
    background: #1a1a1a;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #1f1f1f;
    color: #f0f0f0;
    margin-bottom: 14px;
    transition: background 0.25s;
}
.feature-card:hover .feature-icon {
    background: #1f1f1f;
}


/* ========================================================
   PRICING CARDS
   ======================================================== */

.pricing-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s;
}
.pricing-card:hover {
    transform: translateY(-3px);
}

/* Featured card */
.pricing-featured {
    background: #1a1a1a;
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: #f0f0f0;
    color: #161616;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 4px 14px;
    border-radius: 0 0 6px 6px;
}

.pricing-header {
    margin-bottom: 20px;
}

.pricing-tier-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.tier-free {
    background: rgba(255, 255, 255, 0.05);
    color: #7a7a7a;
}
.tier-paid {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}
.tier-private {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #f0f0f0;
}
.pricing-feature.disabled {
    color: #404040;
}

.pricing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.pricing-btn-primary {
    background: #f0f0f0;
    color: #161616;
}
.pricing-btn-primary:hover {
    background: #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.06);
}
.pricing-btn-secondary {
    background: #272727;
    color: #f0f0f0;
}
.pricing-btn-secondary:hover {
    background: #2f2f2f;
}


/* ========================================================
   CTA CARD
   ======================================================== */

.cta-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 14px;
    padding: 56px 40px;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none;
}


/* ========================================================
   SCROLL ANIMATIONS
   ======================================================== */

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.35s; }


/* ========================================================
   AUTH MODAL
   ======================================================== */

/* Overlay transitions */
#auth-overlay {
    display: flex;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s 0.3s;
}
#auth-overlay.active {
    pointer-events: all;
    visibility: visible;
    transition: visibility 0s 0s;
}

#auth-backdrop {
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#auth-overlay.active #auth-backdrop {
    opacity: 1;
}

.auth-modal {
    background: #161616;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.96) translateY(10px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#auth-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.auth-view {
    padding: 32px;
}

.auth-input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    background: #1f1f1f;
    border: none;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    transition: background 0.18s;
}
.auth-input::placeholder {
    color: #404040;
}
.auth-input:focus {
    background: #272727;
}
/* Hide browser native password reveal button */
.auth-input[type="password"]::-ms-reveal,
.auth-input[type="password"]::-ms-clear { display: none; }
.auth-input[type="password"]::-webkit-reveal { display: none; }

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 40px #1f1f1f inset !important;
    -webkit-text-fill-color: #f0f0f0 !important;
    caret-color: #f0f0f0;
    transition: background-color 5000s ease-in-out 0s;
}

/* Code input boxes */
#code-inputs .auth-input {
    padding: 0;
    text-align: center;
}


/* ========================================================
   TOAST NOTIFICATIONS
   ======================================================== */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    background: #1a1a1a;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #f0f0f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: all;
    max-width: 380px;
    min-width: 240px;
    word-break: break-word;
}
.toast.toast-show {
    opacity: 1;
    transform: translateY(0);
}
.toast-svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.toast-success .toast-svg { color: #34d399; }
.toast-error   .toast-svg { color: #ff4d6d; }
.toast-info    .toast-svg { color: #7a7a7a; }


/* ========================================================
   PAGE LOADER
   ======================================================== */

#dash-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #161616;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: all;
}
#dash-loader.out {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}
#dash-loader .loader-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 0%, transparent 100%);
    opacity: 0;
    animation: loader-grid-in 0.9s ease 0.05s forwards;
}
@keyframes loader-grid-in {
    from { opacity: 0; background-size: 56px 56px; }
    to   { opacity: 1; background-size: 48px 48px; }
}
#dash-loader .loader-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    opacity: 0;
    filter: grayscale(1) brightness(0.28);
    animation: loader-icon-in 0.4s ease 0.2s forwards;
}
@keyframes loader-icon-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}
#dash-loader .loader-bar {
    width: 100px;
    height: 2px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: loader-icon-in 0.4s ease 0.3s forwards;
}
#dash-loader .loader-bar-fill {
    height: 100%;
    width: 0%;
    background: #383838;
    border-radius: 2px;
    animation: loader-bar-fill 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}
@keyframes loader-bar-fill {
    0%   { width: 0%; }
    60%  { width: 75%; }
    100% { width: 100%; }
}


/* ========================================================
   RESPONSIVE
   ======================================================== */

@media (max-width: 640px) {
    .cta-card {
        padding: 40px 24px;
    }
    .game-features {
        grid-template-columns: 1fr;
    }
    #toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    .toast {
        max-width: 100%;
    }
}