/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-light: #ffffff;
    --text-dark: #333333;
    --text-muted: #888888;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(15, 52, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(22, 33, 62, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--highlight-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.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:hover {
    color: var(--highlight-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.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;
}

.btn-login {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--highlight-color);
}

.btn-login:hover {
    background: var(--highlight-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

.btn-register {
    background: var(--highlight-color);
    color: var(--text-light);
}

.btn-register:hover {
    background: #d63384;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 69, 96, 0.3);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

/* Casino Experience Section */
.casino-experience {
    padding: 60px 0;
    background: rgba(22, 33, 62, 0.2);
}

.experience-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.experience-text {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.experience-text:last-child {
    margin-bottom: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-primary {
    background: var(--highlight-color);
    color: var(--text-light);
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background: #d63384;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.6s both;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: rgba(22, 33, 62, 0.3);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.features-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.features-intro p {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.feature-card img {
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--highlight-color);
    margin-bottom: 1rem;
}

/* Login Section */
.login-section {
    padding: 80px 0;
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.login-info h3 {
    color: var(--highlight-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-benefits {
    list-style: none;
    margin: 1.5rem 0;
}

.login-benefits li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.login-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--highlight-color);
    font-weight: bold;
}

.btn-login-large {
    background: var(--highlight-color);
    color: var(--text-light);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-login-large:hover {
    background: #d63384;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.login-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Register Section */
.register-section {
    padding: 80px 0;
    background: rgba(22, 33, 62, 0.3);
}

.register-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.register-info h3 {
    color: var(--highlight-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.registration-steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.step-number {
    background: var(--highlight-color);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
}

.btn-register-large {
    background: var(--highlight-color);
    color: var(--text-light);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-register-large:hover {
    background: #d63384;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.register-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Games Preview */
.games-preview {
    padding: 80px 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card h3 {
    color: var(--highlight-color);
    padding: 1.5rem 1.5rem 0.5rem;
}

.game-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--primary-color);
    padding: 60px 0 20px;
    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,
.footer-section h4 {
    color: var(--highlight-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--highlight-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* 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) {
    .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;
        gap: 2rem;
    }
    
    .casino-experience {
        padding: 40px 0;
    }
    
    .experience-text {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .login-content,
    .register-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-buttons {
        display: none;
    }
}

@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 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--highlight-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-light: #ffffff;
        --text-dark: #000000;
        --highlight-color: #ffff00;
    }
}

/* 404 Error Page */
.error-404 {
    padding: 120px 0 80px;
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-image {
    margin-bottom: 2rem;
}

.error-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.error-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--highlight-color);
}

.error-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.error-suggestions {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-suggestions h3 {
    margin-bottom: 1rem;
    color: var(--highlight-color);
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
}

.error-suggestions li {
    margin-bottom: 0.5rem;
}

.error-suggestions a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.error-suggestions a:hover {
    color: var(--highlight-color);
}

/* Image optimization and lazy loading support */
img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    display: block;
}

img[data-src] {
    opacity: 0;
}

img[data-src].loaded {
    opacity: 1;
}

/* Logo image specific styling */
.nav-logo img {
    height: 50px;
    width: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

/* Hero image styling */
.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Feature card images */
.feature-card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover img {
    transform: scale(1.1);
    background: rgba(233, 69, 96, 0.2);
}

/* Login and Register interface images */
.login-image img,
.register-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-image img:hover,
.register-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Game card images */
.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.05);
}

/* Image loading states */
.image-placeholder {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 200px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* Lazy loading image states */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Image loading animation */
@keyframes imagePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

img:not(.loaded) {
    animation: imagePulse 2s ease-in-out infinite;
}

/* Responsive image adjustments */
@media (max-width: 768px) {
    .hero-image img {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .feature-card img {
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    
    .login-image img,
    .register-image img {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Print styles */
@media print {
    .header,
    .nav-buttons,
    .hero-buttons,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
