/* ============================================================
   VGPrices design system
   ============================================================ */
:root {
    --bg:        #0b1020;
    --bg-2:      #11182e;
    --surface:   #171f38;
    --surface-2: #1e2845;
    --border:    #2a3358;
    --text:      #eef1fb;
    --text-dim:  #9aa6c8;
    --primary:   #6c5ce7;
    --primary-2: #8b7bff;
    --accent:    #00d2a8;
    --danger:    #ff5470;
    --sale:      #00d2a8;
    --radius:    14px;
    --radius-sm: 9px;
    --shadow:    0 10px 30px rgba(0,0,0,.35);
    --shadow-sm: 0 4px 14px rgba(0,0,0,.25);
    --container: 1180px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }

/* ============================================================
   Header
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11,16,32,.85);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.logo img { height: 40px; width: auto; }

.header-search {
    flex: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    transition: border-color .15s, box-shadow .15s;
}
.header-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,.25);
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
    padding: 8px 0;
}
.search-input::placeholder { color: var(--text-dim); }
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.search-button:hover { background: var(--primary-2); }

.main-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 14px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: #fff; background: var(--primary); }

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 92px 20px 104px;
    text-align: center;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(108,92,231,.35), transparent 60%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
}
.background-collage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: .14;
    pointer-events: none;
}
.collage-container {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    transform: rotate(-8deg) scale(1.4);
    justify-content: center;
}
.collage-image {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    filter: saturate(1.1);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 360px at 50% 120%, rgba(0,210,168,.18), transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 760px; margin: 0 auto; }
.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .35em;
    background: linear-gradient(180deg, #fff, #c9cdf0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-content > p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 28px;
}
.hero-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 7px 7px 20px;
}
.hero-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    outline: none;
}
.hero-search input::placeholder { color: var(--text-dim); }
.cta-button {
    display: inline-block;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 26px;
    border-radius: 999px;
    transition: transform .12s, box-shadow .15s, filter .15s;
    box-shadow: 0 8px 22px rgba(108,92,231,.4);
}
.cta-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.hero-trust {
    margin-top: 22px;
    color: var(--text-dim);
    font-size: 14px;
    letter-spacing: .02em;
}

/* ============================================================
   Sections
   ============================================================ */
section { padding: 56px 0; }
.hero-section { padding-top: 92px; }
.featured-section, .categories-section, .how-it-works { background: var(--bg); }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}
.section-head h2, .categories-section h2, .how-it-works h2 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
.see-all { color: var(--primary-2); font-weight: 600; }
.see-all:hover { color: var(--accent); }

/* ============================================================
   Deal grid (homepage + reusable)
   ============================================================ */
.deal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.deal-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.deal-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.deal-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--danger);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.deal-image-wrap {
    aspect-ratio: 3 / 4;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.deal-image { width: 100%; height: 100%; object-fit: cover; }
.deal-image.placeholder { font-size: 3rem; color: var(--text-dim); }
.deal-info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.deal-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}
.deal-platform { color: var(--text-dim); font-size: 13px; margin: 0; }
.deal-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.deal-price-row .sale-price { color: var(--sale); font-size: 20px; font-weight: 800; }
.deal-price-row .original-price { color: var(--text-dim); text-decoration: line-through; font-size: 14px; }
.deal-retailer { color: var(--text-dim); font-size: 12px; margin: 2px 0 0; }

.empty-deals {
    text-align: center;
    padding: 40px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.empty-deals p { color: var(--text-dim); margin-bottom: 16px; }

/* ============================================================
   Categories
   ============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: transform .15s, border-color .15s, background .15s;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--primary); background: var(--surface-2); }
.category-icon { font-size: 2.2rem; margin-bottom: 10px; }
.category-card h3 { font-size: 1.05rem; margin: 0; }

/* ============================================================
   Newsletter band
   ============================================================ */
.newsletter-band {
    text-align: center;
    background:
        radial-gradient(700px 300px at 50% -40%, rgba(0,210,168,.25), transparent 70%),
        linear-gradient(135deg, rgba(108,92,231,.18), rgba(0,210,168,.10));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.newsletter-band h2 { font-size: 1.8rem; font-weight: 800; }
.newsletter-band > .container > p { color: var(--text-dim); margin-bottom: 24px; }
.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
}
.newsletter-form-lg { max-width: 520px; }
.newsletter-input {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 13px 20px;
    font-size: 15px;
    outline: none;
}
.newsletter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.25); }
.newsletter-input::placeholder { color: var(--text-dim); }
.newsletter-button {
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 999px;
    white-space: nowrap;
    transition: filter .15s, transform .12s;
}
.newsletter-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.newsletter-button:disabled { opacity: .6; cursor: default; }
.newsletter-message { margin: 14px 0 0; font-size: 14px; min-height: 20px; }
.newsletter-message.success { color: var(--accent); }
.newsletter-message.error { color: var(--danger); }

