/* ═══════════════════════════════════════════
   도파민 러시 - 즉각적 도파민 UX 스타일시트
   ═══════════════════════════════════════════ */

/* ===== 파티클 시스템 ===== */
.dopa-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    animation: particleFly 0.8s cubic-bezier(.22,1,.36,1) forwards;
    will-change: transform, opacity;
}
.dopa-particle.mini {
    animation-duration: 0.6s;
}
@keyframes particleFly {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.3); opacity: 0; }
}

/* ===== Ripple 효과 ===== */
.dopa-ripple {
    position: absolute;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.25);
    transform: translate(-50%, -50%);
    animation: rippleGrow 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}
@keyframes rippleGrow {
    0% { width: 0; height: 0; opacity: 0.5; }
    100% { width: 300px; height: 300px; opacity: 0; }
}

/* ═══════════════════════════════════════════
   스와이프 카드 시스템
   ═══════════════════════════════════════════ */
.swipe-zone {
    max-width: 400px;
    margin: 0 auto;
    padding: 10px 0 0;
}
.swipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.swipe-score {
    display: flex;
    gap: 16px;
    font-size: 15px;
    font-weight: 700;
}
.sw-like { color: #F87171; }
.sw-nope { color: #94A3B8; }
.swipe-progress {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    padding: 4px 12px;
    border-radius: 20px;
}
.swipe-deck {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    margin-bottom: 16px;
    touch-action: pan-y;
}
.swipe-card {
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), opacity 0.3s;
    transform: scale(calc(1 - var(--stack) * 0.05)) translateY(calc(var(--stack) * 12px));
    z-index: calc(10 - var(--stack));
    will-change: transform;
}
.swipe-card.active {
    cursor: grab;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.swipe-card:active { cursor: grabbing; }
.sw-card-emoji {
    font-size: 72px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
    animation: cardEmojiBounce 2s ease-in-out infinite;
}
@keyframes cardEmojiBounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.sw-card-text {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
    letter-spacing: -0.5px;
}
.sw-card-era {
    font-size: 13px;
    color: var(--primary-light);
    background: rgba(124,58,237,0.12);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 600;
}
/* 스와이프 라벨 */
.sw-label {
    position: absolute;
    top: 24px;
    font-size: 28px;
    font-weight: 900;
    padding: 8px 20px;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
}
.sw-label-like {
    right: 16px;
    color: #F87171;
    border: 3px solid #F87171;
    transform: rotate(12deg);
}
.sw-label-nope {
    left: 16px;
    color: #94A3B8;
    border: 3px solid #94A3B8;
    transform: rotate(-12deg);
}

/* 스와이프 버튼 */
.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 8px;
}
.sw-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.sw-btn span { font-size: 24px; }
.sw-btn small { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.sw-btn:hover { transform: scale(1.1); }
.sw-nope-btn:hover { border-color: #94A3B8; box-shadow: 0 0 20px rgba(148,163,184,0.2); }
.sw-like-btn:hover { border-color: #F87171; box-shadow: 0 0 20px rgba(248,113,113,0.3); }
.sw-btn:active { transform: scale(0.95); }

.swipe-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.5;
    animation: hintPulse 3s ease-in-out infinite;
}
@keyframes hintPulse {
    0%,100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* 스와이프 결과 */
.swipe-result {
    text-align: center;
    padding: 40px 20px;
    animation: resultPop 0.5s cubic-bezier(.22,1,.36,1);
}
@keyframes resultPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.sr-emoji { font-size: 64px; margin-bottom: 12px; }
.sr-title {
    font-size: 28px;
    font-weight: 900;
    background: var(--g1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.sr-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 16px; }
.sr-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.sr-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.sr-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--g1);
    color: #fff;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(124,58,237,0.35);
    text-decoration: none;
}
.sr-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124,58,237,0.5); }
.sr-cta-retry {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.sr-cta-retry:hover { border-color: var(--primary); color: var(--text); }

/* ═══════════════════════════════════════════
   VS 밸런스 게임
   ═══════════════════════════════════════════ */
.vs-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.vs-counter {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.vs-ring {
    display: flex;
    gap: 0;
    position: relative;
}
.vs-side {
    flex: 1;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(.22,1,.36,1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.vs-a {
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(236,72,153,0.06));
    margin-right: 4px;
}
.vs-b {
    background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(59,130,246,0.06));
    margin-left: 4px;
}
.vs-side:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(124,58,237,0.2);
}
.vs-side:active { transform: scale(0.97); }
.vs-side.picked {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(236,72,153,0.15)) !important;
    transform: scale(1.02);
}
.vs-emoji { font-size: 48px; margin-bottom: 12px; }
.vs-text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.3px;
}
.vs-pct {
    font-size: 28px;
    font-weight: 900;
    margin-top: 12px;
    background: var(--g1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pctPop 0.4s cubic-bezier(.22,1,.36,1);
}
@keyframes pctPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
.vs-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--g2);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}
.vs-total {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}
.vs-next-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    background: var(--g1);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.vs-next-btn:hover { box-shadow: 0 8px 32px rgba(124,58,237,0.4); transform: translateY(-2px); }

.vs-result {
    text-align: center;
    padding: 32px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.vs-result h3 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    background: var(--g1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.vs-result p { font-size: 14px; color: var(--text-muted); }
.vs-result-stats {
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
    color: var(--text);
}

/* ═══════════════════════════════════════════
   FOMO 토스트
   ═══════════════════════════════════════════ */
.fomo-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--bg-card);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 16px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 800;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1), opacity 0.3s;
    opacity: 0;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    max-width: 360px;
    width: max-content;
    backdrop-filter: blur(20px);
}
.fomo-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.fomo-icon { font-size: 20px; flex-shrink: 0; }
.fomo-text { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.fomo-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   모바일 반응형
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .swipe-zone { padding: 0 4px; }
    .sw-card-emoji { font-size: 56px; }
    .sw-card-text { font-size: 17px; }
    .swipe-card { padding: 24px 16px; border-radius: 20px; }
    .sw-btn { width: 56px; height: 56px; }
    .vs-emoji { font-size: 36px; }
    .vs-text { font-size: 13px; }
    .vs-side { padding: 20px 12px; }
    .fomo-toast { max-width: calc(100% - 32px); bottom: 70px; }
    .sr-title { font-size: 24px; }
}
