/**
 * TITLED GAMES WEBSITE STYLESHEET
 * 
 * This stylesheet provides a modern, dynamic design for the Titled Games website.
 * It includes:
 * - Responsive layouts for all screen sizes
 * - Smooth animations and transitions
 * - Custom color scheme with gradients
 * - Accessibility features
 * 
 * Structure:
 * 1. CSS Variables (for easy theming)
 * 2. Reset and Base Styles
 * 3. Navigation
 * 4. Hero Section
 * 5. About Section
 * 6. Games Section
 * 7. Team Section
 * 8. Contact Section
 * 9. Footer
 * 10. Utilities and Animations
 * 11. Responsive Design (Media Queries)
 */

/* ============================================
   1. CSS VARIABLES
   Colors, spacing, and other design tokens
   ============================================ */
:root {
    /* Primary Colors */
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #00D9FF;
    
    /* Neutral Colors */
    --dark-bg: #0F0F1E;
    --dark-secondary: #1A1A2E;
    --dark-accent: #16213E;
    --light-text: #FFFFFF;
    --gray-text: #B0B0C3;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --gradient-dark: linear-gradient(180deg, #0F0F1E 0%, #1A1A2E 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Transitions */
    --transition-speed: 0.3s;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* ============================================
   2. RESET AND BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container for consistent width across sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Section spacing */
section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

/* ============================================
   3. NAVIGATION
   Fixed navigation bar with smooth transitions
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(108, 99, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed) ease;
}

.nav-link:hover {
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
}

/* Hamburger menu for mobile */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

/* ============================================
   4. HERO SECTION
   Main landing area with animated particles
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-dark);
    overflow: hidden;
}

/* Animated particles background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-md);
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: var(--spacing-sm);
    position: relative;
}

/* Glitch effect for title */
.glitch {
    position: relative;
    color: var(--light-text);
    animation: glitch-subtle 5s infinite;
}

@keyframes glitch-subtle {
    0%, 96%, 100% {
        text-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
    }
    97% {
        text-shadow: 
            -2px 0 rgba(255, 101, 132, 0.7),
            2px 0 rgba(0, 217, 255, 0.7);
    }
}

.tagline {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--gray-text);
    margin-bottom: var(--spacing-lg);
}

/* Call-to-action buttons */
.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-text);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--light-text);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* ============================================
   5. ABOUT SECTION
   Company information and values
   ============================================ */
.about {
    background: var(--dark-secondary);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.about-text p {
    color: var(--gray-text);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.value-item {
    background: var(--dark-accent);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.value-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.value-item h3 {
    color: var(--light-text);
    margin-bottom: var(--spacing-xs);
}

.value-item p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ============================================
   6. GAMES SECTION
   Showcase of games with WIP status
   ============================================ */
.games {
    background: var(--dark-bg);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.game-card {
    background: var(--dark-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    border: 2px solid var(--dark-accent);
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.4);
}

.game-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.game-icon {
    font-size: 4rem;
    opacity: 0.8;
}

.game-info {
    padding: var(--spacing-md);
}

.game-info h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--light-text);
}

.game-info p {
    color: var(--gray-text);
    margin-bottom: var(--spacing-sm);
}

.status-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--primary-color);
}

/* WIP Notice */
.wip-notice {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 101, 132, 0.1);
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
}

.wip-notice p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.wip-notice a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.wip-notice a:hover {
    color: var(--accent-color);
}

/* ============================================
   7. TEAM SECTION
   Join the team information
   ============================================ */
.team {
    background: var(--dark-secondary);
}

.team-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.team-content .lead {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-lg);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.team-item {
    background: var(--dark-accent);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.team-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 101, 132, 0.3);
}

.team-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.team-item h3 {
    color: var(--light-text);
    margin-bottom: var(--spacing-xs);
}

.team-item p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ============================================
   8. CONTACT SECTION
   Social links and contact info
   ============================================ */
.contact {
    background: var(--dark-bg);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-content .lead {
    font-size: 1.25rem;
    color: var(--gray-text);
    margin-bottom: var(--spacing-lg);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--dark-secondary);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.5);
}

.social-link span {
    font-weight: 600;
}

/* ============================================
   9. FOOTER
   Site footer with links
   ============================================ */
