/* --- Global Reset & Page Structure --- */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: #f4f6f8; 
    color: #333; 
    margin: 0; 
    padding: 40px 20px; 
    line-height: 1.6;
}

.container { 
    max-width: 650px; 
    margin: 0 auto; 
    background: #fff; 
    padding: 35px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

/* --- Progress Tracking --- */
.progress-bar { 
    background: #e2e8f0; 
    height: 6px; 
    border-radius: 3px; 
    margin-bottom: 30px; 
    overflow: hidden; 
}

.progress-fill { 
    background: #2563eb; 
    height: 100%; 
    width: 5%; 
    transition: width 0.3s ease; 
}

.meta { 
    font-size: 0.9rem; 
    color: #64748b; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 600; 
}

.question-text { 
    font-size: 1.35rem; 
    font-weight: 500; 
    margin: 15px 0 35px 0; 
    line-height: 1.5; 
    color: #1e293b; 
    min-height: 80px; 
}

/* --- Horizontal Likert Scale Layout --- */
.button-group { 
    display: flex; 
    flex-direction: row; 
    justify-content: space-between; 
    gap: 10px; 
    margin-top: 25px;
}

.likert-btn { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 18px 10px; 
    text-align: center; 
    font-size: 0.9rem; 
    cursor: pointer; 
    font-weight: 500; 
    color: #334155; 
    transition: all 0.2s ease; 
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.likert-btn strong {
    font-size: 1.4rem;
    color: #1e293b;
}

.likert-btn:hover { 
    background: #2563eb; 
    border-color: #2563eb; 
    color: #ffffff; 
}

.likert-btn:hover strong {
    color: #ffffff;
}

/* --- Recap Page Extensions --- */
.container.recap-container {
    max-width: 600px;
    text-align: center;
}

.type-badge { 
    font-size: 4rem; 
    font-weight: 800; color: #2563eb; 
    letter-spacing: 2px; 
    margin: 20px 0; 
}

.metric { 
    display: flex; 
    justify-content: space-between; 
    margin: 10px 0; 
    padding: 8px; 
    background: #f8fafc; 
    border-radius: 4px; 
    text-align: left;
}

.btn { 
    display: inline-block; 
    background: #2563eb; 
    color: #fff; 
    padding: 12px 24px; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 600; 
    margin-top: 20px; 
}

/* --- Ad Units --- */
.ad-container, .ad-wrapper { 
    margin-top: 50px; 
    padding: 20px; 
    background: #fafafa; 
    border: 1px dashed #d1d5db; 
    text-align: center; 
    font-size: 0.8rem; 
    color: #9ca3af; 
}

.ad-wrapper {
    margin-top: 40px;
    background: #ebebeb;
    border-color: #bbb;
    color: #666;
    font-size: 0.85rem;
}

/* --- Mobile Breakpoint --- */
@media (max-width: 600px) {
    body {
        padding: 20px 10px;
    }
    .button-group {
        flex-direction: column;
        gap: 12px;
    }
    .likert-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px 20px;
        gap: 15px;
        text-align: left;
    }
}

/* ==========================================================================
   MBTI PROFILE VIEW & STATE COMPASS STYLES
   ========================================================================== */

/* Structural Layout & Utilities */
.content-area { 
    padding: 25px; 
    border-radius: 8px; 
    margin-top: 25px; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.clear-fix {
    clear: both;
}

.title-header {
    text-align: center; 
    margin-top: 10px;
}

.section-divider {
    opacity: 0.2;
}

.content-title {
    margin-top: 0; 
    font-size: 1.5rem;
}

.content-text {
    font-size: 1.15rem; 
    line-height: 1.6; 
    margin-bottom: 20px;
}

.traits-panel {
    margin-top: 20px; 
    padding-top: 15px; 
    border-top: 1px dashed #ccc;
}

.traits-title {
    margin: 0 0 5px 0; 
    color: #2bba2b;
}

.traits-context {
    font-size: 0.95rem; 
    margin: 0 0 10px 0;
}

.traits-list {
    padding-left: 20px; 
    margin: 5px 0 0 0;
}

.traits-item {
    margin-bottom: 5px; 
    font-size: 1rem;
}

.clinical-footer {
    margin-top: 20px; 
    font-size: 0.9rem; 
    font-style: italic; 
    opacity: 0.75;
}

/* Directional Arrow Compass Navigation Grid */
.nav-compass { 
    display: grid; 
    grid-template-columns: repeat(3, 100px); 
    gap: 12px; 
    justify-content: center; 
    margin: 30px auto; 
}

.nav-btn { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 8px; 
    text-align: center; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold; 
    border: 1px solid rgba(0,0,0,0.15);
    transition: transform 0.2s, background-color 0.2s;
}

.nav-btn:hover {
    transform: scale(1.05);
}

.arrow-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.label-text {
    font-size: 0.75rem;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Compass Grid Placements */
.compass-up { grid-column: 2; }
.compass-left { grid-column: 1; }
.compass-right { grid-column: 3; }
.compass-down { grid-column: 2; }

/* State Themes & Contextual Container Contrast */

/* 1. Normal State (Clean Light Theme) */
.state-normal { background: #f4f4f9; }
.state-normal .container { background: #ffffff; color: #333; }
.state-normal .nav-btn { background: #f8f9fa; color: #333; }
.state-normal .nav-btn:hover { background: #e2e6ea; }

/* 2. Flip State / Shadow Meltdown (Deep Cosmic Dark) */
.state-flip { background: #121212; }
.state-flip .container { background: #222222; color: #eeeeee; border: 1px solid #333; }
.state-flip .nav-btn { background: #333333; color: #ffffff; border-color: #444; }
.state-flip .nav-btn:hover { background: #444444; }
.state-flip .btn { background: #444; color: #fff; }

/* 3. Defensive State (Icy Cool Blue) */
.state-defensive { background: #e0f7fa; }
.state-defensive .container { background: #f0fdfa; color: #006064; border-color: #b2ebf2; }
.state-defensive .nav-btn { background: #e0f7fa; color: #006064; border-color: #b2ebf2; }
.state-defensive .nav-btn:hover { background: #b2ebf2; }

/* 4. Aggressive State (Fiery Hot Crimson) */
.state-aggressive { background: #ffebee; }
.state-aggressive .container { background: #fff5f5; color: #8b0000; border-color: #ffcdd2; }
.state-aggressive .nav-btn { background: #ffebee; color: #8b0000; border-color: #ffcdd2; }
.state-aggressive .nav-btn:hover { background: #ffcdd2; }