/* ================================================================
   Homepage Visual Enhancement
   Подключается после main.css — переопределяет и дополняет стили
   ================================================================ */

/* === CSS Custom Properties (Design System) === */
:root {
    /* Primary palette */
    --accent: #5ebdf9;
    --accent-bright: #7dd3ff;
    --accent-dark: #1a90da;
    --accent-glow: rgba(94, 189, 249, 0.5);
    --accent-subtle: rgba(94, 189, 249, 0.12);
    /* Status colors */
    --green: #2ecc71;
    --green-glow: rgba(46, 204, 113, 0.4);
    --red-soft: rgba(255, 100, 100, 0.8);
    --yellow: #f5a623;
    --yellow-glow: rgba(245, 166, 35, 0.4);
    /* Backgrounds */
    --bg-deep: #070e1a;
    --bg-primary: #0a1628;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    /* Glass morphism */
    --glass: rgba(10, 22, 40, 0.65);
    --glass-border: rgba(94, 189, 249, 0.18);
    /* Typography */
    --text-primary: #f0f4f8;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    /* Border radius */
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-full: 50px;
    /* Transitions */
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s ease;
    /* Layout */
    --container-max: 1200px;
    --touch-target-min: 44px;
}

/* Skeleton loading animation */
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Font is preloaded in <head>, no @import needed */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Hero Section Enhancement === */
.hero-section {
    padding: 100px 0 90px;
    background: linear-gradient(160deg, rgba(26, 144, 218, 0.08) 0%, rgba(10, 22, 40, 0.4) 50%, rgba(46, 204, 113, 0.04) 100%);
    border-bottom: 1px solid rgba(94, 189, 249, 0.15);
    margin-bottom: 0;
}

.hero-text h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-bright) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 28px;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
    font-weight: 400;
}

/* === Hero CTA Buttons === */
.hero-cta {
    margin-top: 36px;
    gap: 14px;
}

.hero-cta__button {
    padding: 16px 38px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.hero-cta__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    transition: left 0.7s ease;
}

.hero-cta__button:hover::before {
    left: 100%;
}

.hero-cta__button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px var(--accent-glow), 0 0 60px rgba(94, 189, 249, 0.2);
}

.hero-cta__button--secondary {
    background: rgba(94, 189, 249, 0.08);
    border: 2px solid rgba(94, 189, 249, 0.35);
    color: var(--accent-bright);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.hero-cta__button--secondary:hover {
    background: rgba(94, 189, 249, 0.18);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 25px rgba(94, 189, 249, 0.3), inset 0 0 20px rgba(94, 189, 249, 0.05);
}

/* === HWID Spoofer Demo — Glass Panel === */
.hwid-spoofer-demo {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(94, 189, 249, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 32px;
}

.demo-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 16px;
}

.demo-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 1px;
}

.hwid-params {
    gap: 12px;
}

.param-item {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(94, 189, 249, 0.08);
    border-left: 3px solid rgba(94, 189, 249, 0.3);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all var(--transition);
}

.param-item:hover {
    background: rgba(94, 189, 249, 0.06);
    border-left-color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.param-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 110px;
}

.param-value {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.param-value.old-value {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 107, 107, 0.4);
}

.param-value.new-value {
    color: var(--green);
    background: rgba(46, 204, 113, 0.1);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.1);
}

.param-arrow {
    color: var(--accent);
    font-size: 16px;
    opacity: 0.6;
}

/* Progress bar */
.spoofing-indicator {
    margin-top: 20px;
}

.indicator-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.progress-bar-container {
    height: 6px;
    background: rgba(94, 189, 249, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--green));
    border-radius: 3px;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* === Search Section === */
.search-section {
    padding: 50px 0 10px;
    background: transparent;
}

