:root {
    --bg: #0a0a0a;
    --card: #1c1c1e;
    --card-2: #222224;
    --yellow: #f2f23a;
    --yellow-soft: #eef06b;
    --text: #ffffff;
    --text-dim: #a6a6a8;
    --border: #2c2c2e;
    --green: #8fe23a;
    --red: #ff5b5b;
    --radius: 16px;
    --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.app {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 90px;
    overflow-x: hidden;
}

/* ---------- Header ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 6px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-mark {
    width: 26px; height: 26px;
    background: var(--yellow);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.logo-text {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.5px;
    line-height: 1.05;
}
.logo-text small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
}

/* ---------- Free/VIP toggle ---------- */
.tab-switch {
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
}
.tab-switch a {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    border-radius: 30px;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.5px;
    background: var(--card);
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.tab-switch a.active {
    background: var(--yellow);
    color: #111;
    border-color: var(--yellow);
}

/* ---------- Category grid ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 4px 16px 20px;
}
.cat-card {
    background: var(--card);
    border-radius: 14px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    gap: 8px;
    border: 1px solid var(--border);
    transition: transform .12s ease, border-color .12s ease;
}
.cat-card:active { transform: scale(0.96); border-color: var(--yellow); }
.cat-card svg { width: 30px; height: 30px; color: #e9e9e9; stroke-width: 1.6; }
.cat-card span {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

/* ---------- Date section ---------- */
.date-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 10px;
    color: var(--text-dim);
    font-size: 15px;
}
.date-header .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--yellow), transparent);
}

/* ---------- Tip card ---------- */
.tips-list { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }

.tip-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}
.tip-row.meta {
    background: var(--card-2);
    color: var(--text-dim);
    font-size: 14px;
}
.tip-row.meta .time { color: var(--text); font-weight: 700; }
.tip-row.meta svg { width: 18px; height: 18px; color: var(--text-dim); }

.tip-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 600;
}
.tip-teams .score {
    font-weight: 800;
    color: var(--text-dim);
    padding: 0 10px;
}

.tip-row.prediction {
    justify-content: space-between;
    padding: 12px 16px;
}
.tip-row.prediction .label {
    color: var(--green);
    font-weight: 800;
    font-size: 15px;
}
.tip-row.prediction .odds {
    background: var(--yellow);
    color: #111;
    font-weight: 900;
    font-size: 16px;
    padding: 6px 16px;
    border-radius: 8px;
    min-width: 58px;
    text-align: center;
}

