
/* =========================================
   1. CSS Reset & Base Variables
   ========================================= */
:root {
    /* Color Palette - Dark Theme (Cyberpunk/Betting Style) */
    --color-bg-body: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-header: rgba(15, 23, 42, 0.9);
    
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-secondary: #8b5cf6;
    --color-accent: #f472b6;
    
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-border: #334155;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing & Sizes */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 0.25rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. Layout Utilities
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   3. Header Styling
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-bg-header);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo Placeholder styling since img is missing */
.logo {
    display: block;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-left: 2rem;
}

.logo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
}

.logo::after {
    content: '1WIN'; /* Fallback text */
}

/* Navigation */
.header__nav {
    margin-left: auto;
    margin-right: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav__item a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav__item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav__item a:hover {
    color: var(--color-text-main);
}

.nav__item a:hover::after {
    width: 100%;
}

/* Mobile Menu Trigger (Hidden on Desktop) */
.header__menu {
    display: none;
    font-size: 1.8rem;
    color: var(--color-text-main);
    cursor: pointer;
}

/* Header Register Button */
.header__register {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transform: translateY(0);
}

.header__register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* =========================================
   4. Hero / Welcome Section
   ========================================= */
main {
    flex: 1;
    padding-top: var(--header-height); /* Offset fixed header */
}

.welcome {
    position: relative;
    padding: 4rem 0;
    background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.15), transparent 60%);
    overflow: hidden;
}

.welcome__container {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.welcome__heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome__description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.welcome__action {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Decorative Element for empty Right side */
.welcome__right {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome__right::before {
    content: '';
    width: 60%;
    height: 60%;
    background: conic-gradient(from 180deg at 50% 50%, var(--color-secondary) 0deg, var(--color-primary) 180deg, var(--color-secondary) 360deg);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: rotateHue 10s linear infinite;
}

@keyframes rotateHue {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   5. Buttons Styling
   ========================================= */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8em 2em;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--color-primary);
    color: white;
    border: 1px solid transparent;
}

/* Default Button (Filled) */
.button:not(.button_theme_transparent) {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.button:not(.button_theme_transparent):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

/* Transparent Button */
.button_theme_transparent {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.button_theme_transparent:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-text-main);
    border-color: var(--color-text-main);
    transform: translateY(-2px);
}

/* =========================================
   6. Content / Markdown Styling
   ========================================= */
.markdown {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.markdown h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
    position: relative;
    padding-bottom: 1rem;
}

.markdown h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.markdown h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.markdown p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    text-align: justify;
}

.markdown ul, .markdown ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--color-text-muted);
}

.markdown ul li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.markdown ul li::before {
    content: '•';
    color: var(--color-primary);
    font-weight: bold;
    position: absolute;
    left: -1rem;
    font-size: 1.2em;
}

.markdown ol {
    list-style-type: decimal;
    padding-left: 2rem;
}

.markdown ol li {
    margin-bottom: 0.5rem;
}

/* Links inside text */
.markdown a:not(.button) {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-primary);
}

.markdown a:not(.button):hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Paragraph with buttons spacing */
.markdown p:has(.button) {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* =========================================
   7. Form Elements (Generic Support)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    outline: none;
    transition: var(--transition-fast);
}

input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* =========================================
   8. Footer Styling
   ========================================= */
.footer {
    background-color: #020617;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* =========================================
   9. Mobile Responsiveness (Max width 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header__menu {
        display: block; /* Show hamburger */
    }

    .header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-card);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    /* State for JS toggle */
    .header__nav.header__nav_active {
        max-height: 300px;
        padding-bottom: 1rem;
    }

    .nav {
        flex-direction: column;
        gap: 0;
    }

    .nav__item a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 1.1rem;
    }

    .nav__item a::after {
        display: none; /* Remove underline animation on mobile */
    }

    .header__register {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Hero Adjustments */
    .welcome__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .welcome__action {
        justify-content: center;
    }

    .welcome__right {
        display: none; /* Hide decorative element on mobile to save space */
    }

    /* Markdown Adjustments */
    .markdown p:has(.button) {
        justify-content: center;
    }
    
    .button {
        width: 100%; /* Full width buttons on mobile */
    }
}

/* =========================================
   10. Micro-animations & Print Styles
   ========================================= */
@media (prefers-reduced-motion: no-preference) {
    .markdown > * {
        animation: fadeIn 0.6s ease-out forwards;
        opacity: 0;
    }
    
    .markdown > *:nth-child(1) { animation-delay: 0.1s; }
    .markdown > *:nth-child(2) { animation-delay: 0.2s; }
    .markdown > *:nth-child(3) { animation-delay: 0.3s; }
    /* Delay cascading for other elements handled generally */
    .markdown > *:nth-child(n+4) { animation-delay: 0.4s; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
