/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --gold-color: #ffd700;
    --text-light: #ffffff;
    --text-dark: #333333;
    --gradient-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-accent: linear-gradient(135deg, #0f3460 0%, #533483 100%);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--gradient-primary);
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15, 52, 96, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(83, 52, 131, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Animated Background Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-color);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.nav-logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.nav-logo img:hover {
    transform: scale(1.05);
}

/* Fallback for missing logo */
.nav-logo img:not([src]), 
.nav-logo img[src=""],
.nav-logo img[src*="error"] {
    display: none;
}

.nav-logo::before {
    content: '🎰 Citta Games';
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold-color);
    line-height: 60px;
    z-index: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--gold-color);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-right: -60px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 1rem;
}

.btn-login {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--gold-color);
}

.btn-login:hover {
    background: var(--gold-color);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-register {
    background: var(--gold-color);
    color: var(--text-dark);
}

.btn-register:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--gold-color);
    color: var(--text-dark);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* Main Content */
.main-content {
    margin-top: 100px;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.8) 0%, rgba(26, 74, 138, 0.8) 50%, rgba(15, 52, 96, 0.8) 100%);
}

.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: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--text-light), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)); }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #cccccc;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-top: -2rem;
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Fallback styles for missing images */
.hero-image img:not([src]), 
.hero-image img[src=""],
.hero-image img[src*="error"] {
    display: none;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--gold-color);
    text-align: center;
    font-weight: bold;
    z-index: 1;
    margin-top: -2rem;
}

/* Section Styles */
.about-section,
.games-section,
.features-section,
.cta-section {
    padding: 4rem 0;
}

.about-section {
    background: rgba(15, 52, 96, 0.3);
    backdrop-filter: blur(10px);
}

.games-section {
    background: rgba(26, 26, 46, 0.5);
}

.features-section {
    background: rgba(83, 52, 131, 0.2);
}

.cta-section {
    background: var(--gradient-accent);
    text-align: center;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--gold-color);
}

section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #cccccc;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--gold-color);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    margin-top: -1rem;
}

/* Fallback for missing game images */
.game-card img:not([src]), 
.game-card img[src=""],
.game-card img[src*="error"] {
    display: none;
}

.game-card h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* CTA Section */
.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--primary-color);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--gold-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 46, 0.95);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .games-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 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 */
.btn:focus,
.nav-link:focus {
    outline: 3px solid var(--gold-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-light: #ffffff;
        --text-dark: #000000;
        --gold-color: #ffff00;
    }
}

/* Page-specific styles */
.page-header {
    text-align: center;
    padding: 3rem 0;
    background: rgba(15, 52, 96, 0.3);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--gold-color);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section h2 {
    color: var(--gold-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Contact page styles */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-methods {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-method {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-color);
    background: rgba(255, 255, 255, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: var(--gold-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* FAQ styles */
.faq-section {
    margin: 3rem 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Support channels */
.support-channels {
    margin: 3rem 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-channel {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.support-channel h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
}

/* 404 page styles */
.error-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 3rem 0;
}

.error-number {
    font-size: 8rem;
    font-weight: 900;
    color: var(--gold-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-content h1 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.error-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Fallback for missing 404 image */
.error-image img:not([src]), 
.error-image img[src=""],
.error-image img[src*="error"] {
    display: none;
}

.error-image::before {
    content: '❌';
    display: block;
    font-size: 8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gold-color);
    z-index: 1;
}

.helpful-links {
    margin: 3rem 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.link-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.link-card h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
}

.search-section {
    margin: 3rem 0;
    text-align: center;
}

.search-box {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold-color);
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .error-page {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .error-number {
        font-size: 6rem;
    }
    
    .error-actions {
        justify-content: center;
    }
    
    .search-box {
        flex-direction: column;
        align-items: center;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