.status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.status-pending { background: #3a3a1a; color: var(--yellow-soft); }
.status-won { background: #163d16; color: var(--green); }
.status-lost { background: #3d1616; color: var(--red); }
.status-void { background: #2c2c2e; color: var(--text-dim); }

/* ---------- History stats panel ---------- */
.stats-panel {
    margin: 14px 16px 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.stats-panel h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 700;
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}
.stats-row .n { font-size: 20px; font-weight: 900; }
.stats-row .l { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.stats-row .n.green { color: var(--green); }
.stats-row .n.red { color: var(--red); }
.stats-row .n.yellow { color: var(--yellow); }

/* ---------- VIP lock / paywall (publikus oldal) ---------- */
.cat-card.locked { position: relative; opacity: 0.85; }
.lock-badge {
    position: absolute;
    top: 8px; right: 8px;
    width: 20px; height: 20px;
    background: var(--yellow);
    color: #111;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 4px;
}
.lock-badge svg { width: 12px; height: 12px; }

.vip-banner {
    margin: 0 16px 14px;
    background: linear-gradient(135deg, #2a2a10, #1c1c1e);
    border: 1px solid var(--yellow);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--yellow);
}
.vip-banner div { flex: 1; display: flex; flex-direction: column; color: var(--text); font-size: 12.5px; }
.vip-banner strong { color: var(--yellow); font-size: 14px; }
.btn-chip {
    background: var(--yellow);
    color: #111;
    font-weight: 800;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.paywall {
    text-align: center;
    padding: 50px 26px;
}
.paywall-lock {
    display: inline-flex;
    width: 60px; height: 60px;
    align-items: center; justify-content: center;
    background: var(--card);
    border: 1px solid var(--yellow);
    border-radius: 50%;
    color: var(--yellow);
    margin-bottom: 18px;
}
.paywall-lock svg { width: 28px; height: 28px; }
.paywall h2 { margin: 0 0 10px; font-size: 20px; }
.paywall p { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.btn-yellow-full, .btn-outline-full {
    display: block;
    width: 100%;
    padding: 14px 0;
    border-radius: 30px;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 10px;
}
.btn-yellow-full { background: var(--yellow); color: #111; }
.btn-outline-full { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ---------- Publikus auth oldalak (regisztracio / belepes) ---------- */
.auth-card {
    margin: 30px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
}
.auth-card h1 { font-size: 20px; margin: 0 0 20px; }
.auth-card .form-group { margin-bottom: 14px; }
.auth-card label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 700; }
.auth-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #141416;
    color: var(--text);
    font-size: 15px;
}
.auth-card .foot-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-dim); }
.auth-card .foot-link a { color: var(--yellow); font-weight: 700; }

/* ---------- Elofizetesi csomagok (subscribe.php) ---------- */
.plans-list { padding: 6px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.plan-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.plan-card.featured { border-color: var(--yellow); }
.plan-card .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.plan-card .top .name { font-size: 17px; font-weight: 800; }
.plan-card .top .price { font-size: 20px; font-weight: 900; color: var(--yellow); }
.plan-card .desc { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.plan-card form { margin: 0; }
.plan-card .paypal-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 0;
    border-radius: 26px;
    background: #ffc439;
    color: #111;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

/* ---------- Fiokom (my-account.php) ---------- */
.account-status {
    margin: 16px 16px 6px;
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
}
.account-status.vip { background: linear-gradient(135deg, #2a2a10, #1c1c1e); border: 1px solid var(--yellow); }
.account-status.free { background: var(--card); border: 1px solid var(--border); }
.account-status .badge { font-weight: 900; font-size: 16px; }
.account-status.vip .badge { color: var(--yellow); }
.account-status p { color: var(--text-dim); font-size: 13px; margin: 6px 0 0; }

.payment-row {
    display: flex; justify-content: space-between; padding: 12px 16px;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.payment-row:last-child { border-bottom: none; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px 20px;
}
.pagination a, .pagination span.disabled {
    padding: 10px 18px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 14px;
}
.pagination a.prev, .pagination span.disabled.prev { color: var(--text-dim); }
.pagination a.next {
    background: #f2f0f8;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pagination span.disabled { opacity: 0.35; }

/* ---------- Today/History tabs (matches screenshot bottom bar) ---------- */
.view-tabs {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border);
    padding: 16px 0 max(16px, env(safe-area-inset-bottom));
    max-width: var(--max-width);
    margin: 0 auto;
}
.view-tabs a {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}
.view-tabs a.active { color: var(--text); }

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 18px 20px 0;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 600;
}

.page-title {
    padding: 4px 20px 0;
    font-size: 22px;
    font-weight: 900;
}

/* ---------- Bottom nav (mobile app feel) ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-width);
    background: #141414;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    z-index: 20;
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 700;
}
.bottom-nav a.active { color: var(--yellow); }
.bottom-nav svg { width: 22px; height: 22px; }

/* ---------- Admin ---------- */
body.admin-body {
    background: #f4f5f7;
    color: #1a1a1a;
    max-width: none;
}
.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #111;
    color: #fff;
}
.admin-topbar .logo-text { color: #fff; font-size: 16px; }
.admin-topbar a.logout { color: var(--yellow); font-weight: 700; font-size: 14px; }

.admin-nav {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.admin-nav a {
    padding: 9px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #333;
}
.admin-nav a.active { background: #111; color: var(--yellow); border-color: #111; }

.card-box {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e4e4e7;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: #111; color: #fff; border-radius: 14px; padding: 18px; }
.stat-card .num { font-size: 28px; font-weight: 900; color: var(--yellow); }
.stat-card .lbl { font-size: 13px; color: #bbb; margin-top: 4px; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th, table.admin-table td {
    text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee;
}
table.admin-table th { color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
table.admin-table tr:hover { background: #fafafa; }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: #111; color: var(--yellow); }
.btn-yellow { background: var(--yellow); color: #111; }
.btn-danger { background: #ffe4e4; color: #c62828; }
.btn-outline { background: #fff; border: 1px solid #ccc; color: #333; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #444; }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
}

.badge-type { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge-free { background: #e6f7e6; color: #2c7a2c; }
.badge-vip { background: #fdf0d8; color: #a9720b; }

.login-wrap {
    max-width: 380px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.login-wrap h1 { font-size: 20px; margin-bottom: 24px; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fde8e8; color: #b91c1c; }
.alert-success { background: #e6f7e6; color: #1e7a1e; }

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .admin-wrap { padding: 16px; }
}
