/* Side Panel Styles */
#collection-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
}

#collection-side-panel.active {
    transform: translateX(0);
}

.side-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.side-panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.side-panel-card-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.side-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.side-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.side-panel-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-panel-image-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-card-image {
    max-width: 200px;
    max-height: 280px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.side-panel-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.side-panel-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-detail-label {
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-panel-detail-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.side-panel-rarity {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-panel-rarity.common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.side-panel-rarity.uncommon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.side-panel-rarity.rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.side-panel-rarity.legendary {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.side-panel-description-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-description,
.side-panel-ability {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.side-panel-ability {
    font-style: italic;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: 12px;
}

.side-panel-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.side-panel-tags .tag {
    background: rgba(49, 130, 206, 0.2);
    color: #60a5fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(49, 130, 206, 0.3);
}

.side-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-panel-actions button {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.side-panel-actions button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.side-panel-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.2);
}

.side-panel-favorite-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.side-panel-lock-btn:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.side-panel-sell-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #ef4444;
}

/* Hover Reveal Button System */
.card-hover-buttons {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.card:hover .card-hover-buttons,
.collection-card:hover .card-hover-buttons {
    opacity: 1;
    transform: scale(1);
}

.hover-reveal-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hover-reveal-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Lock Button */
.card-lock-btn {
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.card-lock-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: #94a3b8;
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.4);
}

/* Keyboard Focus Indicators */
.card:focus,
.collection-card:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
    border-color: #3182ce !important;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2) !important;
}

.keyboard-focused {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
    border-color: #3182ce !important;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2) !important;
}

/* Card Tooltip Styles */
.card-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    max-width: 300px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.card-tooltip.visible {
    opacity: 1;
    transform: scale(1);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tooltip-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.tooltip-cost {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.tooltip-type-rarity {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tooltip-type {
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
}

.tooltip-rarity {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-rarity.common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.tooltip-rarity.uncommon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.tooltip-rarity.rare {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tooltip-rarity.legendary {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.tooltip-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.tooltip-divider {
    color: #6b7280;
}

.tooltip-ability {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    color: #ffd700;
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
}

.tooltip-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tooltip-tag {
    background: rgba(49, 130, 206, 0.2);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(49, 130, 206, 0.3);
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-owned {
    color: #e2e8f0;
    font-size: 12px;
}

.tooltip-status {
    display: flex;
    gap: 4px;
}

.tooltip-favorite,
.tooltip-locked {
    font-size: 14px;
}

/* Mobile Responsive Side Panel */
@media (max-width: 768px) {
    #collection-side-panel {
        width: 100vw;
        transform: translateY(100%);
    }
    
    #collection-side-panel.active {
        transform: translateY(0);
    }
    
    .side-panel-details {
        grid-template-columns: 1fr;
    }
}