/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-light: #cbd5e1;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #2a2a2a;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* New Dynamic Background - Geometric Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, #0a0a0a 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0a0a0a 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 200% 200%;
    animation: backgroundShift 25s ease-in-out infinite;
    z-index: -1;
}

/* Animated Geometric Shapes */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(99, 102, 241, 0.05) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(16, 185, 129, 0.05) 50%, transparent 52%),
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.02) 0%, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.02) 0%, transparent 1px);
    background-size: 60px 60px, 80px 80px, 120px 120px, 100px 100px;
    animation: patternMove 40s linear infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { 
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; 
    }
    25% { 
        background-position: 100% 100%, 0% 0%, 0% 0%, 100% 100%; 
    }
    50% { 
        background-position: 100% 100%, 100% 100%, 0% 0%, 0% 0%; 
    }
    75% { 
        background-position: 0% 0%, 100% 100%, 100% 100%, 100% 100%; 
    }
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: floatElement 8s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    animation-delay: 0s;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    filter: blur(0.5px);
}

.floating-element:nth-child(2) {
    top: 20%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    border-radius: 20px;
    animation-delay: 2s;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
    filter: blur(0.3px);
}

.floating-element:nth-child(3) {
    bottom: 30%;
    left: 20%;
    width: 120px;
    height: 60px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    border-radius: 30px;
    animation-delay: 4s;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.3);
    filter: blur(0.4px);
}

.floating-element:nth-child(4) {
    bottom: 20%;
    right: 25%;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    animation-delay: 6s;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    filter: blur(0.2px);
}

@keyframes floatElement {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        opacity: 0.1;
    }
    25% { 
        transform: translateY(-30px) rotate(90deg) scale(1.1); 
        opacity: 0.2;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg) scale(0.9); 
        opacity: 0.15;
    }
    75% { 
        transform: translateY(-40px) rotate(270deg) scale(1.05); 
        opacity: 0.25;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-auth {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-login:hover {
    background: white;
    color: var(--bg-primary);
}

.btn-register {
    background: var(--primary-color);
    color: white;
}

.btn-register:hover {
    background: var(--primary-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition);
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-top: 100px;
    padding: 1rem 0;
    background: rgba(30, 41, 59, 0.8);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--text-light);
}

/* Main Content */
.main-content {
    margin-top: 2rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #e2e8f0;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    animation: fadeInRight 1s ease-out 0.6s both;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.5); }
    100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.8); }
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(10px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    background: rgba(42, 42, 42, 0.9);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: #e2e8f0;
    line-height: 1.6;
}

/* How to Play Section */
.how-to-play-section {
    padding: 5rem 0;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    color: white;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.step-content p {
    color: #e2e8f0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Categories Section */
.categories-section {
    padding: 5rem 0;
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(10px);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
    transition: var(--transition);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
    border-color: var(--secondary-color);
    background: rgba(42, 42, 42, 0.9);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.category-card p {
    color: #e2e8f0;
    line-height: 1.6;
}

/* Community Section */
.community-section {
    padding: 5rem 0;
}

.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.community-text p {
    font-size: 1.25rem;
    color: #e2e8f0;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #e2e8f0;
    font-size: 0.9rem;
}

.community-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: #e2e8f0;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #e2e8f0;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-block;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .community-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .features-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --text-primary: #000000;
        --bg-primary: #ffffff;
        --bg-secondary: #f0f0f0;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
