/* ========= Intro & Class Selection Modals — Medieval Theme ========= */
.intro-overlay {
    position: fixed; inset: 0;
    background: rgba(10,8,5,0.94);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    animation: introFadeIn 0.4s ease;
}
@keyframes introFadeIn { from { opacity: 0; } to { opacity: 1; } }

.intro-modal {
    background: linear-gradient(160deg, #2c2620, #1e1a14 40%, #251f18);
    border: 2px solid #4a4035;
    border-radius: 12px;
    padding: 0;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--color-text, #e4d8c4);
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 60px rgba(155,44,44,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
    animation: introSlideUp 0.5s ease;
}
@keyframes introSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Decorative border glow */
.intro-modal::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(212,168,48,0.15), transparent 40%, transparent 60%, rgba(155,44,44,0.1));
    z-index: -1;
    pointer-events: none;
}

.intro-modal-header {
    padding: 28px 28px 0;
    text-align: center;
    border-bottom: 1px solid rgba(74,64,53,0.5);
    padding-bottom: 18px;
    background: linear-gradient(180deg, rgba(212,168,48,0.04), transparent);
}
.intro-modal-header .intro-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(212,168,48,0.2));
}
.intro-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: var(--color-gold, #d4a830);
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(212,168,48,0.15);
}
.intro-modal-header .intro-subtitle {
    font-size: 12px;
    color: var(--color-text-muted, #807060);
    margin-top: 4px;
}

.intro-modal-body {
    padding: 20px 28px 28px;
}

/* === Class selection cards === */
.class-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.class-pick-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border: 2px solid var(--color-border, #4a4035);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.class-pick-card:hover {
    background: rgba(212,168,48,0.04);
    border-color: rgba(212,168,48,0.3);
}
.class-pick-card.selected {
    background: rgba(155,44,44,0.08);
    border-color: var(--color-accent-bright, #c53030);
    box-shadow: 0 0 16px rgba(155,44,44,0.12), inset 0 0 20px rgba(155,44,44,0.04);
}
.class-pick-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.class-pick-info { flex: 1; min-width: 0; }
.class-pick-name {
    font-weight: 700; font-size: 15px;
    color: var(--color-gold, #d4a830);
    margin-bottom: 3px;
}
.class-pick-desc {
    font-size: 12px; color: var(--color-text-dim, #b0a08a); line-height: 1.4;
    margin-bottom: 6px;
}
.class-pick-stats {
    display: flex; gap: 5px; flex-wrap: wrap;
}
.class-stat-badge {
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: var(--color-text-muted, #807060);
    border: 1px solid rgba(255,255,255,0.04);
}
.class-stat-badge.high {
    background: rgba(212,168,48,0.1);
    color: var(--color-gold, #d4a830);
    border-color: rgba(212,168,48,0.2);
}

/* === Attack selection === */
.attack-select-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border, #4a4035);
}
.attack-select-title {
    font-size: 14px; font-weight: 700;
    color: var(--color-gold, #d4a830);
    margin-bottom: 4px;
}
.attack-select-hint {
    font-size: 11px; color: var(--color-text-muted, #807060);
    margin-bottom: 10px;
}
.attack-select-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.atk-pick-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--color-border, #4a4035);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 12px;
}
.atk-pick-card:hover { background: rgba(212,168,48,0.04); border-color: rgba(212,168,48,0.25); }
.atk-pick-card.selected {
    background: rgba(155,44,44,0.06);
    border-color: var(--color-accent-bright, #c53030);
}
.atk-pick-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.atk-pick-el {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
    border-radius: 50%;
}
.atk-pick-info { flex: 1; }
.atk-pick-name { font-weight: 600; color: var(--color-text, #e4d8c4); }
.atk-pick-meta { font-size: 10px; color: var(--color-text-muted, #807060); margin-top: 1px; }
.atk-pick-check {
    width: 18px; height: 18px;
    border: 2px solid var(--color-border-light, #5a5040);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: 12px;
    transition: all 0.15s;
}
.atk-pick-card.selected .atk-pick-check {
    background: var(--color-accent-bright, #c53030);
    border-color: var(--color-accent-bright, #c53030);
    color: #fff;
}

/* === Intro story === */
.intro-story-text {
    text-align: left;
    font-size: 14px;
    line-height: 1.85;
    color: var(--color-text-dim, #b0a08a);
}
.intro-story-text p {
    margin: 0 0 14px;
    text-indent: 1.5em;
}
.intro-story-text p:first-child::first-letter {
    font-size: 2.2em;
    float: left;
    line-height: 1;
    margin-right: 4px;
    margin-top: 2px;
    color: var(--color-gold, #d4a830);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(212,168,48,0.2);
}
.intro-story-text p:last-child { margin-bottom: 0; }

/* === Buttons === */
.intro-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    background: linear-gradient(135deg, var(--color-accent, #9b2c2c), var(--color-accent-bright, #c53030));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    box-shadow: 0 4px 16px rgba(155,44,44,0.2);
}
.intro-btn:hover {
    background: linear-gradient(135deg, #b33535, #d04040);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(155,44,44,0.3);
}
.intro-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.intro-btn-secondary {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--color-border, #4a4035);
    color: var(--color-text-muted, #807060);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.intro-btn-secondary:hover { border-color: var(--color-border-light, #5a5040); color: var(--color-text-dim, #b0a08a); }
.atk-counter {
    font-size: 12px; color: var(--color-text-muted, #807060);
    text-align: center;
    margin-top: 6px;
}
