::selection {
  background: #1d4ed8;
  color: #fff;
}

::-moz-selection {
  background: #1d4ed8;
  color: #fff;
}

:root {
    --bg-black: #000000;
    --card-bg: #000000;
    --border-dim: #1a1a1a;
    --text-dim: #71717a;
    --accent-blue: #3b82f6;
}

.hero {
    padding: 10rem 2rem 5rem;
    text-align: center;
    position: relative;
    background: #000;
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    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: 50px 50px;
    -webkit-mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
    mask-image: radial-gradient(circle at center, black 20%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}

.hero p {
    color: var(--accent-blue);
    font-size: 1.125rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}


.text-gradient-white {
    background: linear-gradient(to bottom, #fff 40%, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-right: 0.1em;
    margin-right: -0.1em;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

@media (max-width: 768px) {
    .game-container {
        padding: 0 1.5rem 2rem;
    }
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 4rem;
}

@media (min-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    border-radius: 28px;
    overflow: hidden;
    background: #080808;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20px) scale(0.98);
    will-change: opacity, filter, transform;
}

@media (min-width: 1024px) {
    .game-card {
        aspect-ratio: 16 / 10;
        min-height: auto;
    }
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 4;
}

.game-card.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.game-card:hover {
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9);
}

.card-image-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    -webkit-user-drag: none;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 10%,
        rgba(0, 0, 0, 0.3) 30%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.95) 80%,
        rgba(0, 0, 0, 1) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.card-content {
    position: relative;
    margin-top: auto;
    padding: 4rem 3rem 2.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                padding 0.3s ease, 
                gap 0.3s ease;
}

.card-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    word-break: break-word;
    overflow-wrap: break-word;
}

.card-description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    max-width: 90%;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
}

.action-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1),
                background-color 0.15s ease,
                box-shadow 0.15s ease,
                color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    user-select: none;
}



.btn-primary {
    background: #1e40af;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    transform: translateX(-120%) skewX(-25deg);
    pointer-events: none;
    will-change: transform;
}

.btn-primary:hover::before {
    animation: shine-sweep 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shine-sweep {
    0% { transform: translateX(-120%) skewX(-25deg); }
    100% { transform: translateX(120%) skewX(-25deg); }
}

.btn-secondary {
    background: #1e1e1e;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: #262626;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: transparent;
}

.discover-games-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    padding: 1rem;
    display: flex;
}

.discover-games-video-modal.hidden {
    display: none !important;
}

.modal-content {
    width: 100%;
    max-width: 1100px;
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #222;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .game-grid {
        gap: 3.5rem;
    }
    .game-card {
        aspect-ratio: unset !important;
        height: auto !important;
        min-height: 480px;
    }
    .card-content {
        padding: 6rem 1.75rem 2.25rem;
        gap: 1.1rem;
        background: linear-gradient(to top, 
            rgba(0,0,0,0.95) 0%, 
            rgba(0,0,0,0.85) 40%, 
            rgba(0,0,0,0.4) 75%, 
            transparent 100%);
    }
    .card-title {
        font-size: clamp(1.8rem, 10vw, 2.4rem);
        line-height: 1.15;
    }
    .card-description {
        max-width: 100%;
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }
    .card-actions {
        gap: 0.85rem;
    }
    .action-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
        justify-content: center;
    }
    .hero {
        padding: 8rem 1.5rem 3rem;
    }
}

@media (max-width: 480px) {
    .game-card {
        min-height: 450px;
        border-radius: 20px;
    }
    .card-content {
        padding: 6rem 1.25rem 1.5rem;
    }
    .card-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.6rem;
    }
    .action-btn {
        width: auto;
        flex: 1;
        min-width: 0;
        padding: 0.85rem 0.5rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }
}