/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    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%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, -10px) scale(1.05); }
    50% { transform: translate(10px, -5px) scale(1.02); }
    75% { transform: translate(-5px, 10px) scale(1.03); }
}

/* Floating Particles */
.background-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 4s linear infinite;
}

@keyframes sparkle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    background: rgba(0, 0, 0, 0.8);
    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 h1 {
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.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 {
    color: #ffd700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    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-login {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-register {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-secondary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-login-large {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    width: 100%;
    margin-top: 1rem;
}

.btn-register-large {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    width: 100%;
    margin-top: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding-top: 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.3); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 3rem;
}

/* Bonus Section */
.bonus-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.4);
    margin-bottom: 3rem;
    text-align: center;
}

.bonus-content h3 {
    color: #ffd700;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-image {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    object-fit: cover;
    /* Image optimization */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Immediate display */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.feature-image.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

/* Shimmer animation for loading effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.feature-card h4 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #fff;
    opacity: 0.9;
}

/* Login Register Section */
.login-register-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.auth-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-card h4 {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.auth-card p {
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0.9;
}

.login-steps, .register-steps {
    color: #fff;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.login-steps li, .register-steps li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Games Section */
.games-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 3rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    /* Image optimization */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Immediate display */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.game-image.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

.game-card h4 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.game-card p {
    color: #fff;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.cta-section p {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 3rem 0 1rem;
    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 h4 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #fff;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #fff;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-card, .game-card, .auth-card {
        padding: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .background-animation,
    .background-animation::before,
    .btn::before,
    .hero-title,
    .feature-card,
    .game-card,
    .auth-card {
        animation: none;
        transition: none;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.footer-section ul li a:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .game-card,
    .auth-card {
        border: 2px solid #fff;
    }
}

/* Page Header Styles */
.page-header {
    text-align: center;
    padding: 4rem 0 2rem;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.page-title {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.8;
}

/* Content Section Styles */
.content-section {
    padding: 2rem 0 4rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-wrapper h2 {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-wrapper h2:first-child {
    margin-top: 0;
}

.content-wrapper h3 {
    color: #ffd700;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.content-wrapper p {
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-wrapper ul {
    color: #fff;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-wrapper ul li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.content-wrapper a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-wrapper a:hover {
    color: #ffed4e;
}

.policy-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.policy-footer p {
    color: #fff;
    font-style: italic;
}

/* Contact Page Styles */
.contact-section {
    padding: 2rem 0 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h2,
.contact-form h2 {
    color: #ffd700;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #fff;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-method h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.contact-method p {
    color: #fff;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.contact-method ul {
    list-style: none;
    padding: 0;
}

.contact-method ul li {
    color: #fff;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.checkbox-label {
    display: flex;
    align-items: center;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.checkbox-label a {
    color: #ffd700;
    text-decoration: none;
}

.checkbox-label a:hover {
    color: #ffed4e;
}

/* FAQ Section Styles */
.faq-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
}

.faq-item h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.faq-item p {
    color: #fff;
    opacity: 0.9;
    line-height: 1.6;
}

/* Support Section Styles */
.support-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 3rem;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.support-card:hover {
    transform: translateY(-10px);
}

.support-card h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.support-card p {
    color: #fff;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Error Page Styles */
.error-section {
    padding: 4rem 0;
    text-align: center;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-number {
    font-size: 8rem;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.error-title {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.error-subtitle {
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.error-suggestions {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.error-suggestions h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
}

.error-suggestions ul li {
    margin-bottom: 0.5rem;
}

.error-suggestions ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.error-suggestions ul li a:hover {
    color: #ffd700;
}

.error-help {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-help h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.error-help p {
    color: #fff;
    opacity: 0.9;
}

.error-help a {
    color: #ffd700;
    text-decoration: none;
}

.error-help a:hover {
    color: #ffed4e;
}

/* Responsive Design for New Pages */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .error-number {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .content-wrapper {
        padding: 2rem;
    }
}
