/* =======================
   Pulled Cards Page Styling
   ======================= */
.content {
    display: flex;
    flex-direction: column; /* stacks children vertically */
    align-items: stretch;   /* children stretch to full width */
}

.allhistory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* stretch cards */
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.pulled-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(0,128,128,0.4);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pulled-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35), 0 0 10px rgba(95, 231, 255, 0.4);
    background: linear-gradient(135deg, rgba(0,128,128,0.6), rgba(0,180,180,0.6));
}

.pulled-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: cover;
}

.placeholder-card {
    width: 100%;
    height: 180px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 10px;
    color: #fff;
}

.name-rarity {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin: 5px 0 3px;
}

.pack-name {
    font-size: 0.9rem;
    color: #e4e4e4;
    margin: 0;
}

/* optional: responsive tweaks */
@media (max-width: 768px) {
    .allhistory-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

.pagination {
    text-align: center;
    margin: 20px 0;
    font-size: 1rem;
}

.pagination a {
    text-decoration: none;
    color: #fff;
    background: rgba(0,128,128,0.5);
    padding: 6px 12px;
    margin: 0 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: linear-gradient(135deg, #5fe7ff, rgba(95, 231, 255, 0.6));
    transform: scale(1.05);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* optional: cursor pointer for all cards */
.pulled-card {
    cursor: pointer;
}

/* =======================
   Pulled Cards Modal Styling
   ======================= */

/* =======================
   Card Modal Styling
   ======================= */
#card-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


#card-modal-content {
    background: linear-gradient(135deg, #4ca59c, #2aa198, #5fe7ff, #38d6c9);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    position: relative;
}


#card-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    font-weight: bold;
    transition: color 0.2s ease;
}

#card-modal-close:hover {
    color: #ffdddd;
}

#card-modal img {
    width: 300px;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
}

#card-modal-table {
    border-collapse: collapse;
    font-size: 16px;
    color: #fff;
}

#card-modal-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

#card-modal-table td:first-child {
    font-weight: bold;
}

/* gradient animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* responsive adjustments */
@media (max-width: 768px) {
    #card-modal-content {
        flex-direction: column;
        align-items: center;
    }

    #card-modal img {
        width: 80%;
        max-width: 300px;
    }

    #card-modal-table {
        width: 90%;
        margin-top: 20px;
    }
}
