@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --accent: #f43f5e;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* Header */
header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.btn-nav {
    padding: 0.7rem 1.8rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-signup {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--primary-glow);
}

/* Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 32px;
    width: 100%;
    max-width: 450px;
    position: relative;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .auth-modal {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
    padding-bottom: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
}

.auth-tab.active {
    color: var(--text-main);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.auth-submit {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-submit:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}


/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 5%;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out;
}

.hero h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.p2p-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: inline-block;
}

/* How to Play Section */
.how-to-play {
    padding: 6rem 5%;
    background: rgba(30, 41, 59, 0.3);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(12px);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step-card p {
    color: var(--text-muted);
}

/* Games Section */
.games {
    padding: 6rem 5%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: var(--card-bg);
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

.game-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.game-info {
    padding: 2rem;
}

.game-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.game-tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.game-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: background 0.3s ease;
}

.game-card:hover .game-btn {
    background: var(--secondary);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    header {
        padding: 1.5rem 5%;
    }

    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .btn-nav {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 6rem 5% 4rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .step-card {
        padding: 1.5rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-modal {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
        border-radius: 24px;
    }

    .auth-tabs {
        margin-bottom: 1.5rem;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-nav {
        padding: 0.5rem 0.8rem;
    }

    .p2p-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}