.footer {
    background: var(--dark-secondary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 2px solid var(--dark-accent);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: var(--gray-text);
    margin-top: var(--spacing-xs);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gray-text);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--dark-accent);
    color: var(--gray-text);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
}

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

/* ============================================
   10. UTILITIES AND ANIMATIONS
   ============================================ */

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
}

/* Particle animation */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.5);
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Fade in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   11. SEASONAL DECORATIONS
   Themed decorations for holidays
   ============================================ */

/* Base styles for all seasonal decorations */
.seasonal-decoration {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    user-select: none;
    z-index: 10;
}

/* Container needs relative positioning for seasonal decorations */
.has-seasonal-decoration {
    position: relative;
}

/* ========== HALLOWEEN THEME ========== */

/* Orange accent overlay for Halloween */
.halloween-theme {
    --accent-halloween: #FF6B1A;
}

.halloween-theme .primary-color {
    filter: hue-rotate(20deg);
}

/* Pumpkin decorations in hero section */
.halloween-pumpkin {
    font-size: 4rem;
    animation: bob 3s ease-in-out infinite;
}

.halloween-left {
    left: 5%;
    bottom: 10%;
}

.halloween-right {
    right: 5%;
    bottom: 10%;
}

@keyframes bob {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Flying bats */
.halloween-bat {
    font-size: 1.5rem;
    animation: fly-bat 20s linear infinite;
    opacity: 0.8;
}

@keyframes fly-bat {
    0% {
        transform: translate3d(0, 110vh, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate3d(200px, -100px, 0) rotate(360deg);
        opacity: 0;
    }
}

/* Floating ghost in navbar */
.halloween-ghost {
    font-size: 1.5rem;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    animation: ghost-float 4s ease-in-out infinite;
}

@keyframes ghost-float {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-60%) translateX(10px);
        opacity: 1;
    }
}

/* ========== CHRISTMAS THEME ========== */

/* Festive color accents */
.christmas-theme {
    --accent-christmas-red: #C41E3A;
    --accent-christmas-green: #165B33;
}

/* Add subtle festive glow to primary elements */
.christmas-theme .btn-primary {
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.christmas-theme .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

/* Christmas trees in hero section */
.christmas-tree {
    font-size: 4rem;
    animation: tree-sway 4s ease-in-out infinite;
}

.christmas-left {
    left: 5%;
    bottom: 10%;
}

.christmas-right {
    right: 5%;
    bottom: 10%;
}

@keyframes tree-sway {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

/* Falling snowflakes */
.christmas-snowflake {
    font-size: 1.5rem;
    animation: snowfall 15s linear infinite;
    opacity: 0.9;
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, -100px, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translate3d(0, 100vh, 0) rotate(360deg);
        opacity: 0;
    }
}

/* Santa hat on logo */
.christmas-santa {
    font-size: 1.2rem;
    position: absolute;
    top: -10px;
    right: -15px;
    animation: santa-bounce 2s ease-in-out infinite;
}

@keyframes santa-bounce {
    0%, 100% {
        transform: translateY(0) rotate(-15deg);
    }
    50% {
        transform: translateY(-5px) rotate(-20deg);
    }
}

/* Present decoration */
.christmas-present {
    font-size: 2rem;
    margin-left: 10px;
    display: inline-block;
    animation: present-wiggle 3s ease-in-out infinite;
}

@keyframes present-wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* ============================================
   12. RESPONSIVE DESIGN
   Media queries for different screen sizes
   ============================================ */

/* Tablet and below */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 15, 30, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: var(--spacing-md);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero */
    .hero {
        min-height: 90vh;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Games grid */
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .values,
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Adjust seasonal decorations for mobile */
    .halloween-pumpkin,
    .christmas-tree {
        font-size: 2.5rem;
    }
    
    .halloween-left,
    .christmas-left {
        left: 2%;
    }
    
    .halloween-right,
    .christmas-right {
        right: 2%;
    }
    
    .halloween-ghost {
        display: none; /* Hide on mobile to avoid clutter */
    }
    
    .christmas-santa {
        font-size: 1rem;
        top: -5px;
        right: -10px;
    }
}

/* Smooth scrolling for all browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--light-text);
    }
    
    .btn-secondary {
        border-width: 3px;
    }
}
