/* Global Reset & Custom Variables */
:root {
    --bg-main: #0c0d0f;
    --bg-card: rgba(23, 24, 29, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 42, 59, 0.15);
    
    --color-text-main: #e8e9eb;
    --color-text-muted: #9ba0aa;
    
    --accent-red: #ff2a3b;
    --accent-red-glow: rgba(255, 42, 59, 0.45);
    --accent-purple: #9b5de5;
    --accent-purple-glow: rgba(155, 93, 229, 0.45);
    --accent-yellow: #f1c40f;
    --accent-yellow-glow: rgba(241, 196, 15, 0.45);
    
    --success-green: #2ecc71;
    --success-green-glow: rgba(46, 204, 113, 0.2);
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-speed: 0.25s;
    --radius-lg: 16px;
    --radius-md: 8px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Atmospheric Ambient Glow Backgrounds */
.bg-glow {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.18;
}

.bg-glow-1 {
    background-color: var(--accent-red);
    top: 5%;
    right: -10%;
}

.bg-glow-2 {
    background-color: var(--accent-purple);
    bottom: 15%;
    left: -10%;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 600;
}

.cinzel-title {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 42, 59, 0.4);
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 6px;
    display: inline-block;
}

/* Header style */
.app-header {
    background: rgba(12, 13, 15, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: #ffffff;
    letter-spacing: 3px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(255, 42, 59, 0.6);
}

.logo-icon {
    color: var(--accent-red);
}

.user-status {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-status i {
    color: var(--accent-red);
}

/* Hero Section */
.welcome-hero {
    text-align: center;
    padding: 60px 0 40px;
}

.welcome-hero h2 {
    font-size: 2.8rem;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Cards & Layout Grid */
.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-2-1, .grid-3-1 {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.glass-card {
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.mosh-card {
    border-top: 3px solid var(--accent-red);
}

.border-glow {
    border-color: rgba(255, 42, 59, 0.35);
    box-shadow: 0 0 15px rgba(255, 42, 59, 0.08);
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.card-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-row {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

input[type="text"], select, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-speed) ease;
    width: 100%;
}

input[type="text"]:focus, select:focus, textarea:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 8px rgba(255, 42, 59, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    outline: none;
    transition: all var(--transition-speed) ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), #b3000f);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 42, 59, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 42, 59, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
}

.btn-primary-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--accent-red), #b3000f);
    color: #ffffff;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 42, 59, 0.2);
}

.btn-primary-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 42, 59, 0.35);
}

.btn-outline-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.btn-outline-sm:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-red);
}

/* Icon Colors */
.icon-red { color: var(--accent-red); }
.icon-purple { color: var(--accent-purple); }
.icon-yellow { color: var(--accent-yellow); }

/* Screens navigation */
.screen {
    display: none;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.screen.active {
    display: block;
}

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

/* Crew Header Section */
.crew-header-bar, .festival-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.tag-red {
    background: rgba(255, 42, 59, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 42, 59, 0.3);
}

/* Invite Links & Copy Alerts */
.invite-copier {
    display: flex;
    gap: 8px;
}

.invite-copier input {
    background: rgba(0, 0, 0, 0.25);
    color: var(--color-text-muted);
}

.success-alert {
    background-color: var(--success-green-glow);
    border: 1px solid var(--success-green);
    color: var(--success-green);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hide {
    display: none !important;
}

/* Member Badges */
.members-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.member-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.member-badge.me {
    border-color: var(--accent-red);
    background: rgba(255, 42, 59, 0.05);
    box-shadow: 0 0 8px rgba(255, 42, 59, 0.15);
}

/* Festival lists */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fest-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fest-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-red);
    transform: translateX(4px);
}

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

.fest-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.fest-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.fest-action {
    color: var(--accent-red);
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.1);
}

/* Back Link */
.back-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-red);
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 12px 20px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: var(--accent-red);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out forwards;
}

/* Drag & Drop Ranking List */
.drag-sort-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drag-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.drag-item:active {
    cursor: grabbing;
}

.drag-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.drag-item.dragging {
    opacity: 0.4;
    border-color: var(--accent-purple);
    background: rgba(155, 93, 229, 0.1);
    box-shadow: 0 0 15px rgba(155, 93, 229, 0.2);
}

.drag-handle {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.drag-rank {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--color-text-muted);
    width: 32px;
    text-align: right;
}

