/* Comparison Mode Styles */

/* Comparison Toggle Button on Card */
.card-compare-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
    opacity: 0.5;
    color: white;
    font-size: 16px;
}

.card-compare-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--accent-color);
}

.card-compare-btn.active {
    opacity: 1;
    color: var(--accent-color);
}

.card-compare-btn svg {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Comparison Bar (Floating Bottom) */
.comparison-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
}

.comparison-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.comparison-slots {
    display: flex;
    gap: 10px;
    flex: 1;
}

.comparison-slot {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.comparison-slot.filled {
    border-style: solid;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.3);
}

.comparison-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.comparison-slot-remove {
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.comparison-slot:hover .comparison-slot-remove {
    opacity: 1;
}

.comparison-actions {
    display: flex;
    gap: 10px;
}

.btn-compare-action {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-compare-clear {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-compare-clear:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-compare-start {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.4);
}

.btn-compare-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.6);
}

.btn-compare-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Comparison Modal/View */
.comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    overflow-y: auto;
    padding: 40px 20px;
}

.comparison-modal.visible {
    display: block;
    opacity: 1;
}

.comparison-content {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    position: relative;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.comparison-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.comparison-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.comparison-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 150px repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    overflow-x: auto;
}

/* Comparison Rows */
.comp-row-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.comp-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.comp-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comp-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.comp-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.comp-types {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.comp-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comp-stat-label {
    width: 40px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.comp-stat-val {
    width: 30px;
    font-weight: 700;
    text-align: right;
}

.comp-stat-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.comp-stat-bar-fill {
    height: 100%;
    border-radius: 3px;
}

.comp-weakness-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.weakness-tag {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.weakness-tag.x2 {
    color: #ffaa00;
    border-color: #ffaa00;
}

.weakness-tag.x4 {
    color: #ff4444;
    border-color: #ff4444;
    font-weight: bold;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .comp-row-label {
        display: none;
        /* Hide labels on mobile, integrate into cards */
    }

    .comparison-bar {
        width: 95%;
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }

    .comparison-slots {
        width: 100%;
        justify-content: center;
    }

    .comparison-actions {
        width: 100%;
    }

    .btn-compare-action {
        flex: 1;
    }
}