/* =========================
   Pack Layout
   ========================= */

/* Wrapper allows pack to scale without clipping neighbors */
.pack-wrapper {
    position: relative;
    overflow: visible;
    transform-style: preserve-3d;
}

/* Base pack styling modeled after card layout */
.pack {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease-in-out;
    color: #fff;
    text-align: center;
    min-height: 275px;            /* slightly shorter than a card */
    padding: 20px;
    will-change: transform;
}

/* Hover effect applied from wrapper so shadow isn't clipped */
.pack-wrapper:hover {
    z-index: 2;                   /* keep hover above neighbors */
}
.pack-wrapper:hover .pack {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Inner layout structure */
.pack .pack-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Pack title */
.pack .pack-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 10px 50px 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.pack-count {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 2;
  padding: .35rem .6rem;
}

/* Optional pack description/meta */
.pack .pack-meta {
    font-size: 1rem;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* =========================
   Pack Variants (style by data-pack-id)
   ========================= */
/* Starter Pack (id:1) */
.pack[data-pack-id="1"] {
    border: 3px solid #28a745;
    background: linear-gradient(145deg, #1e7e34, #28a745);
}

/* Epic Pack (id:2) */
.pack[data-pack-id="2"] {
    border: 3px solid #8e44ad;
    background: linear-gradient(145deg, #7d3c98, #8e44ad);
}

/* Legendary Pack (id:3) */
.pack[data-pack-id="3"] {
    border: 3px solid #f39c12;
    background: linear-gradient(145deg, #f1c40f, #f39c12);
}

/* All-Star Pack (id:4) */
.pack[data-pack-id="4"] {
    border: 3px solid #e74c3c;
    background: linear-gradient(145deg, #c0392b, #e74c3c);
}

/* Rare Pack (id:5) */
.pack[data-pack-id="5"] {
    border: 3px solid #007bff;
    background: linear-gradient(145deg, #004e92, #007bff);
}

/* Responsive tweaks for packs */
@media (max-width: 768px) {
    .pack {
        margin-bottom: 15px;
        height: auto;            /* allow growth on small screens */
    }
}
