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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #e63946 0%, #0f3460 50%, #3498db 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 3px solid #f4d03f;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='14' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3Cline x1='16' y1='30' x2='44' y2='30' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.app-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.nav-link.active {
    color: #1a1a2e;
    background: #f4d03f;
    border-color: #f4d03f;
}

/* Main */
.app-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Hero */
.master-hero {
    text-align: center;
    padding: 2rem 1rem;
}

.master-hero h2 {
    font-size: 1.8rem;
    color: #f4d03f;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    padding: 1rem 0 1.5rem;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

#pokemon-search {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    background: #16213e;
    color: #e0e0e0;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#pokemon-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#pokemon-search:focus {
    border-color: #f4d03f;
    box-shadow: 0 0 8px rgba(244, 208, 63, 0.3);
}

/* Autocomplete Dropdown */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e2a4a;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.autocomplete-list.visible {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e0e0e0;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #2a3a5a;
}

.autocomplete-item .match {
    font-weight: 700;
    color: #f4d03f;
}

.autocomplete-item .poke-id {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* My Collections Section */
.my-collections-section {
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.my-collections-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: rgba(15, 52, 96, 0.4);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.my-collections-toggle:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #fff;
    border-color: rgba(52, 152, 219, 0.4);
}

.my-collections-toggle[aria-expanded="true"] {
    border-radius: 10px 10px 0 0;
    border-bottom-color: transparent;
}

.collections-toggle-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.my-collections-toggle[aria-expanded="true"] .collections-toggle-arrow {
    transform: rotate(90deg);
}

.my-collections-content {
    background: rgba(15, 52, 96, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.my-collections-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Collection Item */
.collection-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(22, 33, 62, 0.6);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.collection-item:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateX(2px);
}

.collection-item.active {
    border-color: #f4d03f;
    background: rgba(244, 208, 63, 0.08);
}

.collection-item-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.collection-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.collection-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-item-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-item-stats {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.collection-mini-bar {
    flex: 1;
    max-width: 80px;
    height: 4px;
    background: rgba(15, 52, 96, 0.8);
    border-radius: 2px;
    overflow: hidden;
}

.collection-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #f4d03f, #f39c12);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.collection-item-date {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.35);
}

.collection-item-delete {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(231, 76, 60, 0.15);
    color: rgba(231, 76, 60, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.collection-item-delete:hover {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    transform: scale(1.15);
}

/* Show All Toggle */
.collections-show-all {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgba(52, 152, 219, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem;
    text-align: center;
    transition: color 0.15s ease;
}

.collections-show-all:hover {
    color: #3498db;
}

/* Empty State */
.collections-empty {
    text-align: center;
    padding: 1.25rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    line-height: 1.5;
}

.collections-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

/* Config Panel */
.config-panel {
    display: none;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem 1.5rem;
    margin: 0 auto 1.5rem;
    max-width: 700px;
    background: rgba(15, 52, 96, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
}

.config-panel.visible {
    display: flex;
}

.config-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.config-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.config-option input[type="checkbox"] {
    accent-color: #f4d03f;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.sort-select {
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.6)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.sort-select:hover {
    background-color: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
}

.sort-select:focus {
    outline: none;
    border-color: #f4d03f;
    box-shadow: 0 0 6px rgba(244, 208, 63, 0.3);
}

.sort-select option {
    background: #1e2a4a;
    color: #e0e0e0;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 52, 96, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-bar-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-select {
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.35rem 1.5rem 0.35rem 0.6rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    max-width: 160px;
}

.filter-select:hover {
    background-color: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
}

.filter-select:focus {
    outline: none;
    border-color: #f4d03f;
}

.filter-select option {
    background: #1e2a4a;
    color: #e0e0e0;
}

.price-filter-group,
.status-filter-group,
.variant-filter-group {
    display: flex;
    gap: 0.3rem;
}

.filter-btn {
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
}

.filter-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.clear-filters-btn {
    background: rgba(231, 76, 60, 0.15);
    color: rgba(231, 76, 60, 0.9);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 0.35rem 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.6);
    color: #fff;
}

/* Filter Count */
.filter-count {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.filter-count:empty {
    display: none;
}

/* Results Summary / Progress Section */
.results-summary {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
}

.results-summary:empty {
    display: none;
}

.progress-section {
    text-align: center;
    margin-bottom: 1rem;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1rem;
    background: rgba(15, 52, 96, 0.6);
    border-radius: 10px;
    height: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f4d03f, #f39c12);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Progress Stats Row */
.progress-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Summary Stats */
.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.summary-stat .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f4d03f;
}

.summary-stat .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Set Breakdown Section */
.set-breakdown-section {
    text-align: center;
    margin-top: 0.5rem;
}

.set-breakdown-toggle {
    background: rgba(15, 52, 96, 0.4);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.set-breakdown-toggle:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #fff;
}

.toggle-arrow {
    font-size: 0.65rem;
    margin-left: 0.4rem;
}

.set-breakdown-content {
    margin-top: 0.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.set-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.set-breakdown-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.set-breakdown-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.set-breakdown-item:last-child {
    border-bottom: none;
}

.set-breakdown-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.set-breakdown-name {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.set-breakdown-name:hover {
    color: #f4d03f;
}

.set-breakdown-year {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.set-breakdown-mini-bar {
    width: 100%;
    max-width: 120px;
    height: 4px;
    background: rgba(15, 52, 96, 0.6);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.15rem;
}

.set-breakdown-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #f4d03f, #f39c12);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.set-breakdown-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.set-breakdown-stats {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.set-breakdown-cost {
    font-size: 0.7rem;
    color: rgba(46, 204, 113, 0.8);
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.export-csv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.export-csv-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
    transform: scale(1.03);
}

.export-csv-btn svg {
    flex-shrink: 0;
}

.export-all-btn {
    background: rgba(15, 52, 96, 0.4);
    border-color: rgba(52, 152, 219, 0.2);
    color: rgba(255, 255, 255, 0.65);
}

.export-all-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
    color: #fff;
}

.backup-btn,
.restore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.backup-btn:hover,
.restore-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
    transform: scale(1.03);
}

.backup-btn svg,
.restore-btn svg {
    flex-shrink: 0;
}

.restore-btn {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.3);
}

.restore-btn:hover {
    background: rgba(39, 174, 96, 0.4);
    border-color: rgba(39, 174, 96, 0.6);
}

.priority-summary {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #f4d03f;
    font-weight: 600;
}

/* Binder Grid */
.binder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #1e2a4a;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.binder-grid:empty {
    display: none;
}

/* Binder Page Label */
.binder-page-label {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 0.25rem 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Binder Page Divider */
.binder-page-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.3), transparent);
    margin: 0.5rem 0;
}

/* Binder Card */
.binder-card {
    aspect-ratio: 2.5 / 3.5;
    border-radius: 8px;
    background: #16213e;
    border: 1px solid rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.binder-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(52, 152, 219, 0.5);
}

/* Card Image Container */
.card-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image-container img.loaded {
    opacity: 1;
}

/* Image Placeholder */
.card-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    border: 2px dashed rgba(52, 152, 219, 0.2);
    border-radius: 6px;
    margin: 4px;
    text-align: center;
    padding: 0.5rem;
}

.card-image-placeholder.error {
    border-color: rgba(231, 76, 60, 0.3);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Card Overlay Info */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.card-overlay .card-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-overlay .card-set {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-overlay .card-rarity {
    font-size: 0.55rem;
    color: #f4d03f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-overlay .card-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2ecc71;
}

/* Price color coding */
.card-price.price-ultra {
    color: #f4d03f;
    text-shadow: 0 0 4px rgba(244, 208, 63, 0.4);
}

.card-price.price-high {
    color: #e8c547;
}

/* Card Meta Row */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Collected Toggle Button */
.collected-toggle {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.collected-toggle:hover {
    border-color: #4caf50;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.15);
    transform: scale(1.15);
}

.collected-toggle.active {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.collected-toggle.active:hover {
    background: #388e3c;
    border-color: #388e3c;
    transform: scale(1.15);
}

/* Collected Overlay */
.collected-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 5;
    background: rgba(46, 204, 113, 0.12);
}

.collected-overlay span {
    background: rgba(76, 175, 80, 0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Collected Card State */
.binder-card.collected .collected-overlay {
    opacity: 1;
}

.binder-card.collected .card-image-container img.loaded {
    opacity: 0.7;
}

.binder-card.collected {
    border-color: rgba(76, 175, 80, 0.3);
}

/* Variant Badge */
.variant-badge {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    background: rgba(52, 152, 219, 0.85);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 8;
}

/* Priority Star Button */
.priority-toggle {
    position: absolute;
    top: 0.4rem;
    left: 2.2rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.priority-toggle:hover {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.15);
    transform: scale(1.15);
}

.priority-toggle.active {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.25);
    text-shadow: 0 0 6px rgba(244, 208, 63, 0.5);
}

/* Priority Card Glow */
.binder-card.priority {
    border-color: rgba(244, 208, 63, 0.4);
    box-shadow: 0 0 8px rgba(244, 208, 63, 0.15);
}

/* Collection Pulse Animation */
@keyframes collect-pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.binder-card.collect-pulse {
    animation: collect-pulse 0.4s ease-out;
}

/* ============================================================ */
/* Binder Mode Toggle                                            */
/* ============================================================ */

.binder-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.binder-mode-toggle:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
}

.binder-mode-toggle.active {
    background: rgba(230, 126, 34, 0.25);
    border-color: rgba(230, 126, 34, 0.6);
    color: #e67e22;
}

.binder-mode-toggle.active:hover {
    background: rgba(230, 126, 34, 0.35);
    border-color: rgba(230, 126, 34, 0.8);
}

.print-placeholders-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.print-placeholders-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
    color: #fff;
}

/* ============================================================ */
/* Cameos Toggle                                                 */
/* ============================================================ */

.cameos-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 52, 96, 0.6);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: not-allowed;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.cameos-toggle.has-cameos {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(155, 89, 182, 0.3);
    cursor: pointer;
    opacity: 1;
}

.cameos-toggle.has-cameos:hover {
    background: rgba(155, 89, 182, 0.25);
    border-color: rgba(155, 89, 182, 0.5);
    color: #fff;
}

.cameos-toggle.active {
    background: rgba(155, 89, 182, 0.3);
    border-color: rgba(155, 89, 182, 0.6);
    color: #bb8fce;
}

.cameos-toggle.active:hover {
    background: rgba(155, 89, 182, 0.4);
    border-color: rgba(155, 89, 182, 0.8);
}

.cameos-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ============================================================ */
/* Cameos Section                                                */
/* ============================================================ */

.cameos-section {
    background: rgba(155, 89, 182, 0.08);
    border: 1px solid rgba(155, 89, 182, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.cameos-header {
    margin-bottom: 1rem;
    text-align: center;
}

.cameos-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #bb8fce;
    margin-bottom: 0.25rem;
}

.cameos-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.cameos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.cameo-card {
    background: rgba(155, 89, 182, 0.12);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.cameo-card:hover {
    background: rgba(155, 89, 182, 0.2);
    border-color: rgba(155, 89, 182, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.15);
}

.cameo-image-container {
    width: 100%;
    aspect-ratio: 2.5 / 3.5;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.cameo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cameo-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    border: 2px dashed rgba(155, 89, 182, 0.2);
    border-radius: 6px;
    text-align: center;
    padding: 0.5rem;
}

.cameo-image-placeholder.error {
    border-color: rgba(155, 89, 182, 0.4);
    color: rgba(255, 255, 255, 0.5);
}

.cameo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.cameo-badge {
    font-size: 0.55rem;
    font-weight: 800;
    color: #9b59b6;
    letter-spacing: 1.5px;
    border: 1px solid rgba(155, 89, 182, 0.5);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-bottom: 0.2rem;
}

.cameo-set {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
}

.cameo-number {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.cameo-note {
    font-size: 0.65rem;
    color: rgba(187, 143, 206, 0.8);
    font-style: italic;
    margin-top: 0.15rem;
}

/* Cameo Modal */
.cameo-modal .cameo-modal-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9b59b6;
    letter-spacing: 1px;
    border: 1px solid rgba(155, 89, 182, 0.5);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.cameo-modal .detail-note {
    background: rgba(155, 89, 182, 0.2);
    color: rgba(187, 143, 206, 0.9);
    font-style: italic;
}

/* ============================================================ */
/* Placeholder Card (Binder Mode)                                */
/* ============================================================ */

.binder-card.placeholder {
    border: 2px dashed rgba(230, 126, 34, 0.5);
    background: rgba(15, 20, 40, 0.8);
}

.binder-card.placeholder:hover {
    border-color: rgba(230, 126, 34, 0.8);
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.15);
}

.binder-card.placeholder.priority {
    border-color: rgba(244, 208, 63, 0.6);
    box-shadow: 0 0 8px rgba(244, 208, 63, 0.15);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    gap: 0.2rem;
    width: 100%;
    height: 100%;
}

.placeholder-need-badge {
    font-size: 0.55rem;
    font-weight: 800;
    color: #e67e22;
    letter-spacing: 1.5px;
    border: 1.5px solid rgba(230, 126, 34, 0.6);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.3rem;
}

.placeholder-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.placeholder-set {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.placeholder-number {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
}

.placeholder-rarity {
    font-size: 0.5rem;
    color: #f4d03f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.placeholder-variant {
    font-size: 0.5rem;
    color: #3498db;
    font-weight: 700;
    text-transform: uppercase;
}

.placeholder-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2ecc71;
    margin-top: 0.2rem;
}

.placeholder-price.price-ultra {
    color: #f4d03f;
    text-shadow: 0 0 4px rgba(244, 208, 63, 0.4);
}

.placeholder-price.price-high {
    color: #e8c547;
}

/* ============================================================ */
/* Card Modal                                                    */
/* ============================================================ */

.card-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

.card-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.card-modal {
    max-width: 420px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.card-modal-image {
    width: 100%;
    max-width: 350px;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-modal-image img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
}

.modal-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border: 2px dashed rgba(52, 152, 219, 0.3);
    border-radius: 12px;
}

.card-modal-info {
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-details {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.modal-details span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.detail-variant {
    background: rgba(52, 152, 219, 0.3) !important;
    color: #fff !important;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2ecc71;
}

.modal-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.modal-collect-btn {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 2px solid #4caf50;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.modal-collect-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: scale(1.05);
}

.modal-collect-btn.active {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.modal-collect-btn.active:hover {
    background: #388e3c;
    border-color: #388e3c;
}

.modal-tcgplayer-link {
    display: inline-block;
    color: #3498db;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 15px;
    transition: all 0.2s ease;
}

.modal-tcgplayer-link:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: #3498db;
    color: #fff;
}

.card-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10000;
}

.card-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading & Unavailable Messages */
.loading-message,
.unavailable-message,
.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.unavailable-message p {
    margin-bottom: 0.75rem;
}

.unavailable-message p:last-child {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Loading Spinner */
.loading-spinner-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-top-color: #f4d03f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-spinner-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Loading Skeleton Cards */
.skeleton-card {
    aspect-ratio: 2.5 / 3.5;
    border-radius: 8px;
    background: linear-gradient(110deg, #16213e 8%, #1e2a4a 18%, #16213e 33%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s linear infinite;
    border: 1px solid rgba(52, 152, 219, 0.15);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State: No Pokémon Selected */
.empty-state-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 1rem;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    opacity: 0.15;
}

.empty-state-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 320px;
    line-height: 1.5;
}

.empty-state-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Empty State: No Cards Match Filters */
.no-match-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    gap: 0.75rem;
    text-align: center;
}

.no-match-icon {
    font-size: 2.5rem;
    opacity: 0.25;
}

.no-match-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
    line-height: 1.5;
}

.no-match-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Binder Grid Fade Transition */
.binder-grid.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.binder-grid.fade-in {
    opacity: 1;
    transition: opacity 0.25s ease-in;
}

/* Disclaimer */
.master-disclaimer {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 52, 96, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.disclaimer-date {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .my-collections-section {
        max-width: 100%;
    }

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

    .header-nav {
        gap: 0.35rem;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .config-panel {
        padding: 0.75rem 1rem;
    }

    .master-hero h2 {
        font-size: 1.5rem;
    }

    .card-modal {
        max-width: 320px;
    }

    .card-modal-image {
        max-width: 280px;
    }

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

    .cameos-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .binder-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .search-container {
        max-width: 100%;
    }

    #pokemon-search {
        width: 100%;
    }

    .header-content {
        justify-content: center;
        text-align: center;
    }

    .header-nav {
        justify-content: center;
        margin-left: 0;
    }

    .sort-controls {
        flex-direction: column;
        align-items: center;
    }

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

    .filter-bar {
        overflow-x: auto;
    }

    .filter-bar-inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: max-content;
    }

    .master-hero h2 {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .progress-stats {
        gap: 1rem;
    }

    .summary-stat .stat-value {
        font-size: 1rem;
    }

    .card-modal-close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .cameos-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sort-controls {
        gap: 0.5rem;
    }

    .cameos-toggle,
    .binder-mode-toggle,
    .print-placeholders-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

/* ============================================================ */
/* Focus States for Accessibility                                */
/* ============================================================ */

.binder-card:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.collected-toggle:focus-visible,
.priority-toggle:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
    transform: scale(1.2);
}

.filter-btn:focus-visible,
.export-csv-btn:focus-visible,
.backup-btn:focus-visible,
.restore-btn:focus-visible,
.clear-filters-btn:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
}

.sort-select:focus-visible,
.filter-select:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
    border-color: #f4d03f;
    box-shadow: 0 0 6px rgba(244, 208, 63, 0.3);
}

.autocomplete-item:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: -2px;
    background: #2a3a5a;
}

.nav-link:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
}

.my-collections-toggle:focus-visible,
.set-breakdown-toggle:focus-visible,
.collections-show-all:focus-visible,
.modal-collect-btn:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
}

.collection-item:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
    background: rgba(52, 152, 219, 0.15);
}

.collection-item-delete:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
}

/* ============================================================ */
/* Mobile Smooth Scroll & Touch Improvements                     */
/* ============================================================ */

@media (max-width: 768px) {
    .binder-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Pull-to-refresh visual hint for mobile */
    .pull-refresh-hint {
        text-align: center;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.3);
        padding: 0.4rem;
        letter-spacing: 0.5px;
    }
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .header-nav { display: none; width: 100%; flex-direction: column; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
    .header-nav.active { display: flex; }
    .nav-link { text-align: center; padding: 0.75rem 1rem; font-size: 1rem; }
    .header-content { flex-wrap: wrap; }
    .app-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
    .app-header { padding: 1rem; }
    .app-title { font-size: 1.2rem; }
    .nav-link { font-size: 0.9rem; padding: 0.6rem 0.75rem; }
}

/* Refresh Prices Button */
.refresh-prices-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-prices-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    transform: translateY(-1px);
}

.refresh-prices-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-prices-btn.loading svg {
    animation: spin 1s linear infinite;
}

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

.refresh-prices-btn .refresh-btn-text {
    white-space: nowrap;
}
