@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700;900&family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
    --theme-bg: #0f172a;
    --theme-panel: #1e293b;
    --theme-red: #E91E63;
    --theme-blue: #0288D1;
    --theme-yellow: #FDD835;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--theme-bg);
    color: #E2E8F0;
}

h1,
h2,
h3,
.serif {
    font-family: 'Noto Serif KR', serif;
}

.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.flip-card {
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

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

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    border: 2px solid #334155;
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
    background-color: #f8fafc;
    color: #0f172a;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 4px;
}

.card-front {
    background: repeating-linear-gradient(45deg, #1e293b, #1e293b 10px, #0f172a 10px, #0f172a 20px);
    flex-direction: column;
}

.mag-tag {
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 2rem;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.5));
    transition: all 0.4s ease;
    opacity: 0;
    transform: scale(0);
    z-index: 20;
}

.mag-tag.active {
    opacity: 1;
    transform: scale(1);
}

.mag-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-focus {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.6);
        border-color: #E91E63;
    }

    70% {
        box-shadow: 0 0 0 8px rgba(229, 57, 53, 0);
        border-color: #E91E63;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
        border-color: transparent;
    }
}

.highlight-focus {
    animation: pulse-focus 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes dropIn {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(1.1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.anim-drop {
    animation: dropIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.opacity-0-start {
    opacity: 0;
}

.play-card {
    width: 4.8rem;
    height: 7.2rem;
}

@media (min-width: 640px) {
    .play-card {
        width: 6.5rem;
        height: 9.5rem;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } } 
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
