@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700;900&family=Space+Grotesk:wght@400;700&display=swap');

:root {
    --bg-dark: #050505;
    --card-bg: rgba(20, 20, 25, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-cyan: #0ff;
    --accent-magenta: #f0f;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.05), transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.05), transparent 30%);
    z-index: -1;
    animation: rotateBg 30s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

header {
    text-align: center;
    margin: 6rem 0 4rem;
    padding: 0 1rem;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glitch-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-title::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-magenta);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 86px, 0); }
    20% { clip: rect(35px, 9999px, 12px, 0); }
    40% { clip: rect(89px, 9999px, 98px, 0); }
    60% { clip: rect(4px, 9999px, 54px, 0); }
    80% { clip: rect(66px, 9999px, 20px, 0); }
    100% { clip: rect(23px, 9999px, 88px, 0); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

main {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    flex-grow: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.game-card:nth-child(1) { animation-delay: 0.2s; }
.game-card:nth-child(2) { animation-delay: 0.4s; }

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 255, 255, 0.1);
}

.game-card.beta {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.game-card.beta::before {
    content: 'BETA';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--accent-magenta);
    color: #fff;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.game-card.beta:hover {
    box-shadow: 0 30px 60px rgba(255, 0, 255, 0.1);
}

.icon-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 32px;
    margin-bottom: 2rem;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.0));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 20px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.game-card:hover .icon-wrapper {
    transform: translateY(-5px);
}

.game-icon {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.game-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.game-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    flex-grow: 1;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9rem;
}

.btn-primary {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-accent {
    background: linear-gradient(90deg, var(--accent-magenta), var(--accent-cyan));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 0.5rem;
}

footer {
    padding: 3rem 0;
    width: 100%;
    text-align: center;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-content a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: var(--accent-magenta);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .glitch-title {
        font-size: 2.8rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .game-card {
        padding: 2.5rem 1.5rem;
    }
}

/* Text Content Pages */
.text-page-main {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.text-page-main h1 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.text-page-main h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-magenta);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.text-page-main p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.text-page-main ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}

.back-link {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: bold;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}
