:root {
    --hc-navy: #0f2f52;
    --hc-navy-light: #14406e;
    --hc-gold: #d4a017;
    --hc-gold-light: #f6c500;
    --hc-cream: #fff8e6;
    --hc-green: #1e8a4c;
    --hc-red: #c0392b;
    --hc-shadow: 0 6px 20px rgba(15, 47, 82, 0.15);
    --hc-radius: 16px;
}

.hc-shell {
    font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--hc-cream) 0%, #ffffff 220px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.hc-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--hc-navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hc-topbar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.hc-topbar h1 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.02em;
}

.hc-content {
    flex: 1;
    padding: 16px 16px 90px;
}

.hc-bottomnav {
    position: sticky;
    bottom: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #e7e0cc;
    box-shadow: 0 -4px 16px rgba(15, 47, 82, 0.08);
}

.hc-bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 0 8px;
    text-decoration: none;
    color: #8a93a3;
    font-size: 0.72rem;
    font-weight: 600;
}

.hc-bottomnav a.active {
    color: var(--hc-navy);
}

.hc-bottomnav a .hc-nav-icon {
    font-size: 1.35rem;
}

.hc-bottomnav a.active .hc-nav-icon {
    filter: drop-shadow(0 0 0 var(--hc-gold));
}

.hc-h1 {
    font-weight: 800;
    color: var(--hc-navy);
    font-size: 1.4rem;
    margin: 4px 0 14px;
}

.hc-card {
    background: #fff;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.hc-shop-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hc-shop-coin {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--hc-gold-light), var(--hc-gold) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--hc-navy);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(212, 160, 23, 0.5);
}

.hc-shop-info {
    flex: 1;
    min-width: 0;
}

.hc-shop-name {
    font-weight: 700;
    color: var(--hc-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-shop-distance {
    font-size: 0.82rem;
    color: #6b7788;
}

.hc-badge-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.hc-badge-pill.in-range {
    background: #e3f6ea;
    color: var(--hc-green);
}

.hc-badge-pill.super {
    background: #fff3d6;
    color: var(--hc-gold);
}

.hc-badge-pill.claimed {
    background: #eef0f3;
    color: #8a93a3;
}

.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease;
}

.hc-btn:active {
    transform: scale(0.97);
}

.hc-btn-primary {
    background: linear-gradient(135deg, var(--hc-gold-light), var(--hc-gold));
    color: var(--hc-navy);
    box-shadow: 0 4px 14px rgba(212, 160, 23, 0.45);
}

.hc-btn-secondary {
    background: var(--hc-navy);
    color: #fff;
}

.hc-btn-block {
    width: 100%;
}

.hc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hc-empty {
    text-align: center;
    color: #6b7788;
    padding: 40px 20px;
}

.hc-error {
    background: #fdecea;
    color: var(--hc-red);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.hc-success {
    background: #e3f6ea;
    color: var(--hc-green);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.hc-stats-row {
    display: flex;
    gap: 10px;
}

.hc-stat {
    flex: 1;
    text-align: center;
    background: #fff;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
    padding: 14px 8px;
}

.hc-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hc-navy);
}

.hc-stat-label {
    font-size: 0.72rem;
    color: #8a93a3;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hc-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hc-badge-item {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--hc-shadow);
    text-align: center;
    padding: 12px 6px;
}

.hc-badge-item .icon {
    font-size: 1.8rem;
}

.hc-badge-item .label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hc-navy);
    margin-top: 4px;
}

.hc-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid #f0ede0;
}

.hc-leaderboard-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hc-navy);
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hc-leaderboard-row:nth-child(1) .hc-leaderboard-rank {
    background: var(--hc-gold);
    color: var(--hc-navy);
}

.hc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.hc-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    background: #eef0f3;
    color: #6b7788;
    border: none;
    cursor: pointer;
}

.hc-tab.active {
    background: var(--hc-navy);
    color: #fff;
}

/* Catch screen */
.hc-catch-view {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.hc-catch-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-catch-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    color: #fff;
}

.hc-catch-close {
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.hc-catch-coin-wrap {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-catch-coin {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--hc-gold-light), var(--hc-gold) 75%);
    box-shadow: 0 0 40px rgba(246, 197, 0, 0.7), 0 8px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--hc-navy);
    border: none;
    animation: hc-float 2.2s ease-in-out infinite;
}

@keyframes hc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hc-catch-bottom {
    position: relative;
    z-index: 2;
    padding: 18px 20px 30px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
}

.hc-catch-code-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.hc-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 47, 82, 0.92);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 24px;
    gap: 10px;
}

.hc-result-overlay .big-coin {
    font-size: 4rem;
}

.hc-result-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0;
}

.hc-nickname-form {
    display: flex;
    gap: 8px;
}

.hc-nickname-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #d8dde5;
}

/* Auth pages (Login/Register/etc.) */
.hc-auth-wrap {
    font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
    max-width: 420px;
    margin: 0 auto;
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--hc-cream) 0%, #ffffff 260px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.hc-auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.hc-auth-title {
    font-weight: 800;
    color: var(--hc-navy);
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.hc-auth-subtitle {
    color: #6b7788;
    font-size: 0.9rem;
    margin: 0 0 24px;
    text-align: center;
}

.hc-auth-card {
    width: 100%;
    background: #fff;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
    padding: 24px 22px;
}

.hc-form-group {
    margin-bottom: 16px;
}

.hc-label {
    display: block;
    font-weight: 600;
    color: var(--hc-navy);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.hc-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d8dde5;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.hc-input:focus {
    outline: none;
    border-color: var(--hc-gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

.hc-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 18px;
}

.hc-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8a93a3;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 20px 0;
}

.hc-divider::before,
.hc-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee7d4;
}

.hc-auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: #6b7788;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hc-link {
    color: var(--hc-navy);
    font-weight: 600;
    text-decoration: none;
}

.hc-link:hover {
    text-decoration: underline;
}

/* Reset default button chrome when .hc-link is used on a <button> (e.g. PasskeySubmit). */
button.hc-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}

.text-danger,
.validation-message {
    color: var(--hc-red);
    font-size: 0.82rem;
}

.hc-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(15, 47, 82, 0.2);
    border-top-color: var(--hc-navy);
    border-radius: 50%;
    animation: hc-spin 0.8s linear infinite;
}

@keyframes hc-spin {
    to { transform: rotate(360deg); }
}
