
/* ========================================
   CSS Variables
   ======================================== */
:root {
    --black: #0a0a0a;
    --black-light: #111111;
    --black-lighter: #1a1a1a;
    --black-card: #161616;
    --border: #2a2a2a;
    --border-light: #333333;

    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --green: #00ff88;
    --green-dim: #00cc6a;
    --green-dark: #00994f;
    --green-bg: rgba(0, 255, 136, 0.08);

    --red: #ff4444;
    --orange: #ff8800;
    --yellow: #ffcc00;
    --blue: #4488ff;

    --grade-excellent: #00ff88;
    --grade-good: #88dd44;
    --grade-mediocre: #ffaa22;
    --grade-poor: #ff4444;

    --nova-1: #00ff88;
    --nova-2: #88dd44;
    --nova-3: #ffaa22;
    --nova-4: #ff4444;

    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    --max-width: 720px;
    --nav-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --transition: 0.2s ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background: var(--black);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--green-dim);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

main {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo span {
    color: var(--green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a, .nav-links button {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-links a:hover, .nav-links button:hover {
    color: var(--text-primary);
    background: var(--black-lighter);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-user .user-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--green);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--green-dim);
    color: var(--black);
}

.btn-secondary {
    background: var(--black-lighter);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-light);
    background: #222;
}

.btn-ghost {
    background: none;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--black-lighter);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ========================================
   Hero / Scanner Section
   ======================================== */
.hero {
    text-align: center;
    padding: 80px 0 40px;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.15;
}

.hero h1 span {
    color: var(--green);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.scan-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Scanner View
   ======================================== */
.scanner-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 24px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--black-card);
    border: 1px solid var(--border);
}

.scanner-wrapper video {
    width: 100%;
    display: block;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-reticle {
    width: 220px;
    height: 140px;
    border: 2px solid var(--green);
    border-radius: 8px;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
    animation: pulse-reticle 2s ease-in-out infinite;
}

@keyframes pulse-reticle {
    0%, 100% { border-color: var(--green); }
    50% { border-color: var(--green-dim); }
}

.scanner-status {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Manual barcode input */
.barcode-input-group {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.barcode-input-group input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-mono);
    background: var(--black-lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
    letter-spacing: 0.05em;
}

.barcode-input-group input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-stack);
    letter-spacing: 0;
}

.barcode-input-group input:focus {
    border-color: var(--green);
}

/* ========================================
   Views (show/hide)
   ======================================== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ========================================
   Product Card (Scanned Product)
   ======================================== */
.product-card {
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.product-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--black-lighter);
    flex-shrink: 0;
}

.product-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    background: var(--black-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    flex-shrink: 0;
}

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

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-brand {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Rating Display
   ======================================== */
.rating-ring {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.rating-ring svg {
    transform: rotate(-90deg);
}

.rating-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.rating-ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.rating-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 800;
}

.rating-ring-small {
    width: 52px;
    height: 52px;
}

.rating-ring-small .rating-ring-text {
    font-size: 0.9375rem;
}

/* Rating breakdown bars */
.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    width: 90px;
    flex-shrink: 0;
}

.rating-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.rating-value {
    font-size: 0.8125rem;
    font-weight: 600;
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* Grade badges */
.grade-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grade-excellent {
    background: rgba(0, 255, 136, 0.12);
    color: var(--grade-excellent);
}

.grade-good {
    background: rgba(136, 221, 68, 0.12);
    color: var(--grade-good);
}

.grade-mediocre {
    background: rgba(255, 170, 34, 0.12);
    color: var(--grade-mediocre);
}

.grade-poor {
    background: rgba(255, 68, 68, 0.12);
    color: var(--grade-poor);
}

/* NOVA badges */
.nova-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.nova-1 { background: rgba(0, 255, 136, 0.1); color: var(--nova-1); }
.nova-2 { background: rgba(136, 221, 68, 0.1); color: var(--nova-2); }
.nova-3 { background: rgba(255, 170, 34, 0.1); color: var(--nova-3); }
.nova-4 { background: rgba(255, 68, 68, 0.1); color: var(--nova-4); }

/* Dietary tags */
.dietary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.dietary-tag {
    font-size: 0.6875rem;
    padding: 3px 8px;
    background: var(--green-bg);
    color: var(--green-dim);
    border-radius: 4px;
    font-weight: 500;
}

/* ========================================
   Nutrition Panel
   ======================================== */
.nutrition-panel {
    background: var(--black-lighter);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
}

.nutrition-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.nutrition-item {
    text-align: center;
}

.nutrition-item .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nutrition-item .unit {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* ========================================
   Ingredients Panel
   ======================================== */
.ingredients-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--black-lighter);
    border-radius: var(--radius-sm);
}

