/* ============================================
   FINANCE MINIGAMES STYLES
   Shared scaffolding (.finance-game) + per-game styles
   ============================================ */

.finance-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    max-width: 720px;
    margin: 0 auto;
    color: #EAF0F7;
    font-family: 'Poppins', sans-serif;
}

.finance-game .fin-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 560px;
    background: rgba(20, 34, 52, 0.85);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 12px;
    padding: 10px 18px;
}

.finance-game .fin-timer {
    font-weight: 700;
    font-size: 1.05rem;
}

.finance-game .fin-timer .timer-warning {
    color: #FF5252;
    animation: fin-pulse 0.6s infinite alternate;
}

@keyframes fin-pulse {
    from { opacity: 1; }
    to { opacity: 0.45; }
}

.finance-game .fin-progress {
    font-weight: 600;
    color: #E8C547;
}

.finance-game .fin-instruction {
    text-align: center;
    font-size: 1rem;
    max-width: 560px;
    margin: 0;
    line-height: 1.5;
}

.finance-game .fin-instruction em {
    color: #A9BDD4;
    font-size: 0.88rem;
}

.finance-game .fin-feedback {
    min-height: 28px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    max-width: 560px;
}

.finance-game .fin-feedback.success { color: #4ADE80; }
.finance-game .fin-feedback.error { color: #FF6B6B; }

.finance-game .fin-btn {
    background: linear-gradient(135deg, #C9A227, #9A7B1A);
    color: #1A2436;
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(201, 162, 39, 0.4);
}

.finance-game .fin-btn:hover { transform: translateY(-2px); }

.finance-game .fin-btn.approve { background: linear-gradient(135deg, #3E9C5A, #2C7442); color: white; }
.finance-game .fin-btn.deny { background: linear-gradient(135deg, #C0453A, #92352C); color: white; }
.finance-game .fin-btn.sell { background: linear-gradient(135deg, #3E9C5A, #2C7442); color: white; font-size: 1.2rem; }

.finance-game .fin-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 560px;
}

.finance-game .fin-options-column {
    flex-direction: column;
    width: 100%;
}

.finance-game .fin-option {
    background: rgba(31, 50, 74, 0.92);
    border: 2px solid rgba(94, 129, 172, 0.55);
    color: #EAF0F7;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-align: center;
}

.finance-game .fin-options-column .fin-option { text-align: left; }

.finance-game .fin-option:hover {
    background: rgba(201, 162, 39, 0.25);
    transform: translateY(-1px);
}

.finance-game .fin-option.correct {
    background: #2E7D32;
    border-color: #4ADE80;
}

.finance-game .fin-option.wrong {
    background: #8E2A2A;
    border-color: #FF6B6B;
}

.finance-game .shake-wrong {
    animation: fin-shake 0.4s;
}

@keyframes fin-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Shared info panel */
.finance-game .fin-panel {
    width: 100%;
    max-width: 440px;
    background: rgba(31, 50, 74, 0.92);
    border: 2px solid rgba(201, 162, 39, 0.5);
    border-radius: 12px;
    padding: 14px 20px;
}

.finance-game .fin-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(94, 129, 172, 0.25);
    gap: 10px;
}

.finance-game .fin-row:last-child { border-bottom: none; }

.finance-game .fin-row.fin-title {
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #E8C547;
}

.finance-game .fin-row strong { color: #E8C547; white-space: nowrap; }

.finance-game .fin-row.highlight span:first-child { color: #7ED6F0; font-weight: 600; }

.finance-game .fin-scenario {
    background: rgba(31, 50, 74, 0.92);
    border-left: 4px solid #C9A227;
    border-radius: 8px;
    padding: 14px 18px;
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.5;
}

/* ----- Check Verification ----- */
.fin-check {
    width: 100%;
    max-width: 520px;
    background: #F2EFE4;
    color: #26292E;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    font-family: Georgia, serif;
}

.check-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.check-bank {
    font-weight: 700;
    color: #1F3A5F;
    letter-spacing: 0.5px;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.check-line > span { font-size: 0.9rem; color: #555; }

.check-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 14px;
}

.check-memo { font-size: 0.85rem; color: #777; }

.check-field {
    background: transparent;
    border: 2px dashed transparent;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: Georgia, serif;
    font-size: 0.98rem;
    color: #26292E;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.check-field:hover {
    border-color: #C9A227;
    background: rgba(201, 162, 39, 0.12);
}

.check-field.correct { border-color: #2E7D32; background: rgba(74, 222, 128, 0.25); }
.check-field.wrong { border-color: #C0453A; background: rgba(255, 107, 107, 0.2); }

.check-amt { margin-left: auto; border: 1.5px solid #999 !important; }
.check-words { flex: 1; border-bottom: 1.5px solid #999 !important; border-radius: 0; text-align: left; }
.check-sig { font-style: italic; border-bottom: 1.5px solid #999 !important; border-radius: 0; min-width: 140px; }

/* ----- Loan Decision ----- */
.loan-buttons {
    display: flex;
    gap: 16px;
}

/* ----- Budget Balance ----- */
.budget-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 560px;
}

.budget-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(31, 50, 74, 0.92);
    border: 2px solid rgba(94, 129, 172, 0.5);
    border-radius: 10px;
    padding: 8px 18px;
    flex: 1;
    min-width: 140px;
}

.budget-stat span { font-size: 0.8rem; color: #A9BDD4; text-align: center; }
.budget-stat strong { font-size: 1.15rem; }
.budget-stat.good { border-color: #4ADE80; }
.budget-stat.good strong { color: #4ADE80; }
.budget-stat.bad { border-color: #FF6B6B; }
.budget-stat.bad strong { color: #FF6B6B; }

.budget-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 620px;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: rgba(31, 50, 74, 0.92);
    border: 2px solid rgba(94, 129, 172, 0.55);
    color: #EAF0F7;
    border-radius: 10px;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 185px;
}

.budget-item:hover { background: rgba(201, 162, 39, 0.22); }

.budget-item.essential {
    border-color: rgba(126, 214, 240, 0.5);
    cursor: not-allowed;
    opacity: 0.85;
}

.budget-item.cut {
    text-decoration: line-through;
    opacity: 0.45;
    border-color: #4ADE80;
}

.budget-item strong { color: #E8C547; }

/* ----- Fraud Watch ----- */
.fraud-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 600px;
}

.fraud-tx {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr auto;
    align-items: center;
    gap: 10px;
    background: rgba(31, 50, 74, 0.92);
    border: 2px solid rgba(94, 129, 172, 0.5);
    color: #EAF0F7;
    border-radius: 10px;
    padding: 9px 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.fraud-tx:hover { background: rgba(192, 69, 58, 0.25); }

.fraud-desc { font-weight: 600; font-size: 0.92rem; }
.fraud-note { font-size: 0.78rem; color: #A9BDD4; }
.fraud-amt { color: #E8C547; font-family: monospace; font-size: 0.95rem; }

.fraud-tx.fraud-caught {
    border-color: #FF6B6B;
    background: rgba(142, 42, 42, 0.55);
    pointer-events: none;
}

.fraud-tx.fraud-caught .fraud-desc::after {
    content: '  🚫 FRAUD';
    color: #FF6B6B;
    font-size: 0.75rem;
}

/* ----- Vault Procedure ----- */
.vault-display {
    background: #10151C;
    border: 3px solid #C9A227;
    border-radius: 12px;
    padding: 16px 34px;
    font-family: monospace;
    font-size: 2rem;
    letter-spacing: 4px;
    color: #6B7684;
    min-width: 260px;
    text-align: center;
}

.vault-display.showing { color: #E8C547; }
.vault-display.vault-open { color: #4ADE80; border-color: #4ADE80; }

.vault-keypad {
    display: grid;
    grid-template-columns: repeat(3, 74px);
    gap: 10px;
    justify-content: center;
}

.vault-key {
    width: 74px;
    height: 58px;
    background: rgba(31, 50, 74, 0.95);
    border: 2px solid rgba(94, 129, 172, 0.6);
    color: #EAF0F7;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.12s, transform 0.08s;
}

.vault-key:hover { background: rgba(201, 162, 39, 0.3); }
.vault-key:active { transform: scale(0.94); }
.vault-key.vault-clear { color: #FF6B6B; }

/* ----- Market Timing ----- */
.market-chart {
    position: relative;
    width: 200px;
    height: 300px;
    background: linear-gradient(180deg, #10151C, #1A2436);
    border: 3px solid #3A5070;
    border-radius: 14px;
    overflow: hidden;
}

.market-zone {
    position: absolute;
    width: 100%;
    background: rgba(74, 222, 128, 0.22);
    border-top: 2px dashed #4ADE80;
    border-bottom: 2px dashed #4ADE80;
}

.market-needle {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #7ED6F0;
    box-shadow: 0 0 8px rgba(126, 214, 240, 0.8);
    transition: bottom 0.06s linear;
}

.market-needle.in-zone {
    background: #4ADE80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 1);
}

.market-price {
    position: absolute;
    right: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #E8C547;
    transition: bottom 0.06s linear;
}
