/**
 * Schattenpfoten - Sammelkarten CSS
 */

/* ============================================
   SELTENHEITS-FARBEN
   ============================================ */

:root {
    --rarity-legendary: #F59E0B;
    --rarity-legendary-glow: rgba(245, 158, 11, 0.5);
    --rarity-epic: #8B5CF6;
    --rarity-epic-glow: rgba(139, 92, 246, 0.5);
    --rarity-rare: #3B82F6;
    --rarity-rare-glow: rgba(59, 130, 246, 0.4);
    --rarity-common: #9CA3AF;
    --rarity-normal: #6B7280;
}

/* ============================================
   COLLECTION SCREEN
   ============================================ */

.collection-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.collection-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.collection-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-header #btn-open-trade {
    flex: 1 0 100%;
    order: 10;
}

.collection-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.collection-stat {
    text-align: center;
}

.collection-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.collection-stat .stat-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

.collection-stat.rarity-legendary .stat-value {
    color: var(--rarity-legendary);
}

.collection-stat.rarity-epic .stat-value {
    color: var(--rarity-epic);
}

.collection-stat.rarity-rare .stat-value {
    color: var(--rarity-rare);
}

.collection-stat.rarity-common .stat-value {
    color: var(--rarity-common);
}

/* Filter Buttons */
.collection-filter .btn-outline-purple {
    --bs-btn-color: var(--rarity-epic);
    --bs-btn-border-color: var(--rarity-epic);
    --bs-btn-hover-bg: var(--rarity-epic);
    --bs-btn-hover-border-color: var(--rarity-epic);
    --bs-btn-active-bg: var(--rarity-epic);
    --bs-btn-active-border-color: var(--rarity-epic);
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
}

.collection-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #9CA3AF;
}

.collection-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #9CA3AF;
    font-style: italic;
}

.collection-card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #374151;
}

.collection-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-card .card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1rem 0.3rem 0.25rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.collection-card .card-quantity {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    z-index: 1;
}

.collection-card .card-rarity-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

/* Seltenheits-Rahmen und Effekte */

/* Common/Normal - Schlicht */
.collection-card.rarity-common,
.collection-card.rarity-normal {
    border: 1px solid #4B5563;
}

/* Rare - Dezenter Glanz */
.collection-card.rarity-rare {
    box-shadow: 0 0 6px var(--rarity-rare-glow);
    border: 2px solid var(--rarity-rare);
}

.collection-card.rarity-rare .card-rarity-indicator {
    background: var(--rarity-rare);
}

.collection-card.rarity-rare::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(96, 165, 250, 0.15),
        transparent
    );
    z-index: 3;
    pointer-events: none;
}

.collection-card.rarity-rare:hover::before {
    left: 100%;
    transition: left 0.6s ease;
}

/* Epic - Animierter Shimmer + Glow */
.collection-card.rarity-epic {
    box-shadow: 0 0 8px var(--rarity-epic-glow);
    border: 2px solid var(--rarity-epic);
}

.collection-card.rarity-epic .card-rarity-indicator {
    background: linear-gradient(90deg, var(--rarity-epic), #A78BFA, var(--rarity-epic));
}

.collection-card.rarity-epic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(167, 139, 250, 0.25),
        rgba(255, 255, 255, 0.15),
        rgba(167, 139, 250, 0.25),
        transparent
    );
    z-index: 3;
    pointer-events: none;
    animation: epic-shimmer 3s ease-in-out infinite;
}

@keyframes epic-shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.collection-card.rarity-epic::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(167, 139, 250, 0.15) 0%,
        transparent 60%
    );
    z-index: 2;
    pointer-events: none;
}

/* Legendary - Holografischer Foil-Effekt */
.collection-card.rarity-legendary {
    box-shadow: 0 0 15px var(--rarity-legendary-glow), inset 0 0 5px var(--rarity-legendary-glow);
    border: 2px solid var(--rarity-legendary);
}

.collection-card.rarity-legendary .card-rarity-indicator {
    background: linear-gradient(90deg, var(--rarity-legendary), #FCD34D, var(--rarity-legendary));
    animation: legendary-indicator 2s ease-in-out infinite;
}

@keyframes legendary-indicator {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.collection-card.rarity-legendary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 50, 50, 0.1) 30%,
        rgba(255, 200, 50, 0.15) 40%,
        rgba(50, 255, 50, 0.1) 50%,
        rgba(50, 200, 255, 0.15) 60%,
        rgba(150, 50, 255, 0.1) 70%,
        transparent 80%
    );
    z-index: 3;
    pointer-events: none;
    animation: legendary-foil 4s ease-in-out infinite;
}

@keyframes legendary-foil {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.collection-card.rarity-legendary::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 215, 0, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 180, 50, 0.15) 0%, transparent 40%);
    z-index: 2;
    pointer-events: none;
    animation: legendary-glow 3s ease-in-out infinite alternate;
}

