/* Gift Cards Styles */
.gift-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.pack-container {
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s;
        display: flex;
            justify-content: center;
}

.pack-container:hover {
    transform: scale(1.05);
}

.pack {
    width: 220px;
    height: 320px;
    background: linear-gradient(135deg, #a0013a 0%, #56011f 100%);
    border-radius: 15px;
    border: 3px solid #ffcc00;
    box-shadow: 0 0 30px rgba(160, 1, 58, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pack::before {
    content: "El mundial se vive con amigos";
    position: absolute;
    top: 20px;
    font-weight: bold;
    color: #ffcc00;
    font-size: 1rem;
}

.pack-logo {
    width: 200px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px gold);
}

.pack-text {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pack.opening {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: rotate(0); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

.cards-reveal {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
}

.card-item {
    width: 190px;
    height: 280px;
    background: #fff;
    border-radius: 14px;
    position: relative;
    transform: scale(0) translateY(30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 5px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
}

.card-item.show {
    transform: scale(1) translateY(0);
}

.card-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Pot Themes */
.card-item.pot-1 { border: 4px solid #ffffff; }
.card-item.pot-2 { border: 4px solid #ffffff; }
.card-item.pot-3 { border: 4px solid #ffffff; }
.card-item.pot-4 { border: 4px solid #ffffff; }

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #ffffff 0%, #f9f9f9 100%);
}

/* Corner Indicators */
.card-top-left, .card-bottom-right {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 3; /* Above background and name overlay */
}

.card-top-left {
    top: 10px;
    left: 10px;
}

.card-bottom-right {
    bottom: 10px;
    right: 10px;
    transform: rotate(180deg);
}

.corner-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pot-badge {
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    font-family: 'Outfit', sans-serif;
}

.card-item.pot-1 .pot-badge { color: #d4af37; }
.card-item.pot-4 .pot-badge { color: #a0013a; }

/* Main Content */
.card-main-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.card-flag {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px; /* Height of the card becomes width due to 90deg rotation */
    height: 190px; /* Width of the card becomes height */
    object-fit: cover;
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0.85;
    z-index: 0;
}

.card-name {
    position: relative;
    font-weight: 900;
    font-size: 1.4rem;
    color: #fff;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    padding: 10px 15px;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    z-index: 2;
        height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
}

.card-item:hover .card-name {
    background: rgba(0, 0, 0, 0.6);
}

/* Holographic Effect for Pot 1 */
.card-item.pot-1 .card-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.1) 30%,
        rgba(255,215,0,0.1) 40%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,215,0,0.1) 60%,
        rgba(255,255,255,0.1) 70%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 200%;
    animation: holo 4s linear infinite;
    pointer-events: none;
    z-index: 4; /* Above everything */
}

@keyframes holo {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.shine {
    position: absolute;
    top: -50%;
    left: -150%;
    width: 100%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shine-sweep 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 5;
}

@keyframes shine-sweep {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.gift-button-container {
    margin-top: 30px;
    display: none;
}

@media (max-width: 600px) {
    .card-item {
        width: 150px;
        height: 220px;
    }
    .card-flag {
        height: 80px;
    }
    .card-name {
        font-size: 0.9rem;
    }
    .corner-flag {
        width: 14px;
        height: 10px;
    }
    .pot-badge {
        font-size: 0.7rem;
    }
}
