/* Enhanced Collection View Styles */

/* Collection Layout */
.collection-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.collection-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.collection-sidebar {
    width: 320px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Bar */
.collection-search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15), 0 4px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    transform: translateY(-1px);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}

.search-clear-btn:hover {
    background: #c53030;
}

/* Filter Rows */
.collection-filters-row,
.collection-display-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.collection-filters-row {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, rgba(29, 78, 216, 0.05) 100%);
    border-color: rgba(49, 130, 206, 0.2);
}

.collection-display-options {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(147, 51, 234, 0.05) 100%);
    border-color: rgba(168, 85, 247, 0.2);
}

.filter-group,
.display-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    position: relative;
}

.filter-group label,
.display-group label {
    font-size: 12px;
    color: #e2e8f0;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.display-group select {
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
}

.filter-group select:hover,
.display-group select:hover {
    border-color: rgba(49, 130, 206, 0.4);
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-group select:focus,
.display-group select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    transform: translateY(-1px);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: auto;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3182ce;
    cursor: pointer;
    border-radius: 4px;
}

/* Quick Filter Buttons */
.collection-quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(21, 128, 61, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.quick-filter-btn {
    padding: 10px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.quick-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.quick-filter-btn:hover {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.2) 0%, rgba(29, 78, 216, 0.1) 100%);
    border-color: rgba(49, 130, 206, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.quick-filter-btn:hover::before {
    left: 100%;
}

.quick-filter-btn.active {
    background: linear-gradient(135deg, #3182ce 0%, #1d4ed8 100%);
    border-color: #3182ce;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(49, 130, 206, 0.4);
}

.quick-filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.5);
}

/* Collection Grid Enhancements */
.card-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-height: 200px;
}

.card-list.view-grid {
    display: grid;
    gap: 12px;
}

