/* Spin 101 Casino Game Website 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 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated 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%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Floating particles animation */
.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 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Header Styles */
header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #ffd700;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: translateY(-2px);
}

/* Main Content */
main {
    margin-top: 80px;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    color: #fff;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-logo {
    flex-shrink: 0;
}

.hero-logo img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    filter: contrast(1.1) brightness(1.05) saturate(1.2) sharpness(1.1);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    backface-visibility: hidden;
    transform: translateZ(0);
    /* 优化图片加载 */
    loading: lazy;
    decoding: async;
}

.hero-logo img:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.5);
    filter: contrast(1.2) brightness(1.1) saturate(1.3) sharpness(1.2);
    border-color: rgba(255, 215, 0, 0.6);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    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); }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Login/Register Section */
.auth-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 3rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-section h2 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.auth-section p {
    color: #ffffff;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-section p[style] {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
    font-weight: 500 !important;
    opacity: 0.95 !important;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #fff;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section h2 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section p {
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 600;
    margin-top: 2rem;
    border-left: 4px solid #ffd700;
    padding-left: 1rem;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
}

/* Why Spin 101 Section Layout */
.why-spin-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin: 2rem 0;
}

.why-spin-text {
    flex: 2;
}

.why-spin-image {
    flex: 1;
    flex-shrink: 0;
}

.why-spin-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    filter: contrast(1.1) brightness(1.05) saturate(1.2);
    /* 优化图片加载 */
    loading: lazy;
    decoding: async;
    /* 响应式图片尺寸 */
    max-height: 300px;
    object-fit: cover;
}

.why-spin-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.5);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 2px solid #ffd700;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-logo img {
        width: 80px;
        height: 80px;
        padding: 8px;
        filter: contrast(1.2) brightness(1.1) saturate(1.3);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .auth-section {
        padding: 2rem 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        padding: 0.6rem 0.8rem;
    }
    
    .why-spin-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .why-spin-image {
        order: -1;
        text-align: center;
    }
    
    .why-spin-image img {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-logo img {
        width: 60px;
        height: 60px;
        padding: 6px;
        filter: contrast(1.2) brightness(1.1) saturate(1.3);
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .why-spin-image img {
        max-width: 250px;
    }
}

/* 图片加载优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 关键图片优先加载 */
.hero-logo img {
    loading: eager;
    decoding: async;
}

/* 非关键图片延迟加载 */
.why-spin-image img {
    loading: lazy;
    decoding: async;
}

/* 图片加载占位符 */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 图片加载完成后的过渡效果 */
img[data-loaded="true"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }
    
    .auth-section {
        background: #333;
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles {
        display: none;
    }
}
