/* Card Theme Customization Styles */

.card-customization-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.card-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.card-theme-option {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-theme-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-theme-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.2);
}

.card-theme-option.locked {
    cursor: not-allowed !important;
    opacity: 0.7;
    filter: grayscale(60%);
    pointer-events: auto; /* Allow click to show modal */
}

.card-theme-option.locked:hover {
    transform: translateY(-2px); /* Slight movement to show it's clickable */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-theme-option.locked:active {
    transform: scale(0.98); /* Press effect */
}

.card-theme-preview {
    aspect-ratio: 16/10;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
}

.card-theme-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.card-theme-tier {
    font-size: 0.75rem;
    opacity: 0.9;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(3px);
}

.lock-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: lockShake 0.5s ease infinite alternate;
}

@keyframes lockShake {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.unlock-cost {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.unlock-cost i {
    color: #ffc107;
}

.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.selected-badge i {
    margin-right: 0.2rem;
}

/* Card theme gradients */
.theme-bronze {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
}

.theme-silver {
    background: linear-gradient(135deg, #708090 0%, #C0C0C0 100%);
}

.theme-gold {
    background: linear-gradient(135deg, #B8860B 0%, #FFD700 100%);
}

.theme-platinum {
    background: linear-gradient(135deg, #4A5568 0%, #A0AEC0 100%);
}

.theme-royal {
    background: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%);
}

.theme-ocean {
    background: linear-gradient(135deg, #006064 0%, #00ACC1 100%);
}

.theme-sunset {
    background: linear-gradient(135deg, #FF6F00 0%, #FF5722 100%);
}

.theme-forest {
    background: linear-gradient(135deg, #1B5E20 0%, #4CAF50 100%);
}

.theme-midnight {
    background: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
}

.theme-ruby {
    background: linear-gradient(135deg, #B71C1C 0%, #E53935 100%);
}

.theme-emerald {
    background: linear-gradient(135deg, #004D40 0%, #00796B 100%);
}

.theme-cosmic {
    background: linear-gradient(135deg, #311B92 0%, #512DA8 100%);
}

/* Unlock Animation */
@keyframes unlockPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
}

.card-theme-option.just-unlocked {
    animation: unlockPulse 1s ease;
}

/* Unlock confirmation modal styles */
.unlock-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.unlock-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: unlockModalShow 0.3s ease;
}

@keyframes unlockModalShow {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.unlock-modal-icon {
    font-size: 4rem;
    color: #ffc107;
    margin-bottom: 1rem;
    animation: lockRotate 0.5s ease;
}

.unlock-modal-icon.insufficient {
    color: #f44336;
    animation: warningPulse 1s ease infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes lockRotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.unlock-modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.unlock-modal p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.unlock-modal-theme-preview {
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
}

.unlock-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.unlock-modal-buttons button {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-confirm-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.unlock-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.unlock-cancel-btn {
    background: #e0e0e0;
    color: #666;
}

.unlock-cancel-btn:hover {
    background: #d0d0d0;
}

/* Success Animation */
.unlock-success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    pointer-events: none;
}

.unlock-success-icon {
    font-size: 6rem;
    color: #4caf50;
    animation: successPop 0.6s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .card-themes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .lock-icon {
        font-size: 2rem;
    }
    
    .unlock-cost {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .card-themes-grid {
        grid-template-columns: 1fr 1fr;
    }
}
