/* --- Sabotiq Card Picker v3.2 - COMPACT & CENTERED --- */

.cp-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 9999; overflow: hidden;
}

.cp-title {
    color: gold; font-size: 20px; text-transform: uppercase; margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5); letter-spacing: 2px;
}
.cp-subtitle { color: #ccc; font-size: 11px; margin-bottom: 10px; }

/* NAVIGÁCIÓS NYILAK */
.cp-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 30px; color: rgba(255,255,255,0.2);
    cursor: pointer; z-index: 20; user-select: none;
    transition: all 0.2s;
}
.cp-nav-btn:hover { color: gold; transform: translateY(-50%) scale(1.2); }
.cp-prev { left: 10px; }
.cp-next { right: 10px; }

/* CAROUSEL */
.cp-carousel {
    position: relative; width: 100%; height: 300px; /* Kisebb magasság */
    display: flex; align-items: center; overflow: hidden;
    perspective: 1000px;
}

.cp-track {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    width: 100%; height: 100%; 
    
    /* A padding a kulcs: 50% szélesség - (kártyaszélesség / 2) */
    /* 140px a kártya, fele 70px. Így pontosan középre kerül az első is. */
    padding: 0 calc(50% - 70px) !important;
    
    box-sizing: border-box;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab; 
}
.cp-track.active-grab { cursor: grabbing; scroll-snap-type: none; }
.cp-track::-webkit-scrollbar { display: none; }

/* KÁRTYA TEST (KISEBB MÉRET) */
.cp-card {
    position: relative;
    flex: 0 0 140px !important; /* Kisebb szélesség */
    width: 140px !important;
    height: 200px !important;   /* Kisebb magasság */
    
    margin: 0 10px !important;  /* Kisebb köz */
    
    perspective: 1000px; cursor: pointer;
    scroll-snap-align: center;
    opacity: 0.5; transform: scale(0.85); /* Alapból még kisebb */
    transition: transform 0.2s ease-out, opacity 0.2s;
    transform-style: preserve-3d;
}

/* Fókuszált kártya */
.cp-card.cp-focused { 
    opacity: 1 !important; 
    transform: scale(1.15) !important; /* Kiemelkedik */
    z-index: 100;
}

.cp-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.6s; transform-style: preserve-3d;
}
.cp-card.flipped .cp-card-inner { transform: rotateY(180deg); }

.cp-face {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); background: #111;
}

.cp-cover {
    background: linear-gradient(135deg, #333, #000); border: 2px solid gold; color: gold;
    z-index: 2; transform: rotateY(0deg);
}
.cp-content {
    background: #222; border: 2px solid #666; color: white;
    transform: rotateY(180deg);
}

.cp-icon-large { font-size: 40px !important; margin-bottom: 5px; filter: drop-shadow(0 0 5px rgba(255,215,0,0.5)); }
.cp-label { font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; }

.cp-buff-section { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(46, 204, 113, 0.15); border-bottom: 1px solid #444; }
.cp-curse-section { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: rgba(255, 77, 77, 0.15); }

.cp-controls { margin-top: 10px; height: 40px; display: flex; justify-content: center; z-index: 20; }
.cp-btn { padding: 10px 25px; border-radius: 20px; font-weight: bold; border: none; cursor: pointer; font-size: 12px; text-transform: uppercase; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.cp-btn-cancel { background: #333; color: #aaa; border: 1px solid #555; }
.cp-btn-confirm { background: linear-gradient(90deg, #f1c40f, #f39c12); color: black; animation: popIn 0.3s; }

@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* MOBIL */
@media (max-width: 480px) {
    .cp-card { width: 130px !important; height: 190px !important; flex: 0 0 130px !important; }
    .cp-nav-btn { display: none; }
}