/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 50%, #2d2d5f 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, -10px) scale(1.1); }
    50% { transform: translate(10px, -5px) scale(0.9); }
    75% { transform: translate(-5px, 10px) scale(1.05); }
}

/* Floating Particles Effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1s; }
.particle:nth-child(9) { left: 90%; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 1; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #64b5f6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #64b5f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-auth {
    display: flex;
    gap: 1rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #64b5f6, #1976d2);
    color: white;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 181, 246, 0.6);
}

.btn-secondary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-login {
    background: linear-gradient(45deg, #4caf50, #2e7d32);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-register {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #64b5f6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(-20px);
}

/* Section Styles */
.login-section,
.register-section,
.games-section,
.features-section {
    padding: 4rem 0;
    color: white;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #64b5f6, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Steps */
.login-steps,
.register-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.step {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #64b5f6, #1976d2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    color: white;
}

.step h3 {
    margin-bottom: 1rem;
    color: #64b5f6;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.game-category {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.game-category:hover {
    transform: translateY(-5px);
}

.game-category img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.game-category h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    color: #ffffff;
}

.content-section h2 {
    color: #64b5f6;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.content-section h3 {
    color: #64b5f6;
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #ffffff;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* Contact Content */
.contact-content {
    color: white;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-method {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.support-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.support-area {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.faq-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-item h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

/* Error Page */
.error-content {
    text-align: center;
    color: white;
    padding: 4rem 0;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
}

.error-message {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.suggestion {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

.suggestion p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.page-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.page-links a {
    color: #64b5f6;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #64b5f6;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.page-links a:hover {
    background: #64b5f6;
    color: white;
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #64b5f6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #64b5f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 35, 0.95);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-menu.active {
        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;
    }
    
    .login-steps,
    .register-steps,
    .games-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods,
    .support-areas {
        grid-template-columns: 1fr;
    }
    
    .suggestion-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Ensure all text is white and highly visible */
p, span, div, li, td, th {
    color: #ffffff !important;
}

/* Ensure form elements have visible text */
input, textarea, select {
    color: #ffffff !important;
}

/* Ensure any remaining dark text is visible */
* {
    color: #ffffff;
}

/* Override any inherited dark colors */
body *, html * {
    color: #ffffff;
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
a:focus {
    outline: 2px solid #64b5f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    /* Ensure print text is readable */
    p, span, div, li, td, th {
        color: black !important;
    }
}
