/* PREMIER MEMORY MATCH GAME */

.premier-memory-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.premier-memory-scene {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    border-radius: 20px;
    padding: 2rem;
}

/* Memory cards grid */
.premier-memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Individual card */
.premier-memory-card {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    perspective: 1000px;
    min-height: 100px;
    touch-action: manipulation;
}

.premier-memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.premier-memory-card.premier-flipped .premier-memory-card-inner {
    transform: rotateY(180deg);
}

.premier-memory-card.premier-matched .premier-memory-card-inner {
    transform: rotateY(180deg);
}

/* Card faces */
.premier-card-front,
.premier-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Front of card - with logo */
.premier-card-front {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid #FFD700;
    transform: rotateY(0deg);
}

.premier-logo-img {
    width: 60%;
    height: auto;
    max-width: 60px;
    opacity: 0.8;
    filter: brightness(1.2);
}

/* Back of card - shows icons */
.premier-card-back {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    transform: rotateY(180deg);
    border: 2px solid #FFD700;
}

/* Icon styling */
.premier-memory-icon {
    font-size: 3rem;
    color: #000;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
}

/* Matched cards */
.premier-memory-card.premier-matched .premier-card-back {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-color: #22c55e;
    animation: matchPulse 0.6s ease;
}

@keyframes matchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Info section */
.premier-memory-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 12orientation;
    backdrop-filter: blur(10px);
}

.premier-memory-tries,
.premier-memory-matches {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.premier-memory-label {
    color: #999;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premier-memory-value {
    color: #FFD700;
    font-size: 28px;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Results section */
.premier-memory-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 12px;
}

.premier-memory-results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.premier-memory-result-item {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 14px;
}

.premier-memory-result-item.winner {
    background: rgba(255,215,0,0.2);
    border: 1px solid #FFD700;
    color: #FFD700;
}

.premier-memory-result-item.loser {
    background: rgba(255,255,255,0.1);
    border: 1px solid #666;
    color: #999;
}

/* Result popup */
.premier-memory-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 3px solid #FFD700;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    min-width: 280px;
    opacity: 0;
    transition: all 0.3s ease;
}

.premier-memory-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.premier-memory-popup.winner {
    border-color: #4ade80;
    background: linear-gradient(135deg, #064e3b, #047857);
}

.premier-memory-popup.loser {
    border-color: #ef4444;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .premier-memory-container {
        padding: 1rem;
    }
    
    .premier-memory-scene {
        padding: 1.5rem;
    }
    
    .premier-memory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }
    
    .premier-memory-card {
        min-height: 80px;
    }
    
    .premier-logo-img {
        max-width: 45px;
    }
    
    .premier-memory-icon {
        font-size: 2rem;
    }
    
    .premier-memory-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .premier-memory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .premier-memory-card {
        min-height: 70px;
    }
    
    .premier-memory-icon {
        font-size: 1.75rem;
    }
    
    .premier-logo-img {
        max-width: 40px;
    }
}