/* Collection Browser Styles */

.collection-browser {
    padding: 20px;
    min-height: 100vh;
    overflow-y: auto;
    max-height: 100vh;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.collection-title {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.collection-stats {
    display: flex;
    gap: 15px;
}

.stat-pill {
    background: rgba(102, 126, 234, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.stat-pill span {
    color: #667eea;
    font-weight: bold;
}

/* Filter Panel */
.filter-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.filter-select,
.filter-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-size: 0.95em;
    transition: all 0.2s;
}

.filter-select:hover,
.filter-input:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* TCG Card */
.tcg-card {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 220px;
}

.tcg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.6;
}

/* Rarity borders */
.tcg-card.common { color: #9ca3af; }
.tcg-card.rare { color: #60a5fa; }
.tcg-card.epic { color: #a78bfa; }
.tcg-card.legendary {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.tcg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: currentColor;
}

.tcg-card.legendary:hover {
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.4);
}

/* Card Header */
.tcg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.tcg-card-type {
    font-size: 1.5em;
    opacity: 0.8;
}

.tcg-card-cost {
    background: rgba(102, 126, 234, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid rgba(102, 126, 234, 0.5);
}

/* Card Body */
.tcg-card-kanji {
    font-size: 2.5em;
    text-align: center;
    margin: 8px 0;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    color: white;
}

.tcg-card-meaning {
    text-align: center;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
}

/* Card Stats */
.tcg-card-stats {
    display: flex;
    justify-content: space-around;
    margin: 8px 0;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.tcg-card-stat {
    text-align: center;
}

.tcg-card-stat-label {
    font-size: 0.65em;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 2px;
}

.tcg-card-stat-value {
    font-size: 0.95em;
    font-weight: bold;
    color: white;
}

/* Card Ability */
.tcg-card-ability {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 8px;
    margin-top: 8px;
}

.tcg-card-ability-type {
    font-size: 0.65em;
    color: #667eea;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

.tcg-card-ability-desc {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* Card Footer */
.tcg-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tcg-card-rarity {
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    color: currentColor;
    opacity: 0.9;
}

.tcg-card-radical {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.5);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 1.2em;
}

/* Loading State */
.loading-cards {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    font-size: 3em;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .collection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }

    .tcg-card-kanji {
        font-size: 3em;
    }
}
