/* Estilos para as telas de expansão e compra */

/* Estilos gerais para o popup de expansão */
.expansion-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-y: auto;
}

.expansion-popup-content {
    background: #222;
    padding: 32px 24px;
    border-radius: 10px;
    box-shadow: 0 2px 16px #000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 300px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

/* Cabeçalho da expansão */
.expansion-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.expansion-title {
    color: #ff6b6b;
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.expansion-price {
    background: #3d2b2b;
    color: #ffd700;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.expansion-description {
    color: #ddd;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
    font-style: italic;
}

/* Grade de cartas da expansão */
.expansion-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    perspective: 1000px;
}

.expansion-card {
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.expansion-card.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, #3d2b2b, #2a2020);
    border: 2px solid #6a3b3b;
}

.card-back {
    background: linear-gradient(135deg, #2a2020, #1a1a1a);
    border: 2px solid #3d2b2b;
    transform: rotateY(180deg);
    padding: 10px;
    color: #ddd;
    font-size: 0.9em;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.card-title {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-description {
    font-size: 0.8em;
    line-height: 1.4;
    overflow-y: auto;
    flex-grow: 1;
    padding: 5px 0;
}

.card-type {
    font-size: 0.7em;
    color: #ffd700;
    font-style: italic;
    margin-top: 5px;
}

/* Botões de ação */
.expansion-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.buy-button {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.buy-button:hover {
    background: linear-gradient(135deg, #ff4444, #ff2222);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.7);
}

.close-button {
    background: #3d2b2b;
    color: #ddd;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #6a3b3b;
}

/* Tela de checkout */
.checkout-container {
    display: none;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.checkout-title {
    color: #ff6b6b;
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.checkout-summary {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.checkout-summary h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.price-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #fff;
}

.total-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #4ecdc4;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}


.checkout-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3d2b2b;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #3d2b2b;
}

.checkout-total-label {
    color: #ddd;
}

.checkout-total-value {
    color: #ffd700;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-button {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.payment-button:hover {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
}

.back-button {
    background: #3d2b2b;
    color: #ddd;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #6a3b3b;
}

/* Tela de processamento de pagamento */
.payment-processing {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.processing-icon {
    width: 80px;
    height: 80px;
    border: 5px solid #3d2b2b;
    border-top: 5px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-message {
    color: #ddd;
    text-align: center;
    font-size: 1.2em;
}

/* Tela de confirmação */
.confirmation-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.confirmation-icon {
    color: #4CAF50;
    font-size: 3em;
}

.confirmation-message {
    color: #ddd;
    text-align: center;
    font-size: 1.2em;
    line-height: 1.5;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Responsividade */
@media (max-width: 768px) {
    .expansion-popup-content {
        padding: 20px 15px;
        max-width: 95vw;
    }
    
    .expansion-cards {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .expansion-card {
        height: 150px;
    }
    
    .card-description {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .expansion-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }
    
    .expansion-card {
        height: 120px;
    }
}