/* Styles for Kho Nguồn Truyện - Novela Premium (Giao Diện Sáng Nền Trắng Chữ Xanh) */
:root {
    --bg-base: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --font-outfit: 'Outfit', sans-serif;
    --font-space: 'Space Grotesk', sans-serif;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    --purple: #6366f1;
    --purple-glow: rgba(99, 102, 241, 0.15);
    --blue: #2563eb;
    --blue-glow: rgba(37, 99, 235, 0.15);
    --gold: #d97706;
    --gold-glow: rgba(217, 119, 6, 0.12);
    --green: #059669;
    --green-glow: rgba(5, 150, 105, 0.12);
    
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(15, 23, 42, 0.08);
    --card-hover-border: #3b82f6;
    --card-hover-glow: rgba(37, 99, 235, 0.06);

    --smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-base);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-outfit);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Glowing background blobs (Pastel Light Theme version) */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}

.blob-purple {
    top: -10%;
    left: 15%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.blob-blue {
    bottom: -10%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.blob-gold {
    top: 35%;
    right: 20%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    animation: floatOrb 26s ease-in-out infinite alternate;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(8%, 12%) scale(1.15);
    }
}

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 250, 252, 0.2);
    backdrop-filter: saturate(120%) contrast(95%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header style */
header {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--purple), var(--gold));
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.75rem;
}

.logo-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    filter: blur(15px);
    opacity: 0.15;
    border-radius: 50px;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.4rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.logo-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.logo-text {
    font-family: var(--font-space);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #1e293b 40%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo .badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

header h1 {
    font-family: var(--font-space);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #0f172a 10%, #1d4ed8 70%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header .subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 3rem auto;
    font-weight: 500;
}

/* Stats dashboard */
.stats-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 840px;
    margin: 0 auto;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding-top: 2.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--smooth);
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

.stat-card:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.03);
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon-box.purple {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.stat-icon-box.blue {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.stat-icon-box.gold {
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.12);
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-space);
}

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

/* Controls section styling */
.controls-section {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
}

.search-main-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.25rem;
    pointer-events: none;
    transition: var(--smooth);
}

.search-bar-wrapper input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.75rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    color: #0f172a;
    font-family: var(--font-outfit);
    font-size: 1.1rem;
    outline: none;
    transition: var(--smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.search-bar-wrapper input:focus {
    border-color: var(--blue);
    background: #ffffff;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.12);
}

.search-bar-wrapper input:focus + .search-main-icon {
    color: var(--blue);
}

.clear-search-btn {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--smooth);
}

.clear-search-btn:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

/* Category Filters (Vibrant Colorful active buttons) */
.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    padding-top: 1.25rem;
}

.filter-header-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-flex {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tag-btn {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
    padding: 0.55rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-outfit);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.tag-btn:hover {
    background: #f8fafc;
    color: var(--text-main);
    border-color: rgba(15, 23, 42, 0.15);
    transform: translateY(-1px);
}

/* Tab specific colors when active */
.tag-btn.tag-all.active {
    background: #3b82f6;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tag-btn.tag-search.active {
    background: #10b981;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tag-btn.tag-explore.active {
    background: #8b5cf6;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.tag-btn.tag-manga.active {
    background: #f59e0b;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.tag-btn.tag-audio.active {
    background: #f43f5e;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

/* Content Area */
.content-main {
    flex-grow: 1;
    min-height: 400px;
}

/* Grid layout */
.sources-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.75rem;
}

/* Card layout */
.source-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.02);
}

.source-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    opacity: 0;
    transition: var(--smooth);
}

.source-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
    background: #ffffff;
}