.drag-item:nth-child(1) .drag-rank { color: #f1c40f; text-shadow: 0 0 8px rgba(241, 196, 15, 0.4); } /* Gold */
.drag-item:nth-child(2) .drag-rank { color: #bdc3c7; } /* Silver */
.drag-item:nth-child(3) .drag-rank { color: #e67e22; } /* Bronze */

.drag-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Compare taste elements */
.comparison-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.vs-divider {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(255, 42, 59, 0.4);
}

.select-input {
    min-width: 200px;
}

.comparison-summary {
    display: flex;
    justify-content: center;
}

.metric-card {
    padding: 24px 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.metric-card h4 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.compare-item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-badge-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-badge-icon-heart {
    color: var(--accent-red);
}

.compare-badge-icon-bolt {
    color: var(--accent-yellow);
}

.compare-badge-ranks {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Compare Table */
.table-container {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 10px;
}

.compare-table th, .compare-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.compare-table th {
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.compare-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.rank-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

/* Stats Heatmap */
.matrix-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

#matrix-canvas {
    max-width: 100%;
    height: auto;
}

.stats-badge-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-band-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.stats-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Modal overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    position: relative;
    animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--accent-red);
}

.modal-body {
    padding: 16px 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 16px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-result-name {
    font-weight: 600;
}

.search-result-bands-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Animations & pulses */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.animate-pulse {
    animation: pulse 1.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    20%, 60% { transform: rotate(-5deg); }
    40%, 80% { transform: rotate(5deg); }
}

.animate-shake {
    animation: shake 1s infinite;
}

/* Glow Text */
.text-glow {
    text-shadow: 0 0 10px rgba(255, 42, 59, 0.2);
}

/* Autosave status indicator */
.autosave-status {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    justify-content: center;
}

.autosave-idle {
    color: transparent;
    border-color: transparent;
}

.autosave-unsaved {
    color: var(--accent-yellow);
    border-color: rgba(241, 196, 15, 0.25);
    background: rgba(241, 196, 15, 0.07);
}

.autosave-saving {
    color: var(--color-text-muted);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.autosave-saved {
    color: var(--success-green);
    border-color: rgba(46, 204, 113, 0.25);
    background: rgba(46, 204, 113, 0.07);
}

.autosave-error {
    color: var(--accent-red);
    border-color: rgba(255, 42, 59, 0.25);
    background: rgba(255, 42, 59, 0.07);
}

/* Right-click context menu for rank items */
.rank-context-menu {
    position: fixed;
    z-index: 9999;
    background: #1a1b21;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
    padding: 4px;
    min-width: 180px;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: ctxFadeIn 0.12s ease forwards;
}

.rank-context-menu.active {
    display: flex;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.ctx-item {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: background 0.1s ease, color 0.1s ease;
}

.ctx-item i {
    color: var(--accent-purple);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.ctx-item:hover {
    background: rgba(155, 93, 229, 0.15);
    color: #ffffff;
}

.ctx-item:hover i {
    color: var(--accent-purple);
}

/* Flash animation when item is moved via context menu */
@keyframes ctxMoved {
    0%   { background: rgba(155, 93, 229, 0.25); border-color: rgba(155, 93, 229, 0.6); }
    100% { background: rgba(255, 255, 255, 0.03); border-color: var(--border-color); }
}

.drag-item.ctx-moved {
    animation: ctxMoved 0.6s ease forwards;
}

/* Band filter bar */
.band-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.band-filter-bar:focus-within {
    border-color: rgba(155, 93, 229, 0.5);
    box-shadow: 0 0 8px rgba(155, 93, 229, 0.15);
}

.band-filter-icon {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.band-filter-input {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 4px 0;
    outline: none;
    flex: 1;
    width: 100%;
    box-shadow: none;
}

.band-filter-input:focus {
    border: none;
    box-shadow: none;
    background: transparent;
}

.band-filter-clear {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.band-filter-clear:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Two-panel ranking UI */
.ranking-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

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

.pool-panel, .rank-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.rank-panel {
    border-color: rgba(255, 42, 59, 0.2);
}

.panel-header {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.rank-panel .panel-header {
    background: rgba(255, 42, 59, 0.05);
    border-bottom-color: rgba(255, 42, 59, 0.15);
}

.panel-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: auto;
}

.pool-list, .rank-list {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
    gap: 6px;
}

.pool-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.15s ease;
    user-select: none;
}

.pool-item:hover {
    background: rgba(155, 93, 229, 0.1);
    border-color: rgba(155, 93, 229, 0.4);
    transform: translateX(2px);
}

.pool-item-readonly {
    cursor: default;
    opacity: 0.6;
}

.pool-item-readonly:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    transform: none;
}

.pool-add-icon {
    color: var(--accent-purple);
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.pool-item:hover .pool-add-icon {
    opacity: 1;
}

.rank-empty-msg {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.6;
}

.rank-remove-btn {
    background: transparent;
    border: none;
    color: rgba(255, 42, 59, 0.4);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
}

.rank-remove-btn:hover {
    color: var(--accent-red);
}
