/* ========================================================
   JUUZOU - DarkHub Cyberpunk Design System & Parallax
   ======================================================== */

:root {
    --bg-dark: #08090d;
    --card-bg: rgba(13, 16, 25, 0.88);
    --card-hover: rgba(18, 22, 36, 0.95);
    --border-color: rgba(36, 44, 66, 0.7);
    --border-hover: rgba(20, 241, 255, 0.45);
    
    --primary: #14f1ff;       /* Cyber Ciano */
    --primary-glow: rgba(20, 241, 255, 0.35);
    --secondary: #ff2ef7;     /* Magenta Neon */
    --secondary-glow: rgba(255, 46, 247, 0.35);
    --accent: #39ff88;        /* Neon Green */
    --accent-glow: rgba(57, 255, 136, 0.35);
    --warning: #ffb830;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition-fast: 0.18s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: var(--bg-dark);
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* ── Neon Canvas Background (Spring Physics & Parallax) ── */
#neon-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.cyber-grid {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(20, 241, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 241, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(#000 15%, transparent 90%);
    mask-image: linear-gradient(#000 15%, transparent 90%);
}

.scan-surface::after {
    content: "";
    pointer-events: none;
    background: linear-gradient(transparent, rgba(20, 241, 255, 0.05), transparent);
    animation: 8s linear infinite scan-line;
    position: fixed;
    inset: 0;
    z-index: 9999;
    transform: translateY(-100%);
}

@keyframes scan-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

::selection {
    background: rgba(20, 241, 255, 0.35);
    color: #fff;
}

/* ── Container Layout ── */
.app-container {
    position: relative;
    z-index: 10;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 24px) 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* ── Header & Parallax ── */
.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    --parallax-x: 0px;
    --parallax-y: 0px;
    transform: translate(var(--parallax-x), var(--parallax-y));
    transition: transform 0.12s ease-out;
    will-change: transform;
}

.logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.logo-img {
    width: 130px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(20, 241, 255, 0.25), 0 0 60px rgba(255, 46, 247, 0.15);
    border: 1px solid rgba(20, 241, 255, 0.3);
    transition: var(--transition-smooth);
}

.logo-img:hover {
    transform: scale(1.06) rotate(1deg);
    border-color: var(--secondary);
    box-shadow: 0 0 45px var(--secondary-glow);
}

.site-title {
    font-family: 'Rajdhani', 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
    text-shadow: 0 0 15px rgba(20, 241, 255, 0.5), 0 0 30px rgba(255, 46, 247, 0.25);
    animation: neonPulse 3s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0% { text-shadow: 0 0 12px rgba(20, 241, 255, 0.4), 0 0 24px rgba(255, 46, 247, 0.2); }
    100% { text-shadow: 0 0 20px rgba(20, 241, 255, 0.65), 0 0 38px rgba(255, 46, 247, 0.35); }
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(57, 255, 136, 0.1);
    border: 1px solid rgba(57, 255, 136, 0.3);
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.badge-live::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

/* ── 3D Tilt Component System ── */
[data-tilt] {
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.tilt-face {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* Dynamic Glare & Top Neon Line */
.tilt-face::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y), rgba(20, 241, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
    z-index: 2;
}

.tilt-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 3;
}

[data-tilt]:hover .tilt-face {
    border-color: var(--border-hover);
    background: var(--card-hover);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(20, 241, 255, 0.15);
}

[data-tilt]:hover .tilt-face::before,
[data-tilt]:hover .tilt-face::after {
    opacity: 1;
}

/* ── Search Box Section ── */
.search-section {
    width: 100%;
}

.search-card {
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-form:focus-within .search-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 6px var(--primary));
}

#searchInput {
    width: 100%;
    background: rgba(9, 11, 18, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 16px 48px 16px 52px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-family: inherit;
    transition: var(--transition-smooth);
    outline: none;
}

#searchInput:focus {
    border-color: var(--primary);
    background: rgba(9, 11, 18, 0.98);
    box-shadow: 0 0 16px rgba(20, 241, 255, 0.2);
}