@keyframes legendary-glow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Collection Detail Modal */
.collection-detail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-detail .detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.collection-detail .detail-content {
    position: relative;
    background: #1F2937;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.collection-detail .btn-close-detail {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Detail-Karte im Galerie-Stil */
.collection-detail .detail-card.gallery-card {
    position: relative;
    width: 220px;
    height: 320px;
    margin: 0 auto 1rem;
    transform: none;
}

.collection-detail .detail-card.gallery-card.active {
    transform: none;
}

.detail-card-wrapper {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* Extra-Info unter der Karte */
.detail-extra-info {
    color: #fff !important;
    position: absolute;
    text-shadow: 0 0 2px #000;
    font-weight: bold;
}

.collection-detail .detail-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem 0;
    font-style: italic;
}

.collection-detail .detail-quantity {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Mobile Anpassung für Detail-Karte */
@media (max-width: 400px) {
    .collection-detail .detail-card.gallery-card {
        width: 180px;
        height: 260px;
    }

    .collection-detail .detail-content {
        padding: 1rem;
    }
}

/* ============================================
   TRADE SCREEN
   ============================================ */

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.trade-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.trade-code-display {
    margin: 1.5rem 0;
}

.trade-players {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.trade-player {
    text-align: center;
}

.trade-player-name {
    display: block;
    font-weight: bold;
}

.trade-player-status {
    font-size: 0.75rem;
    color: #9CA3AF;
}

.trade-player-status.confirmed {
    color: #34D399;
}

.trade-arrow {
    font-size: 1.5rem;
    color: #60A5FA;
}

.trade-offers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trade-offer-section h5 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #D1D5DB;
}

.trade-offer-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.trade-add-card {
    width: 70px;
    min-height: 95px;
    border: 2px dashed #4B5563;
    border-radius: 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.trade-add-card:hover {
    border-color: #60A5FA;
}

.trade-add-card span {
    font-size: 1.5rem;
    color: #6B7280;
}

.trade-add-card small {
    font-size: 0.6rem;
    color: #6B7280;
    text-align: center;
}

.trade-offer-card {
    width: 70px;
    border-radius: 0.35rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
}

.trade-offer-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.trade-offer-info {
    padding: 0.25rem;
    text-align: center;
}

.trade-offer-name {
    display: block;
    font-size: 0.55rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-offer-rarity {
    display: block;
    font-size: 0.5rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.trade-offer-card.rarity-legendary .trade-offer-rarity {
    color: var(--rarity-legendary);
}

.trade-offer-card.rarity-epic .trade-offer-rarity {
    color: var(--rarity-epic);
}

.trade-offer-card.rarity-rare .trade-offer-rarity {
    color: var(--rarity-rare);
}

.trade-offer-card .remove-offer {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.trade-offer-card:hover .remove-offer {
    opacity: 1;
}

.trade-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Trade Select Modal */
.trade-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-select-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.trade-select-content {
    position: relative;
    background: #1F2937;
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.trade-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trade-select-header h4 {
    margin: 0;
    font-size: 1rem;
}

.btn-close-select {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.trade-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.trade-select-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s, transform 0.2s;
}

.trade-select-card:hover {
    border-color: #60A5FA;
    transform: scale(1.02);
}

.trade-select-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.trade-card-info {
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.trade-card-name {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
}

.trade-card-rarity {
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.trade-select-card.rarity-legendary .trade-card-rarity {
    color: var(--rarity-legendary);
}

.trade-select-card.rarity-epic .trade-card-rarity {
    color: var(--rarity-epic);
}

.trade-select-card.rarity-rare .trade-card-rarity {
    color: var(--rarity-rare);
}

.trade-card-avg {
    color: #48BB78;
    font-weight: bold;
}

.trade-card-quantity {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    z-index: 2;
}

.trade-card-info-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2;
}

.trade-select-card:hover .trade-card-info-btn {
    opacity: 1;
}

.trade-card-info-btn:hover {
    transform: scale(1.15);
    background: rgba(59, 130, 246, 1);
}

/* ============================================
   CARD DROP REWARD
   ============================================ */

.result-card-drop {
    margin: 1.5rem 0;
    text-align: center;
}

.result-card-drop h5 {
    color: var(--rarity-legendary);
    margin-bottom: 1rem;
}

.card-drop-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.card-drop-wrapper {
    position: relative;
    width: 120px;
}

.card-drop-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: card-glow 2s ease-in-out infinite;
    pointer-events: none;
}

.card-drop-glow.legendary {
    background: radial-gradient(circle, var(--rarity-legendary-glow) 0%, transparent 70%);
}

.card-drop-glow.epic {
    background: radial-gradient(circle, var(--rarity-epic-glow) 0%, transparent 70%);
}

.card-drop-glow.rare {
    background: radial-gradient(circle, var(--rarity-rare-glow) 0%, transparent 70%);
}

@keyframes card-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.card-drop-card {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: card-reveal 0.8s ease-out;
}

.card-drop-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-drop-card.legendary {
    box-shadow: 0 0 30px var(--rarity-legendary-glow);
    border: 3px solid var(--rarity-legendary);
}

.card-drop-card.epic {
    box-shadow: 0 0 20px var(--rarity-epic-glow);
    border: 3px solid var(--rarity-epic);
}

.card-drop-card.rare {
    box-shadow: 0 0 15px var(--rarity-rare-glow);
    border: 3px solid var(--rarity-rare);
}

.card-drop-card.common,
.card-drop-card.normal {
    border: 2px solid var(--rarity-common);
}

@keyframes card-reveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        transform: scale(1) rotateY(0);
    }
}

.card-drop-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.card-drop-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.card-drop-rarity {
    padding: 0.2rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.card-drop-rarity.legendary {
    background: var(--rarity-legendary);
    color: #1F2937;
}

.card-drop-rarity.epic {
    background: var(--rarity-epic);
    color: white;
}

.card-drop-rarity.rare {
    background: var(--rarity-rare);
    color: white;
}

.card-drop-rarity.common,
.card-drop-rarity.normal {
    background: var(--rarity-common);
    color: #1F2937;
}

.card-drop-new {
    background: #34D399;
    color: #1F2937;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: bold;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   DECK BUILDER
   ============================================ */

.deck-builder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.deck-builder-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.deck-builder-content {
    position: relative;
    background: #1F2937;
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deck-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #374151;
}

.deck-builder-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.btn-close-deck-builder {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.deck-builder-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.deck-builder-info .deck-count {
    font-weight: bold;
    color: #60A5FA;
}

.deck-builder-info .deck-count.complete {
    color: #34D399;
}

.deck-builder-info .deck-count.over {
    color: #EF4444;
}

.deck-builder-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.deck-builder-tabs button {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #4B5563;
    background: transparent;
    color: #9CA3AF;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.deck-builder-tabs button.active {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

.deck-builder-grid-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.deck-builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 0.5rem;
    padding: 0.25rem;
}

.deck-builder-card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #374151;
}

.deck-builder-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deck-builder-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.deck-builder-card.selected {
    border-color: #34D399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.deck-builder-card .card-check {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #34D399;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.deck-builder-card.selected .card-check {
    opacity: 1;
}

.deck-builder-card .card-quantity {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
    border-radius: 0.2rem;
    z-index: 2;
}

.deck-builder-card .card-rarity-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.deck-builder-card.rarity-legendary .card-rarity-bar {
    background: var(--rarity-legendary);
}

.deck-builder-card.rarity-epic .card-rarity-bar {
    background: var(--rarity-epic);
}

.deck-builder-card.rarity-rare .card-rarity-bar {
    background: var(--rarity-rare);
}

/* Shimmer-Effekte für Deck-Builder */
.deck-builder-card.rarity-legendary {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
    overflow: hidden;
}

.deck-builder-card.rarity-legendary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255, 215, 0, 0.2) 45%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 215, 0, 0.2) 55%,
        transparent 70%
    );
    animation: deck-legendary-shimmer 3s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes deck-legendary-shimmer {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

.deck-builder-card.rarity-epic {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
    overflow: hidden;
}

.deck-builder-card.rarity-epic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.25),
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: deck-epic-shimmer 2.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes deck-epic-shimmer {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

.deck-builder-card.rarity-rare {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.deck-builder-card .card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.8rem 0.2rem 0.2rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.deck-builder-card .card-info-btn {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: rgba(59, 130, 246, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 5;
}

.deck-builder-card:hover .card-info-btn {
    opacity: 1;
}

.deck-builder-card .card-info-btn:hover {
    transform: scale(1.15);
    background: rgba(59, 130, 246, 1);
}

.deck-builder-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9CA3AF;
}

.deck-builder-empty p {
    margin-bottom: 0.5rem;
}

.deck-builder-actions {
    display: flex;
    gap: 0.5rem;
}

.deck-builder-actions button {
    flex: 1;
}

/* Selected deck preview */
.deck-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    min-height: 50px;
    max-height: 80px;
    overflow-y: auto;
}

.deck-preview-card {
    width: 30px;
    height: 45px;
    border-radius: 0.15rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.deck-preview-card:hover {
    transform: scale(1.2);
    z-index: 10;
}

.deck-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deck-preview-empty {
    width: 100%;
    text-align: center;
    color: #6B7280;
    font-size: 0.75rem;
    padding: 0.5rem;
}

/* Stakes indicator */
.stakes-mode-badge {
    background: linear-gradient(135deg, #F59E0B, #DC2626);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: stakes-pulse 2s ease-in-out infinite;
}

@keyframes stakes-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
    }
}

/* Public game item with stakes */
.public-game-item .stakes-mode-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
    margin-left: 0.5rem;
}

/* Waiting screen stakes info */
.waiting-stakes-info {
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.5rem;
}

/* Stakes toggle styling */
.stakes-toggle .form-check-input:checked {
    background-color: #F59E0B;
    border-color: #F59E0B;
}

.stakes-config {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 0.25rem;
    padding: 0.75rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

    .trade-offers {
        grid-template-columns: 1fr;
    }

    .collection-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .collection-stat {
        flex: 1 1 45%;
    }
}