/* ============================================================
   How it works
   ============================================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    text-align: center;
}
.step-number {
    width: 46px;
    height: 46px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.step-card h3 { font-size: 1.15rem; }
.step-card p { color: var(--text-dim); margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-2);
    padding: 48px 0 36px;
    margin-top: 20px;
}
.footer-inner { text-align: center; }
.footer-cta h3 { font-size: 1.4rem; font-weight: 800; }
.footer-cta > p { color: var(--text-dim); margin-bottom: 20px; }
.footer-meta { margin-top: 32px; color: var(--text-dim); font-size: 13px; }
.affiliate-disclosure { max-width: 640px; margin: 8px auto 0; font-size: 12px; opacity: .8; }

/* ============================================================
   Search page
   ============================================================ */
.search-section { padding: 32px 0 8px; }
.search-page-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; }
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.filter-select, .sort-select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}
.filter-select:focus, .sort-select:focus { border-color: var(--primary); }

.results-section { padding: 24px 0 64px; }
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 14px;
}
.results-header h2 { font-size: 1.3rem; margin: 0; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.game-image { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--surface-2); }
.game-info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.game-info .game-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}
.game-platforms { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.game-platforms .platform-icon { width: 22px; height: 22px; object-fit: contain; opacity: .85; }
.game-publisher { color: var(--text-dim); font-size: 12px; margin: 0; }
.game-price { color: var(--sale); font-size: 19px; font-weight: 800; margin: 2px 0 0; }

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    padding: 50px 20px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.loading-indicator { text-align: center; padding: 30px; color: var(--text-dim); }
.spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 12px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Game detail page
   ============================================================ */
.game-detail-container { max-width: var(--container); margin: 0 auto; padding: 40px 20px 64px; }
.game-header { display: grid; grid-template-columns: 320px 1fr; gap: 40px; }
.game-image-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    align-self: start;
}
.game-detail-image { width: 100%; object-fit: cover; }
.game-info-container .game-title { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
.game-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.platform-icons { display: flex; gap: 8px; }
.platform-icons .platform-icon { width: 28px; height: 28px; object-fit: contain; }
.esrb-rating, .preorder-badge {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}
.preorder-badge { color: var(--accent); border-color: rgba(0,210,168,.4); }

.medium-filter { display: flex; gap: 8px; margin: 16px 0; }
.medium-filter .filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 600;
    transition: all .15s;
}
.medium-filter .filter-btn:hover { color: var(--text); }
.medium-filter .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.game-prices { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.price-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    transition: border-color .15s, transform .12s, background .15s;
}
.price-item:hover { border-color: var(--primary); transform: translateX(2px); background: var(--surface-2); }
.price-item .retailer { font-weight: 700; }
.price-and-cta { display: flex; align-items: center; gap: 12px; }
.price-item .sale-price { color: var(--sale); font-weight: 800; font-size: 18px; }
.price-item .original-price { color: var(--text-dim); text-decoration: line-through; font-size: 14px; }
.price-item .price { font-weight: 800; font-size: 18px; }
.buy-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.price-item.lowest-price { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(0,210,168,.4); }
.price-item.lowest-price .price, .price-item.lowest-price .sale-price { color: var(--accent); }

.publisher, .developer, .release-date, .genre, .game-info-container .esrb-rating {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    border: none;
    background: none;
}
.publisher .label, .developer .label, .release-date .label, .genre .label { color: var(--text-dim); font-weight: 600; }

.game-description { margin-top: 40px; max-width: 800px; }
.game-description h2, .game-ratings h2 { font-size: 1.3rem; font-weight: 800; }
.game-description p { color: var(--text-dim); }
.game-ratings { margin-top: 32px; }
.average-rating { display: flex; align-items: baseline; gap: 8px; }
.rating-value { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.rating-count { color: var(--text-dim); font-size: 14px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .deal-grid, .game-grid, .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .steps-grid { grid-template-columns: 1fr; }
    .game-header { grid-template-columns: 1fr; }
    .game-image-container { max-width: 320px; }
}
@media (max-width: 760px) {
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .header-search { order: 3; max-width: none; flex-basis: 100%; }
    .main-nav { margin-left: auto; }
    .deal-grid, .game-grid, .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-search { flex-direction: column; border-radius: var(--radius); padding: 14px; }
    .hero-search .cta-button { width: 100%; }
    .newsletter-form { flex-direction: column; }
    .newsletter-button { width: 100%; }
    .price-item { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 460px) {
    .deal-grid, .game-grid, .categories-grid { grid-template-columns: 1fr 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
