:root {
    --bg-base: #090c10;
    --bg-surface: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1f242c;
    --border-color: #30363d;
    --border-light: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-hover: #4f46e5;
    --accent-cyan: #38bdf8;
    
    --tag-master: #10b981;
    --tag-master-bg: rgba(16, 185, 129, 0.12);
    --tag-comp: #f59e0b;
    --tag-comp-bg: rgba(245, 158, 11, 0.12);
    --tag-fan: #a855f7;
    --tag-fan-bg: rgba(168, 85, 247, 0.12);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* App Header */
.app-header {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    gap: 8px;
    background: rgba(22, 27, 34, 0.8);
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.badge-soon {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.komga-status-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(22, 27, 34, 0.6);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.komga-status-link:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-rescan {
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-rescan:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

/* Content Area */
.content-wrapper {
    flex: 1;
    max-width: 1560px;
    width: 95%;
    margin: 0 auto;
    padding: 28px 24px 80px;
}

/* Search Hero */
.search-hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 40%, #8b949e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.search-box {
    max-width: 720px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 6px 8px 6px 18px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-right: 12px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.btn-search {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-search:hover {
    background: var(--accent-hover);
}

.btn-clear-search {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-search:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-box {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

/* Autocomplete Suggestions Dropdown */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% - 46px);
    left: 0;
    right: 0;
    background: #161b22;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(99, 102, 241, 0.15);
    z-index: 1000;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
    text-align: left;
}

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

.suggestion-item:hover,
.suggestion-item.active {
    background: rgba(99, 102, 241, 0.18);
}

.suggestion-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.suggestion-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.suggestion-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-highlight {
    color: #818cf8;
    font-weight: 800;
    text-decoration: underline;
}

.suggestion-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Filtros */
.filters-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 2px;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: #555;
}

.filter-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    color: #a5b4fc;
}

/* States */
.state-container {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-illustration {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.state-container h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

/* Results */
.results-container {
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.badge-count {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

/* Language and Category Sections */
.lang-section {
    margin-bottom: 36px;
}

.lang-header {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.category-block {
    margin-bottom: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.category-title {
    padding: 12px 18px;
    background: rgba(22, 27, 34, 0.6);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subcategory-header {
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.subcategory-header.master {
    color: #34d399;
}

.subcategory-header.comp {
    color: #fbbf24;
}

.subcat-actions {
    display: flex;
    gap: 8px;
}

.btn-batch {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-batch-seedhost {
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.btn-batch-seedhost:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.btn-batch-local {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

.btn-batch-local:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Hero Collection Cards (Horizontal Grid) */
.hero-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
    width: 100%;
}

.collection-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    gap: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collection-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.collection-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
}

.collection-hero-card.master {
    border-color: rgba(245, 158, 11, 0.45);
}
.collection-hero-card.master::before {
    background: linear-gradient(90deg, #f59e0b, #eab308, #10b981);
}
.collection-hero-card.master .hero-tag {
    color: #fbbf24;
}

.collection-hero-card.comp {
    border-color: rgba(56, 189, 248, 0.45);
}
.collection-hero-card.comp::before {
    background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
}
.collection-hero-card.comp .hero-tag {
    color: #38bdf8;
}

.collection-hero-card.crg {
    border-color: rgba(16, 185, 129, 0.45);
}
.collection-hero-card.crg::before {
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
}
.collection-hero-card.crg .hero-tag {
    color: #34d399;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #38bdf8;
    text-transform: uppercase;
}

.hero-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero-seedhost, .btn-hero-local {
    flex: 1 1 140px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}


.btn-hero-seedhost {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid #60a5fa;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-hero-seedhost:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-hero-local {
    background: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-hero-local:hover {
    background: #334155;
    border-color: #64748b;
    transform: translateY(-2px);
}

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

.hero-btn-title {
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-btn-sub {
    font-size: 0.72rem;
    opacity: 0.85;
}

/* Item Row */
.items-list {
    display: flex;
    flex-direction: column;
}

.item-row {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 16px;
    transition: background 0.15s ease;
}

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

.item-row:hover {
    background: var(--bg-card);
}

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

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.badge-size {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.badge-source {
    color: var(--text-muted);
}

/* Quality Pills */
.pill-quality {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.pill-quality.master {
    background: var(--tag-master-bg);
    color: var(--tag-master);
}

.pill-quality.comp {
    background: var(--tag-comp-bg);
    color: var(--tag-comp);
}

.pill-quality.fan {
    background: var(--tag-fan-bg);
    color: var(--tag-fan);
}

/* Action Buttons */
.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-download-seedhost {
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: #60a5fa;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-download-seedhost:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.btn-download-local {
    background: #1e222a;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-download-local:hover {
    background: #282f3a;
    color: var(--text-primary);
    border-color: #555;
}

/* Floating Download Drawer */
.download-drawer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.drawer-header {
    background: var(--bg-card);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.drawer-tasks {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
}

.task-item {
    background: var(--bg-card);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.task-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    align-items: center;
}

.task-top-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.task-cancel-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.task-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.7);
}

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

.task-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    transition: width 0.3s ease;
}

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

.task-status-text.completed {
    color: #10b981;
    font-weight: 600;
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #1e293b;
    border: 1px solid var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .header-left {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }
    .header-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    .item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .download-drawer {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 16px;
    }
}


/* ==========================================================================
   SOURCE TABS & TOMOSMANGA STYLES (OPCIÓN A)
   ========================================================================== */

.source-nav-tabs {
    display: flex;
    gap: 12px;
    margin: 20px 0 24px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.source-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.source-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.source-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(56, 189, 248, 0.18) 100%);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 14px var(--accent-glow);
}

.badge-source-count {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.source-tab.active .badge-source-count {
    background: var(--accent-cyan);
    color: #090c10;
}

.source-view-content {
    animation: fadeIn 0.2s ease;
}

/* TomosManga Cards */
.tomos-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}

.tomos-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.tomos-header-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tomos-cover {
    width: 100px;
    height: 145px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.tomos-meta {
    flex: 1;
}

.tomos-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tomos-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.badge-tm-digital {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-tm-pass {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-tm-count {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
}

.tomos-desc-note {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Banner de Colección Completa en 1 Click */
.tomos-collection-banner {
    margin: 18px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.tomos-collection-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tomos-collection-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tomos-collection-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-tomos-collection-all {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-tomos-collection-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6);
}

.btn-tomos-collection-local {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-tomos-collection-local:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.6);
}

/* Grilla de Packs Individuales */
.tomos-packs-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 18px 0 10px 0;
}

.tomos-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 12px;
}

.tomos-pack-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.tomos-pack-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-card);
}

.tomos-pack-item.resolved {
    border-left: 3px solid #10b981;
}

.tomos-pack-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-tomos-dl {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-tomos-dl:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-tomos-local {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-tomos-local:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.pack-unresolved-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.pack-unresolved-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.btn-tomos-open, .btn-open-ouo {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s ease;
}

.btn-tomos-open:hover, .btn-open-ouo:hover {
    background: rgba(245, 158, 11, 0.3);
}

.btn-paste-link {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s ease;
}

.btn-paste-link:hover {
    background: rgba(56, 189, 248, 0.3);
}

.paste-box-row {
    display: flex;
    gap: 6px;
}

.paste-input-field {
    flex: 1;
    background: #090c10;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #fff;
}

.paste-input-field:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.btn-paste-save-action {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-paste-save-action:hover {
    background: var(--accent-hover);
}

/* ==========================================================================
   DUAL LANGUAGE COLUMNS LAYOUT (ESPAÑOL IZQUIERDA | INGLÉS DERECHA)
   ========================================================================== */

.dual-lang-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dual-lang-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.lang-column {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    min-height: 250px;
    transition: border-color 0.2s ease;
}

.lang-column:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}

.column-header-es {
    border-bottom-color: #38bdf8;
}

.column-header-en {
    border-bottom-color: #a855f7;
}

.col-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.flag-icon {
    font-size: 1.4rem;
}

.badge-col-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
}

.column-header-es .badge-col-count {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.column-header-en .badge-col-count {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.column-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.column-content .collection-hero-card {
    padding: 18px 20px;
    margin-bottom: 4px;
}

.column-content .collection-hero-card .hero-title {
    font-size: 1.15rem;
}

.column-content .item-row {
    padding: 10px 14px;
}

.column-content .item-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.column-content .tomos-card {
    padding: 18px;
    margin-bottom: 8px;
}

.column-content .tomos-title {
    font-size: 1.15rem;
}

.column-content .tomos-cover {
    width: 75px;
    height: 110px;
}

.column-content .tomos-packs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

/* ==========================================================================
   LANGUAGE TABS LAYOUT (ESPAÑOL VS INGLÉS)
   ========================================================================== */

.lang-nav-tabs {
    display: flex;
    gap: 12px;
    margin: 20px 0 24px 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.lang-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(56, 189, 248, 0.18) 100%);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 16px var(--accent-glow);
}

.tab-flag {
    font-size: 1.3rem;
}

.badge-tab-count {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.lang-tab.active .badge-tab-count {
    background: var(--accent-cyan);
    color: #090c10;
}

.lang-view-content {
    animation: fadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lang-view-content.hidden {
    display: none !important;
}

/* ==========================================================================
   SPANISH TAB: 2-COLUMN SPLIT (TOMOSMANGA VS EUROCOMICSS)
   ========================================================================== */

.es-columns-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.25fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1060px) {
    .es-columns-layout {
        grid-template-columns: 1fr;
    }
}

.es-column {
    background: rgba(18, 22, 32, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.es-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.es-col-header.tm-header {
    border-bottom-color: rgba(56, 189, 248, 0.35);
}

.es-col-header.euro-header {
    border-bottom-color: rgba(245, 158, 11, 0.35);
}

.es-col-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.es-col-icon {
    font-size: 1.6rem;
}

.es-col-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.es-col-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.es-col-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.col-empty-card {
    text-align: center;
    padding: 36px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
}

.col-empty-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.7;
}

.col-empty-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.col-empty-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.es-col-tomos .tomos-card {
    margin-bottom: 0;
}

.es-col-tomos .tomos-packs-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.es-col-euro .hero-collections-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.pack-actions-unresolved {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-paste-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-sm);
    color: #c084fc;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-paste-link:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* ==========================================================================
   SPANISH TAB: VIEW SWITCHER & WIDE CARDS
   ========================================================================== */

.es-view-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.view-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-switch-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.view-switch-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.es-columns-layout {
    display: grid;
    grid-template-columns: minmax(460px, 1fr) minmax(520px, 1.2fr);
    gap: 28px;
    align-items: start;
    width: 100%;
}

.es-columns-layout.view-euro-only,
.es-columns-layout.view-tomos-only {
    grid-template-columns: 1fr !important;
}

@media (max-width: 1180px) {
    .es-columns-layout {
        grid-template-columns: 1fr;
    }
}

.es-column {
    background: rgba(18, 22, 32, 0.55);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    width: 100%;
    min-width: 0;
}

.es-col-tomos .tomos-card {
    padding: 24px;
    margin-bottom: 0;
}

.es-col-tomos .tomos-packs-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.tomos-pack-item {
    padding: 12px 16px;
    min-height: 48px;
}

.tomos-pack-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.es-col-euro .item-row {
    padding: 14px 20px;
}

.es-col-euro .item-title {
    font-size: 1rem;
    font-weight: 600;
}

.es-col-euro .hero-collections-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   SOURCE SUB-TABS INSIDE ESPAÑOL (EUROCOMICSS VS TOMOSMANGA)
   ========================================================================== */

.source-sub-tabs {
    display: flex;
    gap: 12px;
    margin: 8px 0 24px 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 14px;
}

.source-sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.source-sub-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.source-sub-tab#tab-src-euro.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.16) 100%);
    border-color: #f59e0b;
    color: #fff;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.source-sub-tab#tab-src-tomos.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(99, 102, 241, 0.16) 100%);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 16px var(--accent-glow);
}

.sub-tab-icon {
    font-size: 1.3rem;
}

.badge-sub-count {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.source-sub-tab.active .badge-sub-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.source-subview {
    animation: fadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.source-subview.hidden {
    display: none !important;
}

/* En vista completa (100% ancho), packs y hero cards aprovechan todo el espacio */
.source-subview .tomos-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.source-subview .hero-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.source-subview .item-row {
    padding: 14px 22px;
}

.source-subview .item-title {
    font-size: 1.02rem;
    font-weight: 600;
}

/* ==========================================================================
   SELECCIÓN INTERMEDIA DE SERIES / EDICIONES
   ========================================================================== */

.series-selection-hero {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.95) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.series-selection-info {
    flex: 1;
    min-width: 260px;
}

.series-selection-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.series-selection-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.btn-view-all-flat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-view-all-flat:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

/* Grid de tarjetas de serie */
.series-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.series-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.series-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: transparent;
    transition: background 0.25s ease;
}

.series-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.2);
    background: var(--bg-card-hover);
}

.series-card.source-euro:hover::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.series-card.source-tomos:hover::before {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.series-card-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.series-card-cover {
    width: 76px;
    height: 108px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.series-card-cover-placeholder {
    width: 76px;
    height: 108px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.series-card-content {
    flex: 1;
    min-width: 0;
}

.series-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.series-badge-source {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.series-badge-source.euro {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.series-badge-source.comp {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.series-badge-source.fansub {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.series-badge-source.tomos {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.series-badge-source.crg {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.series-badge-quality {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.series-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 6px;
    word-break: break-word;
}

.series-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.series-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.series-card-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-select-series {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-select-series:hover {
    background: var(--accent-hover);
    transform: translateX(2px);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.4);
}

/* Barra de navegación superior al estar dentro de una serie */
.series-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back-to-series {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-back-to-series:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.series-detail-title-badge {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.series-detail-title-badge strong {
    color: #fff;
    margin-left: 4px;
}
