/* ==========================================================================
   hra.css — shared look of the game pages (Úkoly, Hodnotitel profilů, Žebříčky)
   ==========================================================================
   Built after the PRO pages (pro. Služby / Nabídky) so the main site's game
   pages read like one product with them: page header with a gradient icon,
   two-column grid (content + 340px sidebar), goal card with a rainbow strip,
   section cards with their own headers, sidebar cards, filter buttons.

   Page-specific components stay inline on each page (.uk-*, .hp-*, .zb-*).
   The main site lacks some PRO colour tokens; they fall back here.
   Everything is scoped under .gx-page.
   ========================================================================== */

.gx-page {
    --gx-orange: var(--color-orange, #FF9500);
    --gx-coral:  var(--color-coral, #FF6B6B);
    --gx-green:  var(--color-green, #10B981);
    --gx-cyan:   var(--color-cyan, #06B6D4);
    --gx-purple: var(--color-purple, #8B5CF6);
    --gx-indigo: #6366F1;
    background: var(--color-gray-50);
    min-height: 70vh;
}
.gx-wrap { padding-top: calc(var(--header-height, 72px) + 2rem); padding-bottom: 4rem; }

/* ---------- Page header ---------- */
.gx-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.gx-title-wrap { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.gx-page-icon {
    width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.75rem;
    background: linear-gradient(135deg, var(--color-yellow), var(--gx-orange));
    border-radius: var(--radius-xl); box-shadow: 0 4px 16px rgba(255, 149, 0, .3);
}
.gx-crumbs { font-size: .8125rem; color: var(--color-gray-500); }
.gx-crumbs a { color: inherit; text-decoration: none; }
.gx-crumbs a:hover { text-decoration: underline; }
.gx-title { font-size: 2rem; font-weight: 900; margin: .1rem 0 0; line-height: 1.15; }
.gx-subtitle { font-size: .9375rem; color: var(--color-gray-500); margin: .25rem 0 0; }
.gx-header-side { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

/* XP / reward badge */
.gx-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .4rem .8rem; border-radius: var(--radius-full); font-weight: 800; font-size: .875rem; white-space: nowrap;
    background: linear-gradient(135deg, var(--color-yellow), var(--gx-orange)); color: var(--color-black);
}
.gx-badge-soft { background: #fff; border: 1px solid var(--color-gray-200); color: var(--color-gray-700); font-weight: 700; }

/* ---------- Alerts ---------- */
.gx-alert { display: flex; gap: .6rem; align-items: center; padding: .9rem 1.1rem; border-radius: var(--radius-lg); margin-bottom: 1.25rem; font-weight: 600; }
.gx-alert-ok { background: var(--color-success-light); color: #065f46; }
.gx-alert-err { background: #fee2e2; color: #991b1b; }
.gx-alert-info { background: #111; color: #e5e7eb; }
.gx-alert-info strong { color: #fff; }

/* ---------- Grid ---------- */
.gx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.gx-main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.gx-side { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: calc(var(--header-height, 72px) + 1rem); }

/* ---------- Goal card ---------- */
.gx-goal {
    position: relative; overflow: hidden; padding: 1.75rem; border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 50%, #FFE9A0 100%);
    box-shadow: 0 8px 32px rgba(255, 193, 7, .22);
}
.gx-goal::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--gx-coral), var(--gx-orange), var(--color-yellow), var(--gx-green), var(--gx-cyan), var(--gx-purple));
}
.gx-goal-compact { padding: 1.25rem 1.5rem; }
.gx-goal-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.gx-goal-icon { width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.75rem; background: #fff; border-radius: var(--radius-lg); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.gx-goal-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 .25rem; }
.gx-goal-desc { font-size: .9375rem; color: var(--color-gray-600); margin: 0; }
.gx-goal-reward { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; background: #fff; border-radius: var(--radius-lg); }
.gx-goal-reward + .gx-goal-actions, .gx-progress + .gx-goal-reward { margin-top: 1rem; }
.gx-goal-reward-icon { font-size: 1.5rem; }
.gx-goal-reward-text { flex: 1; display: flex; flex-direction: column; }
.gx-goal-reward-text strong { font-size: .875rem; }
.gx-goal-reward-text span { font-size: .75rem; color: var(--color-gray-500); }
.gx-goal-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Progress */
.gx-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.gx-progress-label { font-size: .9375rem; font-weight: 600; }
.gx-progress-value { font-size: .875rem; font-weight: 800; color: var(--gx-orange); white-space: nowrap; }
.gx-progress-bar { height: 12px; background: #fff; border-radius: var(--radius-full); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.08); }
.gx-progress-bar > span { position: relative; display: block; height: 100%; min-width: 12px; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--color-yellow), var(--gx-orange)); transition: width .5s ease; overflow: hidden; }
.gx-progress-bar > span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: gx-shimmer 2s infinite; }
.gx-progress-bar.is-done > span { background: linear-gradient(90deg, #34d399, var(--gx-green)); }
@keyframes gx-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- Section card ---------- */
.gx-section { background: #fff; border-radius: var(--radius-xl); padding: 1.5rem; box-shadow: var(--shadow-card); }
.gx-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.gx-section-title-wrap { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.gx-section-icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.25rem; border-radius: var(--radius-md); background: var(--color-gray-100); }
.gx-section-title { font-size: 1.0625rem; font-weight: 800; margin: 0; }
.gx-section-sub { font-size: .8125rem; color: var(--color-gray-500); margin: .1rem 0 0; }
.gx-step-badge { padding: .25rem .6rem; border-radius: var(--radius-full); background: var(--color-gray-100); color: var(--color-gray-500); font-size: .75rem; font-weight: 800; white-space: nowrap; }
.gx-link { font-size: .8125rem; font-weight: 700; color: #b45309; text-decoration: none; white-space: nowrap; }
.gx-link:hover { text-decoration: underline; }

/* ---------- Filter buttons (PRO .filter-btn) ---------- */
.gx-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.gx-filter {
    padding: .5rem 1rem; border: 0; border-radius: var(--radius-md); background: var(--color-gray-100);
    font: inherit; font-size: .8125rem; font-weight: 600; color: var(--color-gray-600);
    text-decoration: none; cursor: pointer; white-space: nowrap; transition: var(--transition-fast);
}
.gx-filter:hover { background: var(--color-gray-200); color: var(--color-black); }
.gx-filter.is-on { background: var(--color-black); color: #fff; }

/* ---------- Buttons ---------- */
.gx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.2rem; border-radius: var(--radius-md); border: 2px solid transparent; font: inherit; font-weight: 800; font-size: .9375rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: var(--transition-fast); }
.gx-btn-sm { padding: .45rem .85rem; font-size: .8125rem; }
.gx-btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.gx-btn-primary { background: var(--color-yellow); color: var(--color-black); box-shadow: 0 4px 14px rgba(255, 193, 7, .35); }
.gx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 193, 7, .45); }
.gx-btn-primary:disabled, .gx-btn-primary.is-incomplete { opacity: .5; transform: none; box-shadow: none; }
.gx-btn-dark { background: var(--color-black); color: #fff; }
.gx-btn-ghost { background: #fff; border-color: var(--color-gray-200); color: var(--color-black); }
.gx-btn-ghost:hover { border-color: var(--color-yellow); }

/* ---------- Sidebar cards ---------- */
.gx-card { background: #fff; border-radius: var(--radius-xl); padding: 1.35rem; box-shadow: var(--shadow-card); }
.gx-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.gx-card-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 800; margin: 0; }
.gx-card-icon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-yellow); font-size: 1.15rem; }
.gx-card-icon-dark { background: var(--color-black); }
.gx-card-note { margin: -.4rem 0 .9rem; font-size: .75rem; color: var(--color-gray-500); }

/* Tips card (PRO .tips-card) */
.gx-card-tips { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); border: 1px solid var(--color-yellow); box-shadow: none; }
.gx-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.gx-tips li { display: flex; gap: .55rem; font-size: .8125rem; line-height: 1.45; color: #422006; }

/* Stats card (PRO .services-xp-card) */
.gx-card-stats { background: linear-gradient(135deg, #fff 0%, #F5F3FF 100%); border: 1px solid #E0E7FF; box-shadow: 0 4px 20px rgba(99, 102, 241, .1); }
.gx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.gx-stats-2 { grid-template-columns: repeat(2, 1fr); }
.gx-stats > div { display: flex; flex-direction: column; padding: .6rem .3rem; border-radius: var(--radius-md); background: #fff; }
.gx-stats strong { font-size: 1.35rem; font-weight: 900; color: #4f46e5; line-height: 1.15; }
.gx-stats span { font-size: .72rem; color: var(--color-gray-500); }
.gx-card-foot { margin: .85rem 0 0; font-size: .8125rem; color: var(--color-gray-600); }

/* ---------- Empty state ---------- */
.gx-empty { text-align: center; padding: 2rem 1.25rem; }
.gx-empty-icon { font-size: 2.5rem; }
.gx-empty-title { font-size: 1.1rem; font-weight: 800; margin: .4rem 0 .25rem; }
.gx-empty-text { font-size: .875rem; color: var(--color-gray-500); margin: 0 0 1rem; }

.gx-muted { color: var(--color-gray-500); font-size: .8125rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .gx-grid { grid-template-columns: 1fr; }
    .gx-side { position: static; }
}
@media (max-width: 720px) {
    .gx-header { flex-direction: column; }
    .gx-header-side { justify-content: flex-start; }
    .gx-title { font-size: 1.6rem; }
    .gx-goal { padding: 1.25rem; }
    .gx-section { padding: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
    .gx-progress-bar > span::after { animation: none; }
}