.card-list.view-grid.grid-small {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.card-list.view-grid.grid-medium {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.card-list.view-grid.grid-large {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.card-list.view-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: none;
}

/* List Size Variations */
.card-list.view-list.list-small .card-list-item {
    min-height: 48px;
    padding: 8px 12px;
}

.card-list.view-list.list-small .card-icon {
    width: 32px;
    height: 32px;
}

.card-list.view-list.list-small .card-name {
    font-size: 13px;
}

.card-list.view-list.list-small .card-meta {
    font-size: 11px;
}

.card-list.view-list.list-medium .card-list-item {
    min-height: 64px;
    padding: 12px 16px;
}

.card-list.view-list.list-medium .card-icon {
    width: 48px;
    height: 48px;
}

.card-list.view-list.list-large .card-list-item {
    min-height: 80px;
    padding: 16px 20px;
}

.card-list.view-list.list-large .card-icon {
    width: 64px;
    height: 64px;
}

.card-list.view-list.list-large .card-name {
    font-size: 16px;
}

.card-list.view-list.list-large .card-meta {
    font-size: 13px;
}

/* Card List View */
.card-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    min-height: 64px;
}

.card-list-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(49, 130, 206, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-list-item .card-icon {
    width: 48px;
    height: 48px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-right: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.card-list-item .card-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0; /* Allows text truncation */
}

.card-list-item .card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.card-list-item .card-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-list-item .card-meta {
    font-size: 12px;
    color: #a0aec0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-list-item .card-meta .meta-separator {
    width: 3px;
    height: 3px;
    background: #4a5568;
    border-radius: 50%;
}

.card-list-item .card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.card-list-item .card-quantity {
    background: linear-gradient(135deg, #3182ce, #2563eb);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(49, 130, 206, 0.3);
}

.card-list-item .card-cost {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.card-list-item .card-rarity {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-list-item .card-rarity.common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.card-list-item .card-rarity.uncommon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.card-list-item .card-rarity.rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.card-list-item .card-rarity.legendary {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Statistics Panel */
.collection-stats-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.collection-stats-panel h4,
.collection-stats-panel h5 {
    color: #ffffff;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.collection-stats-panel h5 {
    font-size: 14px;
    margin-top: 20px;
}

.stats-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.stat-label {
    color: #a0aec0;
    font-size: 13px;
}

.stat-value {
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
}

/* Set Progress */
.set-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.set-progress-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.set-name {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #e2e8f0;
}

.set-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.set-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce, #63b3ed);
    transition: width 0.3s ease;
}

/* Rarity Stats */
.rarity-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rarity-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.rarity-stat.common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.rarity-stat.uncommon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.rarity-stat.rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.rarity-stat.legendary {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* Enhanced Sell Portal */
.sell-portal {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.1) 100%);
    border: 2px dashed #dc2626;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 4px 16px rgba(220, 38, 38, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.sell-portal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(220, 38, 38, 0.1) 50%, transparent 51%);
    background-size: 20px 20px;
    opacity: 0.3;
    pointer-events: none;
}

.sell-portal.drag-active {
    background: rgba(220, 38, 38, 0.15);
    border-color: #f87171;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.sell-portal.drag-over {
    background: rgba(220, 38, 38, 0.25);
    border-color: #ef4444;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.sell-portal h4 {
    color: #ffffff;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.sell-portal p {
    color: #a0aec0;
    margin: 0 0 15px 0;
    font-size: 13px;
}

.quick-sell-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 15px;
}

.sell-action-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 
        0 2px 8px rgba(220, 38, 38, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.sell-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sell-action-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 16px rgba(220, 38, 38, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.sell-action-btn:hover::before {
    left: 100%;
}

.sell-action-btn:active {
    transform: translateY(0px);
    box-shadow: 
        0 2px 8px rgba(220, 38, 38, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sell-action-btn.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 
        0 2px 8px rgba(34, 197, 94, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.portal-visual {
    width: 100px;
    height: 100px;
    border: 4px solid #dc2626;
    border-radius: 50%;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2) 0%, rgba(185, 28, 28, 0.1) 50%, transparent 100%);
    box-shadow: 
        0 0 20px rgba(220, 38, 38, 0.4),
        inset 0 0 20px rgba(220, 38, 38, 0.1);
    z-index: 1;
}

.portal-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.6) 0%, rgba(239, 68, 68, 0.3) 50%, transparent 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: portalPulse 2.5s infinite ease-in-out;
}

.portal-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='10' cy='16' rx='7' ry='4' fill='%23c9a84c' opacity='0.5'/%3E%3Cellipse cx='10' cy='14' rx='7' ry='4' fill='%23c9a84c' opacity='0.7'/%3E%3Cellipse cx='10' cy='12' rx='7' ry='4' fill='%23c9a84c'/%3E%3Cellipse cx='10' cy='12' rx='4.5' ry='2.5' fill='none' stroke='%23ffd54f' stroke-width='0.7' opacity='0.6'/%3E%3Ctext x='10' y='13.5' text-anchor='middle' font-size='5' font-weight='bold' fill='%23ffd54f' font-family='serif'%3EA%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    animation: portalFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.sell-portal.drag-active .portal-visual::before {
    animation: portalPulseActive 1s infinite;
}

.sell-portal.drag-over .portal-visual::before {
    animation: portalPulseOver 0.5s infinite;
}

@keyframes portalPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

@keyframes portalPulseActive {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.4; }
}

@keyframes portalPulseOver {
    0%, 100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.5; }
}

@keyframes portalFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-5px); }
}

/* Sell Preview */
.sell-preview {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    width: 100%;
}

.sell-preview h5 {
    color: #ffffff;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.preview-summary {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.confirm-btn {
    flex: 1;
    padding: 8px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.cancel-btn {
    flex: 1;
    padding: 8px;
    background: transparent;
    color: #a0aec0;
    border: 1px solid #4a5568;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

/* Recent Activity */
.recent-activity-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-activity-panel h4 {
    color: #ffffff;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 12px;
    color: #a0aec0;
}

.activity-placeholder {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 20px;
    font-size: 12px;
}

/* Card Enhancement States */
.card.favorited::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z' fill='%23c9a84c'/%3E%3Cpath d='M12 5l2 4.06 4.5.66-3.25 3.17.77 4.47L12 15.27l-4.02 2.11.77-4.47L5.5 9.72l4.5-.66z' fill='%23ffd54f' opacity='0.4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
}

.card.selected-for-sell {
    border: 2px solid #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.card.missing-card {
    opacity: 0.4;
    filter: grayscale(100%);
    position: relative;
}

.card.missing-card::after {
    content: 'Missing';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
}

/* Bulk Selection Mode */
.collection-main-area.bulk-select-mode .card {
    cursor: pointer;
    transition: all 0.2s;
}

.collection-main-area.bulk-select-mode .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bulk-select-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1000;
}

.bulk-select-info {
    color: #e2e8f0;
    font-size: 14px;
}

.bulk-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.bulk-sell-btn {
    background: #dc2626;
    color: white;
}

.bulk-cancel-btn {
    background: transparent;
    color: #a0aec0;
    border: 1px solid #4a5568;
}

