/* Pokémon Bank Transfer Helper — Styles */
:root {
    --red: #e3350d;
    --red-dark: #b82a0a;
    --blue: #3b4cca;
    --blue-light: #4a5cd4;
    --gold: #e6bc2f;
    --gold-light: #f5d547;
    --bg: #f9f9fb;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #555;
    --border: #e0e0e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-sm: 6px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --max-width: 1100px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 3px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
}

.logo svg {
    flex-shrink: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.15s;
}

.main-nav a:hover {
    color: var(--red);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--blue) 0%, #2a3a9c 100%);
    color: #fff;
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.92;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold-light);
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Main content */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    width: 100%;
}

/* Tab bar */
.tab-bar {
    display: flex;
    gap: 0.25rem;
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.35rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    flex: 1;
    min-width: 90px;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    white-space: nowrap;
}

.tab:hover {
    background: #f0f0f5;
}

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

/* Tab panels */
.tab-panels {
    background: var(--card-bg);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    min-height: 350px;
}

.panel {
    padding: 1.5rem;
}

.panel[hidden] {
    display: none;
}

.panel.active {
    display: block;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.panel-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.panel-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-secondary {
    background: #f0f0f5;
    color: var(--text);
}

.btn-secondary:hover {
    background: #e0e0e8;
}

.btn-danger {
    background: #fff;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-danger:hover {
    background: #ffeaea;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* Collection list */
.collection-list {
    display: grid;
    gap: 0.75rem;
}

.pokemon-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fafafd;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: box-shadow 0.15s;
}

.pokemon-card:hover {
    box-shadow: var(--shadow-hover);
}

.pokemon-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pokemon-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.pokemon-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-shiny {
    background: #fff3cd;
    color: #856404;
}

.badge-ha {
    background: #d4edda;
    color: #155724;
}

.badge-event {
    background: #cce5ff;
    color: #004085;
}

.badge-game {
    background: #e8daef;
    color: #5b2c6f;
}

.pokemon-priority {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.priority-high {
    color: var(--red);
    font-weight: 700;
}

.priority-medium {
    color: var(--gold);
    font-weight: 600;
}

.priority-low {
    color: var(--blue);
}

.pokemon-actions {
    display: flex;
    gap: 0.35rem;
}

/* Priority list */
.priority-list {
    display: grid;
    gap: 0.5rem;
}

.priority-row {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #fafafd;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.priority-rank {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--red);
    text-align: center;
}

/* Storage */
.storage-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 700px) {
    .storage-content {
        grid-template-columns: 1fr;
    }
}

.storage-card {
    background: #fafafd;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.storage-card h3 {
    margin-bottom: 1rem;
}

.box-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.box-icon {
    width: 40px;
    height: 40px;
    background: var(--blue);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.box-icon.empty {
    background: #e0e0e8;
    color: #999;
}

/* Timeline */
.timeline-list {
    list-style: none;
    counter-reset: timeline;
    padding-left: 0;
}

.timeline-list li {
    counter-increment: timeline;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-list li::before {
    content: counter(timeline);
    background: var(--blue);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Modal */
.add-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
}

.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 400;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Supporting content */
.supporting-content {
    margin-top: 2.5rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 750px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.content-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--blue);
}

.content-card p,
.content-card li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.mistakes-list,
.event-list {
    list-style: none;
    padding-left: 0;
}

.mistakes-list li,
.event-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f5;
}

.transfer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.transfer-table th {
    background: var(--blue);
    color: #fff;
    padding: 0.5rem;
    text-align: left;
}

.transfer-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Assumptions */
.assumptions-note {
    background: #fffbe6;
    border: 1px solid #ffe082;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
}

.assumptions-note h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.assumptions-note p {
    font-size: 0.9rem;
    color: #6d5e00;
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.25rem;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-inner a {
    color: var(--blue);
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

.footer-nav {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

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

    .hero-stats {
        gap: 0.75rem;
    }

    .stat {
        padding: 0.75rem 1rem;
        min-width: 90px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pokemon-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .priority-row {
        grid-template-columns: 30px 1fr;
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
