:root {
    --bg: #050505;
    --card: #121212;
    --text: #ffffff;
    --muted: #a1a1aa;
    --border: #27272a;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --radius: 14px;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    --font-heading: "Greet Standard", Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    --font-body: Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    --weight-heading: 600;
    --size-heading: 22px;
    --lh-heading: 28px;
    --ls-heading: 0.22px;
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-y: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-body);
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

.pt-safe {
    padding-top: var(--safe-top);
}

.pb-safe {
    padding-bottom: var(--safe-bottom);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 460px;
    margin: 0 auto;
    padding: 14px 16px;
}

.topbar-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

/* Container */
.container {
    max-width: 460px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

#loading {
    text-align: center;
    font-size: 0.95em;
    color: var(--muted);
    padding: 16px 0 8px;
}

/* Badges - Updated for nicer UI */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    transition: all 0.2s ease;
}

.badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Error State */
.error-state {
    background: #450a0a;
    border: 1px solid #7f1d1d;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: #fecaca;
}

.error-state-title {
    font-weight: 600;
    margin: 0 0 8px 0;
}

.error-state-text {
    margin: 0;
    font-size: 14px;
    color: #fca5a5;
}

/* Animations */
@keyframes shimmer {
    0% {
        background-position: 100% 0
    }

    100% {
        background-position: -100% 0
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1757c7 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(31, 111, 235, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}