/* ═══════════════════════════════════════════════════════
   PREVIEW-V2.CSS — Scenario Preview / Welcome Page
   Nav/body/loading styles are in v2-shared.css
   ═══════════════════════════════════════════════════════ */

/* ── Main Layout ───────────────────────────────────── */
.pv2-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 10px 24px;
}

/* ── Card ──────────────────────────────────────────── */
.pv2-card {
    width: 100%;
    max-width: 620px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pv2SlideIn .3s ease-out;
}

@keyframes pv2SlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Strip (icon + title) ─────────────────────── */
.pv2-hero-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 14px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff;
    position: relative;
}
.pv2-hero-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.15), transparent 60%);
    pointer-events: none;
}

.pv2-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pv2-hero-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.pv2-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 2px;
}

.pv2-title-hi {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    font-weight: 400;
}

.pv2-diff-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}
.pv2-diff-badge.beginner     { background: rgba(34,197,94,.2);  color: #4ade80; }
.pv2-diff-badge.intermediate { background: rgba(245,158,11,.2); color: #fbbf24; }
.pv2-diff-badge.advanced     { background: rgba(239,68,68,.2);  color: #f87171; }

/* ── Section (Setting / Cultural) ──────────────────── */
.pv2-section {
    display: flex;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.pv2-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}
.pv2-icon-amber {
    background: #fef3c7;
    color: #d97706;
}

.pv2-section-body { flex: 1; }

.pv2-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}

.pv2-section-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 2px;
}

.pv2-section-text-hi {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.pv2-cultural { background: #fffbeb; }

/* ── Stats Row ─────────────────────────────────────── */
.pv2-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid #f1f5f9;
}

.pv2-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-right: 1px solid #f1f5f9;
}
.pv2-stat-item:last-child { border-right: none; }

.pv2-stat-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.pv2-stat-blue   { background: #dbeafe; color: #2563eb; }
.pv2-stat-green  { background: #dcfce7; color: #16a34a; }
.pv2-stat-purple { background: #ede9fe; color: #7c3aed; }
.pv2-stat-amber  { background: #fef3c7; color: #d97706; }

.pv2-stat-value {
    font-size: 14px; font-weight: 800;
    color: #0f172a; line-height: 1.2;
}
.pv2-stat-label {
    font-size: 10px; color: #94a3b8; font-weight: 500;
}

/* ── Characters Preview ────────────────────────────── */
.pv2-characters {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.pv2-char-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.pv2-char-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex: 1;
    max-width: 190px;
}

.pv2-char-avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    flex-shrink: 0; overflow: hidden;
}
.pv2-char-avatar img {
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 8px;
}
.pv2-avatar-a { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; }
.pv2-avatar-b { background: linear-gradient(135deg, #ec4899, #db2777); color: #fff; }

.pv2-char-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.pv2-char-role { font-size: 11px; color: #94a3b8; }

.pv2-char-vs { color: #cbd5e1; font-size: 14px; flex-shrink: 0; }

.pv2-char-note {
    font-size: 11px; color: #94a3b8;
    text-align: center; margin-top: 6px;
}

/* ── TTS Banner ────────────────────────────────────── */
.pv2-tts-banner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 18px;
    font-size: 12px; font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    transition: all .3s;
}
.pv2-tts-banner.tts-ready   { background: #f0fdf4; color: #16a34a; }
.pv2-tts-banner.tts-partial { background: #fffbeb; color: #d97706; }
.pv2-tts-banner.tts-none    { background: #fef2f2; color: #dc2626; }

/* ── Bottom Actions ────────────────────────────────── */
.pv2-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
}

.pv2-btn-back {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 500;
    color: #64748b; text-decoration: none;
    background: #f8fafc; border: 1px solid #e2e8f0;
    transition: all .2s; cursor: pointer;
}
.pv2-btn-back:hover { background: #f1f5f9; color: #0f172a; }

.pv2-btn-start {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 10px;
    font-size: 14px; font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none; cursor: pointer;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(59,130,246,.25);
    font-family: inherit;
}
.pv2-btn-start:hover {
    box-shadow: 0 4px 16px rgba(59,130,246,.35);
    transform: translateY(-1px);
}
.pv2-btn-start:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59,130,246,.2);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .pv2-main { padding: 10px 6px 16px; }
    .pv2-card { border-radius: 12px; }
    .pv2-hero-strip { padding: 14px 14px 12px; flex-wrap: wrap; }
    .pv2-hero-icon { width: 38px; height: 38px; font-size: 16px; }
    .pv2-title { font-size: 17px; }
    .pv2-section { padding: 10px 14px; }
    .pv2-stats { grid-template-columns: repeat(2, 1fr); }
    .pv2-stat-item:nth-child(2) { border-right: none; }
    .pv2-stat-item:nth-child(1),
    .pv2-stat-item:nth-child(2) { border-bottom: 1px solid #f1f5f9; }
    .pv2-characters { padding: 10px 14px; }
    .pv2-char-row { flex-direction: column; gap: 6px; }
    .pv2-char-chip { max-width: 100%; width: 100%; }
    .pv2-char-vs { transform: rotate(90deg); }
    .pv2-actions { flex-direction: column-reverse; gap: 8px; padding: 12px 14px; }
    .pv2-btn-back, .pv2-btn-start { width: 100%; justify-content: center; }
}

@media (min-width: 640px) {
    .pv2-main { padding: 24px 20px 32px; align-items: center; }
    .pv2-hero-strip { padding: 20px 24px 16px; }
    .pv2-title { font-size: 22px; }
    .pv2-section { padding: 14px 24px; }
    .pv2-stat-item { padding: 12px 16px; }
    .pv2-characters { padding: 14px 24px; }
    .pv2-actions { padding: 16px 24px; }
}
