/* 
   Cosmic Arcade Theme v2.0 
   ------------------------
   Style System for FunRetroGames
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Palette */
    --bg-deep: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --primary-neon: #6366f1;
    /* Indigo */
    --secondary-neon: #ec4899;
    /* Pink */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    /* Shadows & Glows */
    --neon-glow: 0 0 15px rgba(99, 102, 241, 0.5);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    /* Animation */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-darker) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header --- */
header.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 1.5rem 1.5rem;
    /* Balanced spacing */
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;

    /* Gradient Text */
    background: linear-gradient(to right, #fff, var(--primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo i {
    font-size: 1.25rem;
    color: var(--primary-neon);
    /* Fallback */
    -webkit-text-fill-color: var(--primary-neon);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 2rem;
    background: rgba(30, 41, 59, 0.4);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* --- Language Switcher --- */
.lang-switch {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    overflow: hidden;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s var(--ease-smooth);
}

.lang-btn.active {
    background: var(--primary-neon);
    color: white;
}

.lang-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* --- Game Grid --- */
.games-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title h2 span {
    color: var(--secondary-neon);
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* --- Game Card --- */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--neon-glow);
    border-color: var(--primary-neon);
}

/* Media Area (Video/Image) */
.card-media {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #000;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.card-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    /* Let clicks pass through */
}

.game-card:hover .card-media video {
    opacity: 1;
}

/* Content Area */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-transform: uppercase;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn-play,
.play-btn {
    display: inline-flex;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    cursor: pointer;
}

.btn-play:hover,
.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

/* Stars */
.rating {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    /* Amber */
    font-size: 0.9rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Contact Form Styles --- */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.cosmic-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cosmic-input:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

/* --- Scroll to Top Button --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-neon);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s var(--ease-smooth);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    background: var(--secondary-neon);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}