.source-card:hover::after {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.source-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.source-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.badge-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tag.blue {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.badge-tag.purple {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.badge-tag.gold {
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.badge-tag.green {
    background: rgba(5, 150, 105, 0.08);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.badge-tag.gray {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.card-body {
    margin-bottom: 1.75rem;
}

.source-url {
    font-size: 0.82rem;
    color: var(--text-muted);
    word-break: break-all;
    font-family: monospace;
    background: rgba(15, 23, 42, 0.03);
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    margin-top: 0.85rem;
    max-height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--smooth);
}

.source-card:hover .source-url {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.source-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    padding-top: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-item i {
    font-size: 0.9rem;
}

.meta-author {
    color: #4f46e5;
    font-weight: 600;
}

.meta-dl {
    color: #1d4ed8;
    font-weight: 600;
}

.source-time-row {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-time-val {
    color: #b45309;
    font-weight: 600;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.85rem;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    font-family: var(--font-outfit);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: var(--smooth);
}

.btn-import {
    flex-grow: 1;
    background: linear-gradient(135deg, var(--blue), #3b82f6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-import:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px) scale(1.02);
}

.btn-copy {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text-main);
    width: 52px;
    padding: 0;
}

.btn-copy:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--blue);
    transform: translateY(-1px);
}

/* Loader styling */
.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    gap: 1.5rem;
    color: var(--text-muted);
}

.loading-ring {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.loading-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 52px;
    height: 52px;
    margin: 6px;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: loadingRing 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-top-color: var(--blue);
}

.loading-ring div:nth-child(1) { animation-delay: -0.45s; }
.loading-ring div:nth-child(2) { animation-delay: -0.3s; }
.loading-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes loadingRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.05rem;
    font-weight: 500;
}

/* Error panel */
.error-wrapper {
    position: relative;
    text-align: center;
    padding: 4.5rem 2.5rem;
    background: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 28px;
    max-width: 500px;
    margin: 3rem auto;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.02);
}

.error-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: rgba(239, 68, 68, 0.1);
    filter: blur(50px);
    z-index: -1;
}

.error-icon {
    font-size: 3.5rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
    animation: flash 2s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.7; }
    100% { opacity: 1; filter: drop-shadow(0 0 10px rgba(239,68,68,0.3)); }
}

.error-wrapper h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.error-wrapper p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.retry-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 14px;
    font-family: var(--font-outfit);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--smooth);
}

.retry-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.25);
}

/* Empty State */
.empty-wrapper {
    text-align: center;
    padding: 7rem 2rem;
    color: var(--text-muted);
}

.empty-ghost-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.35;
    animation: hoverGhost 3s ease-in-out infinite alternate;
}

@keyframes hoverGhost {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

.empty-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* Footer styling */
footer {
    text-align: center;
    padding: 4rem 1.5rem 1.5rem 1.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    margin-top: 4rem;
}

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

.links-row {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 1.25rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--smooth);
}

.footer-link:hover {
    color: var(--blue);
}

/* Float Toast */
.toast-notification {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 10000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
}

.toast-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 150, 105, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    z-index: -1;
}

.toast-content {
    padding: 0.95rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.25);
}

.toast-icon {
    font-size: 1.25rem;
}

/* Responsive design */
@media (max-width: 900px) {
    header h1 {
        font-size: 2.4rem;
    }
    
    .stats-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-top: 2rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 3rem 1.25rem;
        border-radius: 24px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls-section {
        padding: 1.25rem;
    }
    
    .search-bar-wrapper input {
        padding: 1.1rem 1.25rem 1.1rem 3.25rem;
        font-size: 1rem;
    }
    
    .search-main-icon {
        left: 1.25rem;
    }
    
    .sources-card-grid {
        grid-template-columns: 1fr;
    }
    
    .tag-btn {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }
}

/* Card Selection Styling (Like App Extension View) */
.card-select-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: var(--smooth);
    cursor: pointer;
    flex-shrink: 0;
}

.source-card.selected .card-select-badge {
    background: var(--blue);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.35);
}

.source-card .select-icon-check {
    display: none;
}

.source-card.selected .select-icon-plus {
    display: none;
}

.source-card.selected .select-icon-check {
    display: block;
}

.source-card.selected {
    border-color: var(--blue);
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.12);
    background: #ffffff;
}

/* Title and badges section */
.title-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
}

/* Selection Controls Row above Grid */
.selection-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
}

.select-all-actions {
    display: flex;
    gap: 1.25rem;
}

.text-btn {
    background: none;
    border: none;
    color: var(--blue);
    font-family: var(--font-outfit);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--smooth);
}

.text-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Floating Bottom Selection Bar (Compact dark pill styling like app) */
.selection-bar {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 0.5rem 0.6rem 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    width: auto;
    max-width: 90%;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.selection-bar.show {
    transform: translateX(-50%) translateY(0);
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

.selection-info i {
    color: var(--blue);
    font-size: 1rem;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-selection-clear {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-outfit);
    font-size: 0.88rem;
    transition: var(--smooth);
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    white-space: nowrap;
}

.btn-selection-clear:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-selection-copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--smooth);
}

.btn-selection-copy:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--blue);
}

.btn-selection-import {
    background: var(--blue);
    color: #ffffff;
    padding: 0.55rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--smooth);
}

.btn-selection-import:hover {
    background: #3b82f6;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}

@media (max-width: 600px) {
    .selection-bar {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.4rem 0.5rem 0.4rem 1rem;
        bottom: 1.5rem;
    }
}