.search-wrapper {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.search-input {
    padding: 18px 60px 18px 24px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(94, 189, 249, 0.12), 0 0 40px rgba(94, 189, 249, 0.08);
    background: rgba(10, 22, 40, 0.85);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.search-button {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(94, 189, 249, 0.2), rgba(26, 144, 218, 0.2));
    border: 1px solid rgba(94, 189, 249, 0.3);
    color: var(--accent);
    transition: all 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-50%) scale(1.05);
}

/* === Quick Navigation === */
.quick-nav {
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.97) 0%, rgba(10, 22, 40, 0.92) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(94, 189, 249, 0.12);
    border-top: none;
    margin-bottom: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.quick-nav::before {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 189, 249, 0.4), transparent);
    opacity: 0.5;
}

.quick-nav__link {
    padding: 12px 28px;
    border-radius: 50px;
    background: rgba(94, 189, 249, 0.06);
    border: 1px solid rgba(94, 189, 249, 0.18);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    min-width: auto;
    gap: 8px;
    text-shadow: none;
    box-shadow: none;
}

.quick-nav__link::after {
    display: none;
}

.quick-nav__link:hover {
    background: rgba(94, 189, 249, 0.15);
    border-color: rgba(94, 189, 249, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 189, 249, 0.2);
    text-shadow: none;
}

.quick-nav__link:active {
    transform: translateY(0);
}

/* === Section Titles === */
.section-title {
    margin: 50px 0 30px;
    padding-bottom: 0;
}

.section-title::after {
    display: none;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: none;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    font-weight: 400;
}

/* Section Decorators */
.games-section,
.products-section,
.free-solutions-section {
    position: relative;
    padding: 30px 0;
}

.games-section::before,
.products-section::before,
.free-solutions-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 500px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 189, 249, 0.25), transparent);
}

.games-section,
.products-section {
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius-lg);
    margin: 30px 0;
    backdrop-filter: blur(4px);
}

.free-solutions-section {
    padding: 50px 0;
    margin-top: 30px;
}

/* === Product Cards Enhancement === */
.product-card {
    background: var(--bg-card);
    border: 1px solid rgba(94, 189, 249, 0.12);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    transition: all var(--transition);
    min-height: auto;
}

.product-card::before {
    height: 2px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent-bright), var(--accent-dark));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(94, 189, 249, 0.15), 0 0 0 1px rgba(94, 189, 249, 0.25);
    border-color: rgba(94, 189, 249, 0.35);
    background: var(--bg-card-hover);
}

.product-card:hover::before {
    opacity: 1;
}

/* === Game Cards Enhancement === */
.game-card {
    background: var(--bg-card);
    border: 1px solid rgba(94, 189, 249, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition);
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent-bright), var(--green));
    opacity: 0;
    transition: opacity 0.4s;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(94, 189, 249, 0.15), 0 0 0 1px rgba(94, 189, 249, 0.2);
    border-color: rgba(94, 189, 249, 0.3);
    background: var(--bg-card-hover);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card .card-image {
    border-radius: var(--radius-md);
    border: 1px solid rgba(94, 189, 249, 0.1);
    overflow: hidden;
}

.game-card:hover .card-image {
    border-color: rgba(94, 189, 249, 0.3);
}

.game-card .game-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card:hover .game-title {
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.04);
    text-shadow: none;
}

