* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #f8fafc;
    --bg-card: #fff;
    --bg-panel: #f1f5f9;
    --border: #e5e7eb;
    --text: #111827;
    --text-dim: #6b7280;
    --text-muted: #9ca3af;
    --accent: #16a34a;
    --accent-hover: #15803d;
    --gold: #f59e0b;
    --blue: #3b82f6;
}
body { font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); }
a { text-decoration: none; color: inherit; }

/* Game area container - centers game content */
.game-area { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.04); }

/* Game animations */
@keyframes foodPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes tileAppear { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideUp { from { transform: translateX(-50%) translateY(40px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* ===== HEADER ===== */
.header { height: 82px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 5%; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10; }
.logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.logo span { color: #16a34a; font-size: 20px; }
.logo img { height: 28px; vertical-align: middle; }
nav { display: flex; gap: 36px; font-weight: 600; }
nav a { color: #374151; position: relative; }
nav a.active, nav a:hover { color: #16a34a; }
nav a.active::after { content: ""; width: 100%; height: 3px; background: #16a34a; position: absolute; left: 0; bottom: -31px; border-radius: 999px; }
.nav-right { display: flex; gap: 14px; align-items: center; }
.nav-right input { width: 200px; border: 1px solid #d1d5db; border-radius: 14px; padding: 11px 16px; font-size: 14px; outline: none; background: #fff; }
.nav-right input:focus { border-color: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 13px 22px; border-radius: 999px; font-weight: 800; cursor: pointer; border: 0; transition: .2s ease; font-size: 14px; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: #16a34a; color: #fff; box-shadow: 0 8px 18px rgba(22,163,74,.25); }
.btn-primary:hover { background: #15803d; }
.btn-secondary { background: #fff; border: 1px solid #e5e7eb; color: #374151; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.btn-ghost { background: transparent; color: #374151; padding: 10px 16px; }
.btn-ghost:hover { color: #16a34a; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-login { background: #16a34a; color: #fff; border-radius: 14px; padding: 11px 22px; font-weight: 700; border: 0; cursor: pointer; box-shadow: 0 8px 18px rgba(22,163,74,.25); }

/* ===== HERO ===== */
.hero { min-height: 390px; display: flex; align-items: center; justify-content: space-between; padding: 55px 10%; background: radial-gradient(circle at 82% 35%, #c9f5da 0, transparent 32%), linear-gradient(135deg, #fff 0%, #f3fbf6 100%); overflow: hidden; border-bottom: 1px solid #e5e7eb; }
.hero-text { max-width: 600px; position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 14px; font-weight: 800; margin-bottom: 18px; }
.hero-text h1 { font-size: clamp(44px, 6vw, 72px); line-height: .95; letter-spacing: -3px; }
.hero-text h1 span { color: #16a34a; }
.hero-text p { margin: 26px 0; font-size: 20px; color: #4b5563; line-height: 1.5; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-art { position: relative; width: 450px; height: 280px; flex-shrink: 0; }
.card-art, .back-card-art { width: 155px; height: 230px; background: #fff; border-radius: 20px; position: absolute; box-shadow: 0 25px 45px rgba(0,0,0,.18); padding: 24px; font-size: 36px; font-weight: 900; }
.card-art.red { color: #dc2626; }
.card-art.black { color: #111827; }
.card-art:nth-child(1) { left: 40px; top: 34px; transform: rotate(-18deg); }
.card-art:nth-child(2) { left: 155px; top: 5px; transform: rotate(-4deg); z-index: 2; }
.card-art:nth-child(3) { left: 270px; top: 32px; transform: rotate(14deg); z-index: 3; }
.back-card-art { right: 0; top: 35px; background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; display: flex; align-items: center; justify-content: center; transform: rotate(22deg); z-index: 1; }

/* ===== CONTAINER ===== */
.container { width: 90%; max-width: 1380px; margin: 36px auto 60px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 26px; letter-spacing: -1px; }
.section-head a { color: #16a34a; font-weight: 800; }
.category-title { font-size: 26px; letter-spacing: -1px; margin: 38px 0 18px; }

/* ===== GAMES GRID ===== */
.games-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.game-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,.08); transition: .2s ease; cursor: pointer; border: 1px solid #eef2f7; display: block; }
.game-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(0,0,0,.12); text-decoration: none; }
.game-card .preview { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 56px; position: relative; overflow: hidden; }
.game-card .preview::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.35), transparent 36%); }
.preview.green { background: #22c55e; }
.preview.blue { background: #3b5ccc; }
.preview.purple { background: #7c3aed; }
.preview.yellow { background: #f59e0b; }
.preview.teal { background: #14b8a6; }
.preview.sky { background: #93c5fd; }
.preview.rose { background: #f43f5e; }
.preview.orange { background: #f97316; }
.preview.indigo { background: #6366f1; }
.preview.lime { background: #84cc16; }
.preview.cyan { background: #06b6d4; }
.preview.pink { background: #ec4899; }
.preview.amber { background: #d97706; }
.preview.emerald { background: #10b981; }
.preview.slate { background: #475569; }
.preview.red { background: #ef4444; }
.game-info { min-height: 62px; background: #fff; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-info strong { font-size: 15px; color: #111827; }
.game-info .badge { background: #dcfce7; color: #15803d; font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.game-info .badge-hot { background: #fef3c7; color: #b45309; }
.game-info .badge-new { background: #dbeafe; color: #1d4ed8; }

/* ===== CATEGORIES ===== */
.categories { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.categories a { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; height: 74px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; box-shadow: 0 6px 16px rgba(0,0,0,.04); transition: .2s ease; }
.categories a:hover { border-color: #16a34a; color: #16a34a; transform: translateY(-2px); text-decoration: none; }

/* ===== BENEFITS ===== */
.benefits { margin-top: 28px; background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 28px 42px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.04); }
.benefits b { font-size: 18px; }
.benefits p { color: #6b7280; margin-top: 8px; font-size: 14px; line-height: 1.4; }

/* ===== GAME PAGE LAYOUT ===== */
.game-page { display: grid; grid-template-columns: 1fr 280px; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 20px 24px; }
.game-main { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.game-main > * { width: 100%; }
.game-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.sidebar-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; color: #111827; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.stat-row:last-child { border-bottom: none; }
.stat-row .stat-label { color: #6b7280; }
.stat-row .stat-value { font-weight: 600; color: #111827; }
.daily-badge { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; padding: 12px 14px; border-radius: 12px; text-align: center; cursor: pointer; transition: transform .15s; box-shadow: 0 8px 20px rgba(22,163,74,.25); }
.daily-badge:hover { transform: scale(1.02); }
.daily-badge .daily-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.daily-badge .daily-date { font-size: 11px; opacity: .8; }
.related-game { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; text-decoration: none; }
.related-game:last-child { border-bottom: none; }
.related-game .rg-icon { font-size: 20px; width: 36px; height: 36px; background: #f3f4f6; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.related-game .rg-info h4 { font-size: 13px; font-weight: 600; color: #111827; }
.related-game .rg-info p { font-size: 11px; color: #9ca3af; }

/* ===== GAME TOOLBAR ===== */
.game-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.toolbar-stats { display: flex; gap: 20px; }
.toolbar-stat { text-align: center; }
.toolbar-stat .value { font-size: 18px; font-weight: 700; color: #111827; display: block; line-height: 1.2; }
.toolbar-stat .label { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }
.toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar-mode { display: flex; gap: 4px; background: #f3f4f6; border-radius: 10px; padding: 3px; }
.toolbar-mode button { padding: 6px 14px; border: none; border-radius: 8px; background: transparent; color: #6b7280; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.toolbar-mode button.active { background: #16a34a; color: #fff; box-shadow: 0 2px 8px rgba(22,163,74,.25); }

/* ===== SOLITAIRE TABLE ===== */
.solitaire-table { background: linear-gradient(135deg, #1a6b3c 0%, #145a30 100%); border-radius: 16px; padding: 20px; min-height: 480px; position: relative; user-select: none; box-shadow: inset 0 2px 20px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.12); margin: 0 auto; max-width: 100%; }
.top-row { display: flex; justify-content: space-between; margin-bottom: 24px; }
.stock-waste { display: flex; gap: 14px; }
.foundations { display: flex; gap: 10px; }
.tableau { display: flex; justify-content: space-between; gap: 8px; }
.tableau-pile { flex: 1; min-height: var(--card-height); position: relative; }

/* ===== CARDS ===== */
:root { --card-width: 85px; --card-height: 119px; --card-radius: 7px; }
.card-slot { width: var(--card-width); height: var(--card-height); border: 2px dashed rgba(255,255,255,.15); border-radius: var(--card-radius); display: flex; align-items: center; justify-content: center; }
.card { width: var(--card-width); height: var(--card-height); border-radius: var(--card-radius); position: absolute; cursor: pointer; background: #fff; border: 1px solid #d0d0d0; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: box-shadow .1s, transform .1s; }
.card:hover { box-shadow: 0 0 0 2px #16a34a, 0 4px 12px rgba(22,163,74,.3); z-index: 999 !important; }
.card.face-down { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); border: 2px solid #1a8a4a; cursor: default; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.card.face-down:hover { box-shadow: 0 1px 3px rgba(0,0,0,.2); z-index: auto !important; }
.card.face-down::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; background: repeating-conic-gradient(rgba(255,255,255,.04) 0% 25%, transparent 0% 50%) 0 0 / 8px 8px; }
.card .card-inner { padding: 4px 6px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.card .card-corner { font-size: 13px; font-weight: 800; line-height: 1.1; }
.card .card-corner .suit { font-size: 11px; }
.card .card-center { font-size: 30px; text-align: center; opacity: .7; }
.card .card-corner-bottom { transform: rotate(180deg); }
.card.red { color: #dc2626; }
.card.black { color: #1a1a1a; }

/* ===== CONTENT / SEO ===== */
.content-section { max-width: 1200px; margin: 40px auto; padding: 0 24px; }
.content-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 32px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.content-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 16px; color: #111827; }
.content-card h3 { font-size: 18px; font-weight: 600; margin: 20px 0 10px; color: #111827; }
.content-card p { color: #4b5563; margin-bottom: 12px; font-size: 15px; }
.content-card ul, .content-card ol { color: #4b5563; margin: 0 0 12px 20px; font-size: 15px; }
.content-card li { margin-bottom: 6px; }
.content-card strong { color: #111827; }
.faq-item { border-bottom: 1px solid #f3f4f6; }
.faq-item:last-child { border-bottom: none; }
.faq-q { padding: 14px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: #111827; }
.faq-q::after { content: '+'; font-size: 20px; color: #9ca3af; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a p { padding-bottom: 14px; }

/* ===== WIN OVERLAY ===== */
.win-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 5000; backdrop-filter: blur(4px); }
.win-box { background: #fff; padding: 48px; border-radius: 24px; text-align: center; max-width: 420px; width: 90%; box-shadow: 0 25px 60px rgba(0,0,0,.2); }
.win-box h2 { font-size: 36px; margin-bottom: 8px; }
.win-stats { display: flex; justify-content: center; gap: 24px; margin: 16px 0 24px; }
.win-stat { text-align: center; }
.win-stat .val { font-size: 22px; font-weight: 700; color: #111827; }
.win-stat .lbl { font-size: 11px; color: #9ca3af; text-transform: uppercase; }

/* ===== FOOTER ===== */
.site-footer { background: #fff; border-top: 1px solid #e5e7eb; margin-top: 60px; padding: 40px 24px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; margin-bottom: 12px; }
.footer-col a { display: block; color: #6b7280; font-size: 13px; padding: 3px 0; }
.footer-col a:hover { color: #16a34a; text-decoration: none; }
.footer-col p { color: #6b7280; font-size: 13px; }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding-top: 20px; border-top: 1px solid #f3f4f6; text-align: center; font-size: 12px; color: #9ca3af; }

/* ===== RESPONSIVE ===== */

/* Tablet landscape */
@media (max-width: 1100px) {
    nav { display: none; }
    .nav-right input { display: none; }
    .hero { padding: 45px 6%; }
    .hero-art { transform: scale(.82); transform-origin: right center; }
    .games-grid { grid-template-columns: repeat(3, 1fr); }
    .categories { grid-template-columns: repeat(3, 1fr); }
    .benefits { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait / game pages */
@media (max-width: 900px) {
    .game-page { grid-template-columns: 1fr; }
    .game-sidebar { order: 2; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .hero-art { display: none; }
    .hero { min-height: auto; padding: 40px 5%; }
}

/* Mobile */
@media (max-width: 700px) {
    /* Cards sizing */
    :root { --card-width: 44px; --card-height: 62px; }
    .card .card-corner { font-size: 10px; }
    .card .card-corner .suit { font-size: 9px; }
    .card .card-center { font-size: 14px; }

    /* Solitaire table */
    .solitaire-table { padding: 8px; border-radius: 10px; overflow-x: auto; }
    .top-row { margin-bottom: 12px; gap: 4px; flex-wrap: nowrap; }
    .foundations { gap: 3px; }
    .stock-waste { gap: 6px; }
    .tableau { gap: 2px; }

    /* Header */
    .header { padding: 0 12px; height: 60px; }
    .logo { font-size: 20px; }
    .logo span { font-size: 14px; }
    .nav-right { gap: 8px; }
    .nav-right input { display: none; }
    .btn-login { padding: 8px 14px; font-size: 13px; }
    #player-hud { display: none; }

    /* Hero */
    .hero { flex-direction: column; text-align: center; padding: 32px 16px 24px; min-height: auto; }
    .hero-text h1 { font-size: 36px; letter-spacing: -2px; }
    .hero-text p { font-size: 16px; margin: 16px 0; }
    .hero-actions { justify-content: center; }
    .hero-actions .btn { padding: 12px 20px; font-size: 13px; }
    .hero-art { display: none; }
    .eyebrow { font-size: 12px; padding: 6px 12px; }

    /* Games grid - 2 columns on mobile */
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .game-card .preview { height: 120px; }
    .game-info { min-height: 50px; padding: 0 12px; }
    .game-info strong { font-size: 13px; }
    .game-info .badge { font-size: 10px; padding: 3px 8px; }

    /* Categories - 2 columns */
    .categories { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .categories a { height: 58px; font-size: 13px; }

    /* Benefits - stack */
    .benefits { grid-template-columns: 1fr; padding: 20px; gap: 20px; }

    /* Section titles */
    .section-head h2 { font-size: 20px; }
    .category-title { font-size: 20px; margin: 28px 0 14px; }

    /* Container */
    .container { width: 95%; margin: 20px auto 40px; }

    /* Content cards */
    .content-card { padding: 18px; border-radius: 12px; }
    .content-card h2 { font-size: 20px; }
    .content-card h3 { font-size: 16px; }
    .content-card p, .content-card li { font-size: 14px; }

    /* Game toolbar */
    .game-toolbar { padding: 8px 10px; border-radius: 10px; gap: 6px; }
    .toolbar-stats { gap: 12px; }
    .toolbar-stat .value { font-size: 15px; }
    .toolbar-stat .label { font-size: 9px; }
    .toolbar-actions { width: 100%; justify-content: center; }
    .toolbar-mode button { padding: 5px 10px; font-size: 11px; }

    /* Game page padding */
    .game-page { padding: 10px 12px; gap: 12px; }

    /* Win overlay */
    .win-box { padding: 28px 20px; border-radius: 18px; }
    .win-box h2 { font-size: 28px; }

    /* Footer */
    .site-footer { padding: 28px 16px 16px; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
    .footer-bottom { font-size: 11px; }
}

/* Very small screens */
@media (max-width: 400px) {
    :root { --card-width: 38px; --card-height: 53px; }
    .card .card-corner { font-size: 9px; }
    .card .card-center { font-size: 12px; }
    .hero-text h1 { font-size: 30px; }
    .games-grid { gap: 8px; }
    .game-card .preview { height: 100px; }
    .game-info { min-height: 44px; padding: 0 8px; }
    .game-info strong { font-size: 12px; }
    .toolbar-stats { gap: 8px; }
    .toolbar-stat .value { font-size: 13px; }
}
