:root {
    --bg: #f4f5fb;
    --card: #ffffff;
    --text: #1c2130;
    --muted: #6b7280;
    --primary: #5b4ef0;
    --primary-dark: #4638d8;
    --accent: #ffb020;
    --border: #e6e8f2;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(28, 33, 48, .06);
}

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

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: linear-gradient(135deg, #4a3ee0 0%, #7b5cf0 55%, #9d6ef5 100%);
    color: #fff;
    padding: 22px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { font-size: 34px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.brand-tagline { font-size: 13px; opacity: .85; }

.country-picker { display: flex; align-items: center; gap: 10px; }
.country-label { font-size: 13px; opacity: .9; }
.country-picker select {
    font-size: 15px;
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* Category nav */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 245, 251, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.pills {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: all .15s ease;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Result line */
.result-line {
    margin: 18px 0 14px;
    font-size: 14px;
    color: var(--muted);
}
.detecting { font-style: italic; }

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 18px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(28, 33, 48, .12);
}
.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.card-icon { font-size: 32px; line-height: 1; }
.card-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.tag-cat { background: #eef0fa; color: #525a75; }
.tag-badge.tag-hot { background: #ffe3e3; color: #d13438; }
.tag-badge.tag-new { background: #dff6dd; color: #1a7f37; }
.tag-badge.tag-trending { background: #fff4d6; color: #9a6700; }

.card-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card-desc {
    font-size: 13.5px;
    color: var(--muted);
    flex: 1;
    margin-bottom: 14px;
}
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.payout { font-size: 18px; font-weight: 800; color: var(--accent); text-shadow: 0 0 1px rgba(0,0,0,.15); }
.claim-btn {
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: var(--primary);
    padding: 9px 16px;
    border-radius: 10px;
    transition: background .15s ease;
    white-space: nowrap;
}
.claim-btn:hover { background: var(--primary-dark); }

.empty {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
    font-size: 15px;
}

/* Footer */
.site-footer {
    margin: 48px 0 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}
.site-footer p { margin-bottom: 8px; }
.disclosure { font-size: 12px; }

@media (max-width: 600px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card { padding: 14px; }
    .card-desc { display: none; }
    .card-title { font-size: 14px; }
    .card-foot { flex-direction: column; align-items: stretch; }
    .claim-btn { text-align: center; }
}