.ingredients-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.ingredients-toggle {
    font-size: 0.8125rem;
    color: var(--green);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    font-family: inherit;
}

/* ========================================
   Alternatives Section
   ======================================== */
.alternatives-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.alternatives-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
}

.alternatives-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Filters bar */
.filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filters-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--black-lighter);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    font-family: inherit;
}

.filter-chip:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--green-bg);
    border-color: var(--green-dark);
    color: var(--green);
}

/* Sort controls */
.sort-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.sort-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}

.sort-btn:hover {
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.sort-btn.active {
    background: var(--black-lighter);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.sort-btn .arrow {
    font-size: 0.625rem;
    margin-left: 2px;
}

/* ========================================
   Alternative Card
   ======================================== */
.alt-card {
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    transition: border-color var(--transition);
}

.alt-card:hover {
    border-color: var(--border-light);
}

.alt-card.sponsored {
    border-color: rgba(0, 255, 136, 0.15);
}

.alt-card-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    background: var(--black-lighter);
    flex-shrink: 0;
}

.alt-card-image-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xs);
    background: var(--black-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alt-card-body {
    flex: 1;
    min-width: 0;
}

.alt-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.alt-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
}

.alt-card-brand {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.sponsored-label {
    font-size: 0.625rem;
    color: var(--green-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(0, 255, 136, 0.08);
    border-radius: 3px;
    white-space: nowrap;
}

/* Sponsor pricing/delivery row */
.alt-card-sponsor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.sponsor-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--green);
}

.sponsor-price-sale {
    color: var(--red);
}

.sponsor-price-original {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 4px;
}

.sponsor-detail {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.sponsor-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green);
    padding: 4px 10px;
    border: 1px solid var(--green-dark);
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    margin-top: 6px;
}

.sponsor-cta:hover {
    background: var(--green-bg);
    color: var(--green);
}

.out-of-stock {
    font-size: 0.6875rem;
    color: var(--red);
    font-weight: 500;
}

/* ========================================
   Auth Modal
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--black-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    border-radius: 50%;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--black-lighter);
    color: var(--text-primary);
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    background: var(--black-lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-group input:focus {
    border-color: var(--green);
}

.form-error {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 4px;
}

.form-footer {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

.form-footer a {
    color: var(--green);
}

/* ========================================
   Empty / Loading / Error States
   ======================================== */
.loading {
    text-align: center;
    padding: 48px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

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

.loading-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 48px 0;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.error-banner {
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--red);
    margin-bottom: 16px;
}

.success-banner {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--green);
    margin-bottom: 16px;
}

/* ========================================
   Premium Banner
   ======================================== */
.premium-banner {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.06), rgba(68, 136, 255, 0.06));
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
    text-align: center;
}

.premium-banner h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.premium-banner p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

/* ========================================
   How It Works Section
   ======================================== */
.how-section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.how-section h2 {
    font-size: 1.375rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.how-step {
    text-align: center;
}

.how-step-number {
    width: 40px;
    height: 40px;
    background: var(--green-bg);
    color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin: 0 auto 14px;
}

.how-step h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.how-step p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Scan History / Favorites (logged in)
   ======================================== */
.history-item, .favorite-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color var(--transition);
}

.history-item:hover, .favorite-item:hover {
    border-color: var(--border-light);
}

.history-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
    .hero {
        padding: 48px 0 24px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9375rem;
    }

    .product-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .how-steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scan-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar {
        gap: 6px;
    }

    .alt-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .alt-card-top {
        flex-direction: column;
        align-items: center;
    }

    .alt-card-sponsor {
        justify-content: center;
    }
}

/* ========================================
   Utility
   ======================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ========================================
   Privacy Note
   ======================================== */
.privacy-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    line-height: 1.6;
}

.privacy-note strong {
    color: var(--text-secondary);
}

/* Nav button styling */
.nav-btn {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--black-lighter);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ========================================
   Account View
   ======================================== */
.account-card {
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.account-row:last-child {
    border-bottom: none;
}

.account-label {
    color: var(--text-muted);
}

.account-value {
    color: var(--text-primary);
    font-weight: 500;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--green-bg);
    color: var(--green);
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}