.clear-btn {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.clear-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.clear-btn.active {
    display: flex;
}

.btn-search {
    background: linear-gradient(135deg, rgba(20, 241, 255, 0.15), rgba(255, 46, 247, 0.15));
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0 28px;
    height: 54px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-search:hover {
    background: linear-gradient(135deg, rgba(20, 241, 255, 0.3), rgba(255, 46, 247, 0.3));
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* ── Filter Bar & Quick Tools ── */
.filter-toolbar {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-select {
    background: rgba(9, 11, 18, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

.filter-select:hover, .filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(20, 241, 255, 0.15);
}

/* Chips Selector */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 110px;
    overflow-y: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.chip-btn {
    background: rgba(14, 18, 28, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.chip-btn:hover {
    color: var(--text-main);
    border-color: rgba(20, 241, 255, 0.4);
    background: rgba(20, 241, 255, 0.08);
}

.chip-btn.active {
    background: rgba(20, 241, 255, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(20, 241, 255, 0.2);
    font-weight: 500;
}

.chip-count {
    font-size: 0.72rem;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 10px;
}

/* ── Stats & Results Header Bar ── */
.stats-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0 4px;
}

.stats-count {
    color: var(--text-main);
    font-weight: 600;
}

.stats-benchmark {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── Results Container & Cards ── */
#results {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    perspective: 1200px;
}

.result-card-wrap {
    width: 100%;
    transform: rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg));
    transition: transform 0.1s ease-out;
}

.result-card {
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.result-title {
    font-family: 'Rajdhani', 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    letter-spacing: 0.02em;
    word-break: break-word;
}

mark {
    background: rgba(20, 241, 255, 0.25);
    color: var(--primary);
    padding: 1px 4px;
    border-radius: 4px;
    text-shadow: 0 0 8px rgba(20, 241, 255, 0.5);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(9, 11, 18, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.meta-pill.prov-fitgirl   { color: #ff5eb4; border-color: rgba(255, 94, 180, 0.3); background: rgba(255, 94, 180, 0.08); }
.meta-pill.prov-dodi      { color: #ffa439; border-color: rgba(255, 164, 57, 0.3); background: rgba(255, 164, 57, 0.08); }
.meta-pill.prov-gog       { color: #5bc0be; border-color: rgba(91, 192, 190, 0.3); background: rgba(91, 192, 190, 0.08); }
.meta-pill.prov-onlinefix { color: #14f1ff; border-color: rgba(20, 241, 255, 0.3); background: rgba(20, 241, 255, 0.08); }
.meta-pill.prov-xatab     { color: #e06d53; border-color: rgba(224, 109, 83, 0.3); background: rgba(224, 109, 83, 0.08); }
.meta-pill.prov-steamrip  { color: #a78bfa; border-color: rgba(167, 139, 250, 0.3); background: rgba(167, 139, 250, 0.08); }
.meta-pill.prov-kaoskrew  { color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); background: rgba(56, 189, 248, 0.08); }
.meta-pill.prov-steamgg   { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); }
.meta-pill.prov-kazumi    { color: #f472b6; border-color: rgba(244, 114, 182, 0.3); background: rgba(244, 114, 182, 0.08); }
.meta-pill.prov-darkhub   { color: #c084fc; border-color: rgba(192, 132, 252, 0.3); background: rgba(192, 132, 252, 0.08); }

.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-magnet {
    background: rgba(57, 255, 136, 0.1);
    color: var(--accent);
    border-color: rgba(57, 255, 136, 0.4);
}

.btn-magnet:hover {
    background: rgba(57, 255, 136, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    text-shadow: 0 0 8px rgba(57, 255, 136, 0.6);
    transform: translateY(-1px);
}

.btn-copy {
    background: rgba(20, 241, 255, 0.08);
    color: var(--primary);
    border-color: rgba(20, 241, 255, 0.3);
}

.btn-copy:hover {
    background: rgba(20, 241, 255, 0.18);
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

.btn-copy.copied {
    background: rgba(57, 255, 136, 0.25);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

/* ── Pagination / Load More ── */
.load-more-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-load-more {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 14px 36px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-card);
}

.btn-load-more:hover {
    border-color: var(--primary);
    background: rgba(20, 241, 255, 0.12);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

/* ── Loading / Empty States ── */
.loader-spinner {
    display: none;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(20, 241, 255, 0.15);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    margin: 30px auto;
    animation: rotateSpinner 0.8s linear infinite;
    box-shadow: 0 0 15px var(--primary-glow);
}

@keyframes rotateSpinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-icon {
    width: 44px;
    height: 44px;
    color: var(--primary);
    opacity: 0.7;
    margin-bottom: 4px;
}

/* ── Scroll Reveal System ── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Toast Notification ── */
.toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(14, 18, 28, 0.95);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    .btn-search {
        width: 100%;
        justify-content: center;
    }
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .card-top {
        flex-direction: column;
    }
    .btn-action {
        flex: 1;
    }
    .toast-msg {
        left: 20px;
        right: 20px;
        bottom: 20px;
        justify-content: center;
    }
}