/* Context Menu */
.card-context-menu {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    min-width: 180px;
}

.context-menu-item {
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.context-menu-item:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item:disabled {
    color: #6b7280;
    cursor: not-allowed;
}

/* Favorite Button */
.card-favorite-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: #ffd700;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-favorite-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Sell Button */
.card-sell-btn {
    position: absolute;
    top: 4px;
    right: 30px;
    background: rgba(220, 38, 38, 0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: #ffd700;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-sell-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

/* Quantity Badge */
.card-quantity-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #3182ce;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
    min-width: 16px;
    text-align: center;
}

/* Notifications */
.collection-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    animation: slideInNotification 0.3s ease forwards;
}

.collection-notification.success {
    background: #059669;
}

.collection-notification.error {
    background: #dc2626;
}

.collection-notification.warning {
    background: #d97706;
}

.collection-notification.info {
    background: #3182ce;
}

@keyframes slideInNotification {
    to {
        transform: translateX(0);
    }
}

/* Card Drag States */
.card.being-dragged {
    opacity: 0.5;
    transform: rotate(5deg) scale(0.95);
    z-index: 1000;
}

/* Portal Feedback */
.portal-feedback {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.portal-feedback.success {
    background: rgba(5, 150, 105, 0.2);
    color: #10b981;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.portal-feedback.error {
    background: rgba(220, 38, 38, 0.2);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.portal-feedback.info {
    background: rgba(49, 130, 206, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(49, 130, 206, 0.3);
}

/* Sell Quantity Modal */
.sell-quantity-modal .modal-content {
    max-width: 400px;
    background: #1a202c;
    border: 1px solid #4a5568;
    border-radius: 12px;
    padding: 24px;
}

.sell-quantity-modal h3 {
    color: #ffffff;
    margin: 0 0 16px 0;
    font-size: 18px;
    text-align: center;
}

.sell-quantity-modal p {
    color: #a0aec0;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 14px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.qty-btn {
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #2c5aa0;
}

#sell-qty-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #4a5568;
    border-radius: 6px;
    background: #2d3748;
    color: #ffffff;
    text-align: center;
    font-size: 14px;
}

#sell-qty-input:focus {
    outline: none;
    border-color: #3182ce;
}

.sell-preview-info {
    text-align: center;
    color: #68d391;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 8px;
    background: rgba(104, 211, 145, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(104, 211, 145, 0.2);
}

/* Smart Sell Modal */
.smart-sell-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.suggestions-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    border: 1px solid #4a5568;
    border-radius: 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #4a5568;
    gap: 12px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #3182ce;
}

.suggestion-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-reason {
    color: #a0aec0;
    font-size: 12px;
}

.suggestion-value {
    color: #68d391;
    font-size: 13px;
    font-weight: 500;
}

/* Modal Enhancements */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.modal-actions button.primary {
    background: #3182ce;
    color: white;
}

.modal-actions button.primary:hover {
    background: #2c5aa0;
}

.modal-actions button:not(.primary) {
    background: #4a5568;
    color: #e2e8f0;
}

.modal-actions button:not(.primary):hover {
    background: #2d3748;
}

/* No Cards Message */
.no-cards-message {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    padding: 40px;
    font-style: italic;
}

/* Set View */
.card-list.view-sets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.set-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.set-container:hover {
    border-color: rgba(49, 130, 206, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.2) 0%, rgba(29, 78, 216, 0.1) 100%);
    border-bottom: 1px solid rgba(49, 130, 206, 0.3);
    position: relative;
}

.set-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3182ce, #1d4ed8);
}

.set-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.set-count {
    background: rgba(49, 130, 206, 0.2);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(49, 130, 206, 0.3);
}

.set-cards {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    min-height: 120px;
}

.set-cards.grid-small {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.set-cards.grid-medium {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.set-cards.grid-large {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.set-cards:empty::after {
    content: 'No cards to display in this set';
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .collection-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 60px);
    }
    
    .collection-sidebar {
        width: 100%;
        order: 2;
    }
    
    .collection-main-area {
        order: 1;
    }
    
    .collection-filters-row,
    .collection-display-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .collection-quick-filters {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .collection-layout {
        padding: 10px;
        gap: 10px;
    }
    
    .filter-group,
    .display-group {
        min-width: 100px;
    }
    
    .card-list.view-grid.grid-small,
    .card-list.view-grid.grid-medium,
    .card-list.view-grid.grid-large {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}