/* === Games Load More Button === */
.games-load-more-button {
    padding: 14px 40px;
    border-radius: 50px;
    background: rgba(94, 189, 249, 0.08);
    border: 1px solid rgba(94, 189, 249, 0.3);
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.games-load-more-button:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

/* === Scroll-Reveal Animation === */
@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.games-section,
.products-section,
.free-solutions-section {
    animation: revealUp 0.7s ease-out both;
}

.products-section {
    animation-delay: 0.1s;
}

.free-solutions-section {
    animation-delay: 0.2s;
}

/* === Enhanced card appear animation === */
@keyframes cardSlideUp {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.products-grid .product-card,
.games-grid .game-card {
    animation: cardSlideUp 0.5s ease-out both;
}

.products-grid .product-card:nth-child(1),
.games-grid .game-card:nth-child(1) { animation-delay: 0.05s; }
.products-grid .product-card:nth-child(2),
.games-grid .game-card:nth-child(2) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(3),
.games-grid .game-card:nth-child(3) { animation-delay: 0.15s; }
.products-grid .product-card:nth-child(4),
.games-grid .game-card:nth-child(4) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(5),
.games-grid .game-card:nth-child(5) { animation-delay: 0.25s; }
.products-grid .product-card:nth-child(6),
.games-grid .game-card:nth-child(6) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(7),
.games-grid .game-card:nth-child(7) { animation-delay: 0.35s; }
.products-grid .product-card:nth-child(8),
.games-grid .game-card:nth-child(8) { animation-delay: 0.4s; }

/* === Scroll to top button === */
.scroll-to-top {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(94, 189, 249, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: rgba(94, 189, 249, 0.2);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

/* === Hero Particles Enhancement === */
.hero-particles span {
    width: 2px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* === Responsive overrides === */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 40px;
    }
    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 50px;
    }
    .hero-text h1 {
        font-size: 32px;
        text-align: center;
    }
    .hero-text p {
        font-size: 16px;
        text-align: center;
        max-width: 100%;
    }
    .hero-cta {
        justify-content: center;
    }
    .section-title h2 {
        font-size: 26px;
    }
    .section-title p {
        font-size: 14px;
    }
    .games-section,
    .products-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    .quick-nav__link {
        padding: 10px 20px;
        font-size: 13px;
    }
    .product-card {
        padding: 16px;
    }
    .game-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 26px;
        letter-spacing: -0.5px;
    }
    .hero-text p {
        font-size: 14px;
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-cta__button {
        padding: 14px 24px;
        font-size: 13px;
        text-align: center;
        justify-content: center;
        min-height: var(--touch-target-min);
    }
    .section-title h2 {
        font-size: 22px;
    }
    .section-title p {
        font-size: 13px;
    }
    .search-input {
        padding: 14px 50px 14px 18px;
        font-size: 14px;
        min-height: var(--touch-target-min);
    }
    .product-card .product-card-title {
        font-size: 14px;
    }
    .hwid-spoofer-demo {
        padding: 18px;
    }
    .demo-title {
        font-size: 14px;
        letter-spacing: 1px;
    }
    .param-item {
        flex-wrap: wrap;
    }
    .param-label {
        font-size: 11px;
        min-width: 100%;
    }
    .param-value {
        font-size: 10px;
        word-break: break-all;
    }
    .param-arrow {
        display: none;
    }
}

@media (max-width: 399px) {
    .hero-text h1 {
        font-size: 22px;
    }
    .hero-text p {
        font-size: 13px;
    }
    .section-title h2 {
        font-size: 20px;
    }
    .games-section,
    .products-section {
        padding: 16px 10px;
        margin: 12px 0;
    }
}

/* === Recently Viewed Section === */
.recently-viewed-section {
    padding: 30px 0;
}

.recently-viewed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.recently-viewed-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(94, 189, 249, 0.1);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
}

.recently-viewed-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(94, 189, 249, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rv-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.rv-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recently-viewed-card:hover .rv-title {
    color: var(--accent-bright);
}

@media (max-width: 768px) {
    .recently-viewed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .recently-viewed-grid {
        grid-template-columns: 1fr;
    }
    .recently-viewed-card {
        padding: 12px;
    }
}

/* === Touch Target & Accessibility === */
button,
a.hero-cta__button,
a.quick-nav__link,
.search-button,
.games-load-more-button,
.product-details-button,
.scroll-to-top {
    min-height: var(--touch-target-min, 44px);
}

/* === Safe area insets for notched devices === */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
    .scroll-to-top {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* === Prevent horizontal overflow === */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* === Focus visible for keyboard navigation === */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

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