@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --secondary-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --bg-dark: #09090b; /* Zinc 950 */
    --bg-darker: #000000;
    --bg-card: rgba(24, 24, 27, 0.6); /* Zinc 900 with transparency */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa; /* Zinc 400 */
    --text-muted: #71717a; /* Zinc 500 */
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Beautiful Animated Background Meshes */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at center, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: bgFloat 25s ease-in-out infinite alternate;
}

@keyframes bgFloat {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(10deg) scale(1.1); }
}

/* Premium Header */
header {
    background: rgba(9, 9, 11, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

header .logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.3));
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Main Layout */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #ffffff 20%, var(--secondary-purple) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    filter: drop-shadow(0 4px 20px rgba(168, 85, 247, 0.2));
}

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

/* Top Game Container (Main Embed) */
.game-container {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow), var(--shadow-glow);
    padding: 1.25rem;
    margin-bottom: 5rem;
    position: relative;
    overflow: visible;
}

.game-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    -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;
}

.game-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Controls Info Array */
.controls-section {
    margin-top: 2.5rem;
    text-align: center;
}

.controls-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.controls-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.controls-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.control-item:hover {
    transform: translateY(-5px);
}

.control-key {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(145deg, rgba(39, 39, 42, 0.8), rgba(24, 24, 27, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.control-item:hover .control-key {
    background: var(--primary-blue);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

.control-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Content Boxes / Details */
.section {
    margin-bottom: 6rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    padding: 3.5rem;
    position: relative;
    line-height: 1.8;
}

/* Typography inside Content Card */
.content-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: #ffffff;
}

.content-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #f8fafc;
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.content-card ul {
    list-style-type: none;
    margin-bottom: 2rem;
}

.content-card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.content-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-size: 1.5rem;
    line-height: 1;
    top: -0.1rem;
}

/* Beautiful Game Cards Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: rgba(24, 24, 27, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(59, 130, 246, 0.3);
    background: rgba(24, 24, 27, 0.7);
}

.game-card .game-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #000;
}

.game-card .game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.game-card:hover .game-image {
    transform: scale(1.08);
    filter: brightness(1);
}

.game-card .play-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.7), rgba(168, 85, 247, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.game-card:hover .play-overlay {
    opacity: 1;
}

.game-card .play-button {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-card:hover .play-button {
    transform: scale(1);
    opacity: 1;
}

.game-card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.game-card .card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.game-card .tags {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 2;
}

.game-card .tag {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: capitalize;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Call to Action Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.4);
}

.cta-button:hover::after {
    left: 100%;
}

/* Footer Enhancements */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.footer-section ul li a:hover {
    color: #ffffff;
    padding-left: 0.25rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 2.75rem;
    height: 2.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Loading/Animations */
.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

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

.loading-animation {
    width: 3.5rem;
    height: 3.5rem;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsiveness */
@media (max-width: 900px) {
    .section-title { font-size: 2.25rem; }
    .content-card { padding: 2.5rem; }
}

@media (max-width: 768px) {
    header nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-title { font-size: 2.5rem; }
    
    main { padding: 1.5rem 1rem; }
    
    .game-container { padding: 1rem; }
    .content-card { padding: 2rem 1.5rem; }
    
    .controls-grid { gap: 1rem; }
    
    .control-key {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
    
    .footer-grid { text-align: center; }
    .social-links { justify-content: center; }
    .footer-section ul li a:hover { padding-left: 0; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
}
