/* Yono 101 Casino Game Website - Main Stylesheet */

/* 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-gray: #cccccc;
    --gradient-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--gradient-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--gold-color);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--gold-color);
    color: var(--primary-color);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Header Styles */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.logo img {
    transition: var(--transition);
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px var(--gold-color);
}

.logo:hover img {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    transform: scale(1.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:hover {
    color: var(--gold-color);
}

.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%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--gold-color), #ffed4e);
    -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;
    color: var(--text-gray);
}

/* Login/Register Section */
.auth-section {
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.auth-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gold-color);
    font-size: 2rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--gold-color), #ffed4e);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 150px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    background: linear-gradient(45deg, #ffed4e, var(--gold-color));
}

.btn:active {
    transform: translateY(0);
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: rgba(15, 52, 96, 0.3);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--gold-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(26, 26, 46, 0.8);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--gold-color);
}

.feature-icon {
    font-size: 3rem;
    color: var(--gold-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--primary-color);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    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;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-gray);
    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, 215, 0, 0.2);
    color: var(--text-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .auth-section {
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .features {
        padding: 2rem 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
        --accent-color: #666666;
        --text-light: #ffffff;
        --text-gray: #cccccc;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .background-animation,
    .auth-section {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Additional Performance Optimizations */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Critical above-the-fold styles */
.hero {
    will-change: transform;
}

.btn {
    will-change: transform;
}

/* Optimize animations for performance */
.shape {
    will-change: transform, opacity;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .shape {
        animation: none;
    }
    
    .hero h1 {
        animation: none;
    }
}

/* Loading states */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Success and error messages */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.field-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* External link indicator */
.external-link-indicator {
    margin-left: 0.25rem;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Focus improvements for better accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--gold-color);
    outline-offset: 2px;
}

/* Improved mobile menu animations */
.nav-menu {
    transition: transform 0.3s ease-in-out;
}

.nav-menu.active {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .nav-menu {
        transform: translateX(-100%);
    }
}
