/* DRAGON TIGER — Royale Violet restyle. Two flip cards, dragon (red) vs tiger (blue). */

/* --- the stage: violet card with a gold/violet radial glow up top --- */
.dt-stage {
    --acc: #8b5cf6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 14px;
    padding: 18px 10px 14px;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 62%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(245, 196, 81, 0.22);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dt-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    border-radius: 16px;
    padding: 4px;
    transition: transform 0.25s ease, filter 0.25s ease;
}
.dt-side.winner { transform: scale(1.05); }
.dt-side.winner .dt-flip .dt-face.back .dt-pcard {
    box-shadow: 0 0 0 3px #f5c451, 0 0 28px rgba(245, 196, 81, 0.55), 0 10px 24px rgba(0, 0, 0, 0.45);
}
.dt-name {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 999px;
    color: #f5f0ff;
}
.dt-name.dragon { background: rgba(239, 68, 68, 0.16); border: 1px solid rgba(239, 68, 68, 0.5); color: #fca5a5; }
.dt-name.tiger { background: rgba(96, 165, 250, 0.16); border: 1px solid rgba(96, 165, 250, 0.5); color: #93c5fd; }
.dt-vs {
    align-self: center;
    font-weight: 900;
    font-size: 0.8rem;
    color: #f5c451;
    background: rgba(245, 196, 81, 0.12);
    border: 1px solid rgba(245, 196, 81, 0.4);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    letter-spacing: 0.02em;
}

.dt-card-wrap { width: 104px; height: 146px; perspective: 700px; }

/* 3D flip */
.dt-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); }
.dt-flip.flipped { transform: rotateY(180deg); }
.dt-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dt-face.back { transform: rotateY(180deg); }

/* playing card face */
.dt-pcard {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(145deg, #ffffff, #dedbef);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    font-family: Georgia, 'Times New Roman', serif;
    overflow: hidden;
}
.dt-pcard.red { color: #d61f3f; }
.dt-pcard.black { color: #1c2333; }
.dt-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.dt-corner b { font-size: 1.25rem; font-weight: 700; }
.dt-corner i { font-style: normal; font-size: 0.95rem; }
.dt-corner.tl { top: 7px; left: 8px; }
.dt-corner.br { bottom: 7px; right: 8px; transform: rotate(180deg); }
.dt-pip {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    opacity: 0.92;
}

/* themed card backs */
.dt-pcard.dt-facedown {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(255, 255, 255, 0.22);
}
.dt-facedown.dragon {
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.20), transparent 55%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 12px),
        linear-gradient(150deg, #ef4444, #991b1b);
}
.dt-facedown.tiger {
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.20), transparent 55%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 12px),
        linear-gradient(150deg, #8b5cf6, #4c1d95);
}
.dt-back-mark { font-size: 2.6rem; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45)); }

/* --- choices --- */
.dt-choices {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 12px;
}
.dt-choice {
    flex: 1;
    border: 1px solid rgba(245, 196, 81, 0.22);
    border-radius: 16px;
    padding: 10px 4px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #f5f0ff;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.dt-choice-name { font-size: 0.84rem; font-weight: 900; }
.dt-choice-meta { font-size: 0.68rem; font-weight: 700; opacity: 0.85; color: #a79fc2; }
.dt-choice.dragon.active { background: linear-gradient(160deg, #ef4444, #991b1b); box-shadow: 0 0 16px rgba(239, 68, 68, 0.5), 0 4px 0 rgba(0, 0, 0, 0.4); border-color: rgba(252, 165, 165, 0.7); }
.dt-choice.dragon.active .dt-choice-meta { color: #fee2e2; }
.dt-choice.tiger.active { background: linear-gradient(160deg, #8b5cf6, #4c1d95); box-shadow: 0 0 16px rgba(139, 92, 246, 0.5), 0 4px 0 rgba(0, 0, 0, 0.4); border-color: rgba(196, 181, 253, 0.7); }
.dt-choice.tiger.active .dt-choice-meta { color: #ede9fe; }
.dt-choice.tie.active { background: linear-gradient(180deg, #ffd76a, #e8a91c); color: #2a1a00; box-shadow: 0 10px 24px rgba(245, 196, 81, 0.4), 0 4px 0 rgba(0, 0, 0, 0.4); border-color: rgba(255, 240, 190, 0.8); }
.dt-choice.tie.active .dt-choice-meta { color: #6b4a00; }
.dt-choice:active { transform: scale(0.96); }

/* --- history --- */
.dt-history {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 26px;
    max-width: 340px;
    margin: 0 auto 6px;
}
.dt-history-chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    color: #fff;
    animation: chain-in 0.3s ease both;
}
.dt-history-chip.dragon { background: #ef4444; }
.dt-history-chip.tiger { background: #8b5cf6; }
.dt-history-chip.tie { background: linear-gradient(180deg, #ffd76a, #e8a91c); color: #2a1a00; }

/* compact screens: keep it scroll-free */
@media (max-height: 720px) {
    .dt-card-wrap { width: 88px; height: 122px; }
    .dt-pip { font-size: 2.5rem; }
    .dt-stage { padding: 14px 10px 12px; margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
