/**
 * Lottologia - Lightweight Utility CSS
 * Mobile-first responsive design
 */

/* Skip-to-content (accessibility) */
.skip-link { position: absolute; top: -100%; left: 0; background: var(--primary); color: #fff; padding: 0.5rem 1rem; z-index: 9999; font-size: 1rem; }
.skip-link:focus { top: 0; }
.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; }

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 1rem; -webkit-text-size-adjust: 100%; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.5; color: #1f2937; background: #f8fafc; min-height: 100vh; overflow-x: clip; }
h1, h2, h3, h4, .logo-text { font-family: 'Oswald', sans-serif; font-optical-sizing: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Colors */
:root {
    --primary: #0033cc;
    --primary-light: #4A90E2;
    --primary-dark: #002299;
    --accent: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-700: #374151;
    --gray-800: #1e293b;
    --white: #ffffff;
    --green: #16a34a;
    --red: #dc2626;
    --purple: #7c3aed;
    --cyan: #0891b2;
    --blue-accent: #1a56db;
    --green-accent: #0e7c3a;
    --gold: #e6c200;
    --light-blue: #bae6fd;
    --bar-blue-start: #3b82f6;
    --bar-blue-end: #1d4ed8;
    --bar-red-start: #ef4444;
    --bar-red-end: #b91c1c;
}

/* Layout */
.w-full { width: 100%; }
.max-w-screen { max-width: 100vw; }
.min-h-screen { min-height: 100vh; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

/* Typography */
.text-xs { font-size: 0.95rem; }
.text-sm { font-size: 0.95rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }

/* Colors */
.text-white { color: var(--white); }
.text-gray { color: var(--gray-600); }
.text-primary { color: var(--primary); }
.bg-white { background-color: var(--white); }
.bg-gray { background-color: var(--gray-100); }
.bg-primary { background-color: var(--primary); }
.bg-primary-dark { background-color: var(--primary-dark); }

/* Borders & Radius */
.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--gray-200); }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); }

/* Visibility & Opacity */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* Additional Colors */
.text-gray-300 { color: rgba(255,255,255,0.4); }

/* Transitions */
.transition { transition: all 0.2s ease; }

/* Header */
.header {
    background: var(--primary);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header .container > .flex {
    min-height: 52px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo img {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.logo-text span {
    color: var(--accent);
}

/* Navigation */
.nav-desktop {
    display: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.nav-desktop a {
    padding: 0.5rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}
.nav-desktop a:hover { background: rgba(255,255,255,0.1); }
.nav-desktop a.active { background: rgba(255,255,255,0.2); }

@media (min-width: 1280px) {
    .nav-desktop a {
        padding: 0.5rem 0.75rem;
    }
}

/* Mobile Menu */
.menu-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
}
.menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
}
.menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.mobile-menu.active { display: block; }
.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}
.mobile-menu a:hover { background: rgba(255,255,255,0.1); }
.mobile-menu a.active { background: rgba(255,255,255,0.2); }

/* Game Cards */
.game-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}
.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}
.game-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
}
.game-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}
.game-card .subtitle {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Tool Cards */
.tool-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}
.tool-card:hover {
    border-color: var(--primary-light);
    background: var(--gray-50);
}
.tool-card .icon {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.tool-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}
.tool-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
}

/* Sections */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Hero with accent color */
.hero-gradient {
    background: var(--accent);
    color: var(--primary);
}

/* Slider */
.slider {
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.slide-content {
    max-width: 800px;
}

.slide h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.slide p {
    font-size: 1rem;
    opacity: 0.9;
}

.slider-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s;
}

.slider-dot.active {
    background: var(--white);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.slider-nav:hover {
    background: rgba(255,255,255,0.3);
}

.slider-nav.prev { left: 1rem; }
.slider-nav.next { right: 1rem; }

@media (min-width: 768px) {
    .slide {
        padding: 3rem 2rem;
    }
    .slide h2 {
        font-size: 2rem;
    }
}

/* Footer */
.footer {
    background: #333;
    color: #ccc;
    margin-top: auto;
    font-size: 0.95rem;
}
.footer a { color: #ccc; transition: color 0.2s; }
.footer a:hover { color: var(--white); }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.footer-col h3 {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer-col p {
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 0.375rem;
}
.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: #999;
}
.footer-bottom a {
    color: var(--accent);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 0.7fr 1.8fr;
    }
}

/* Main Layout */
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Responsive */
@media (min-width: 640px) {
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:text-left { text-align: left; }
    .container { padding: 0 2rem; }
}

/* Navigation breakpoint - show desktop nav only on larger screens */
@media (min-width: 1100px) {
    .nav-desktop { display: flex; }
    .menu-btn { display: none; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
    .lg\:flex-row { flex-direction: row; }
}

/* Mobile: reduce lateral margins on narrow screens */
@media (max-width: 768px) {
    .container { padding: 0 0.5rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 0.25rem; }
}
