/* Base styles for all pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container.full-width {
    max-width: none;
    width: 100%;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2em;
}

h2 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

h3 {
    color: #7f8c8d;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

p {
    margin-bottom: 15px;
    color: #555;
}

ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
    color: #666;
}

/* Info box */
.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.mission-card {
    background: linear-gradient(135deg, #eef6ff, #f8fbff);
    border: 1px solid #d4e5ff;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 25px 0;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
}

.mission-card ul {
    margin-left: 20px;
}

.mission-tag {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 6px;
}

.mission-footnote {
    font-size: 0.9rem;
    color: #1f2937;
    margin-top: 12px;
    font-weight: 500;
}

.narrative-interlude {
    background: #fdf7ed;
    border: 1px solid #f5d6a3;
    border-radius: 12px;
    padding: 22px 26px;
    margin: 24px 0;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.12);
}

.narrative-interlude--finale {
    background: #eefcf6;
    border-color: #c5f3de;
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.12);
}

.results-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.results-chart {
    position: relative;
    margin: 24px 0;
}

.results-chart--tall {
    height: 400px;
}

.results-chart--medium {
    height: 300px;
}

.percentile-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

.percentile-card {
    text-align: center;
    min-width: 120px;
}

.percentile-card strong {
    display: block;
    font-size: 14px;
    color: #1F2937;
}

.percentile-card span {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #3B82F6;
    margin-top: 4px;
}

.percentile-card small {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

.results-definitions {
    list-style: none;
    padding: 0;
    margin: 12px auto 0;
    max-width: 520px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.results-definitions li + li {
    margin-top: 6px;
}

.narrative-tag {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #c2410c;
    font-weight: 600;
    margin-bottom: 6px;
}

.narrative-interlude--finale .narrative-tag {
    color: #047857;
}

.narrative-note {
    font-size: 0.92rem;
    color: #4b5563;
    margin-top: 10px;
}

.mission-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 6px;
}

.trait-badge-card {
    background: linear-gradient(135deg, #ede9fe, #fdf4ff);
    border: 1px solid #c4b5fd;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 24px 0;
    text-align: left;
    box-shadow: 0 14px 30px rgba(129, 140, 248, 0.15);
    position: relative;
    overflow: hidden;
}
.trait-badge-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at center, rgba(129,140,248,0.18), transparent 60%);
    transform: rotate(20deg);
}
.trait-badge-detail {
    font-weight: 600;
}
.trait-badge-card .badge-pill {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(129,140,248,0.15);
    color: #4c1d95;
    font-weight: 700;
}

.trait-badge-card h2 {
    margin: 0 0 8px 0;
    color: #4c1d95;
}

.trait-badge-detail {
    color: #4b5563;
    font-weight: 500;
}

/* Earned badges */
.badges-card .results-header {
    align-items: flex-start;
}
.badges-card .subtext {
    margin: 0.2rem 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.badge-tile {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    box-shadow: 0 8px 18px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.08);
}
.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: inset 0 -2px 6px rgba(0,0,0,0.08);
}
.badge-copy strong {
    display: block;
    color: #0f172a;
    margin-bottom: 4px;
}
.badge-copy p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.4;
}

.trait-snapshot {
    margin: 30px 0;
}

.trait-header h2 {
    margin-bottom: 6px;
}

.trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.trait-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.trait-card h3 {
    margin-bottom: 8px;
    color: #1e293b;
}

.trait-score {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.trait-percentile {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.trait-level {
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 8px;
}

.trait-descriptor {
    color: #475569;
    margin-bottom: 0;
}

.percentile-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

.percentile-card {
    text-align: center;
    min-width: 120px;
}

.percentile-card strong {
    display: block;
    font-size: 14px;
    color: #1F2937;
}

.percentile-card span {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #3B82F6;
    margin-top: 4px;
}

.percentile-card small {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

.trait-footnote {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 12px;
}

.hexad-summary {
    margin: 30px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
}

.hexad-summary table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.hexad-summary th,
.hexad-summary td {
    border: 1px solid #e2e8f0;
    padding: 10px;
    text-align: center;
}

.achievement-log {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    padding: 22px 24px;
    margin: 24px 0;
    border-radius: 12px;
}

.achievement-log ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.achievement-log li {
    margin-bottom: 8px;
    color: #1e40af;
    font-weight: 500;
}

.followup-cta {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    background: #f8fafc;
}

.followup-cta.is-answered {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.cta-feedback {
    color: #475569;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-primary:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.button-container {
    margin-top: 30px;
    text-align: center;
}

.button-container .btn {
    margin: 0 10px;
}

/* Forms */
.consent-form {
    margin-top: 30px;
}

.checkbox-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #3498db;
}

.checkbox-container label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Success message */
.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

/* Consent text */
.consent-text {
    margin: 20px 0;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 5px;
}

/* Welcome page */
.welcome-page h1 {
    text-align: center;
    color: #2c3e50;
}

/* Completion summary card */
.completion-card {
    background-color: #fdf4eb;
    border: 2px solid #f7c88b;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    margin: 20px auto;
    max-width: 520px;
}

.completion-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.completion-points {
    font-size: 2rem;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 8px;
}

.completion-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #2c3e50;
    font-weight: 500;
}

.completion-list li {
    margin: 6px 0;
}

/* Reward completion extras */
.reward-cache .card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 12px;
    justify-items: center;
}
.reward-cache .reward-card {
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 16px;
    background: #f8f9fb;
    width: 100%;
    max-width: 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.3s ease;
}
.reward-card--hidden {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    position: relative;
}
.reward-reveal {
    border: none;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px;
    padding: 18px 22px;
    font-size: 38px;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0,0,0,0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.reward-reveal:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 32px rgba(0,0,0,0.16);
}
.reward-reveal:active {
    transform: translateY(-1px) scale(0.98);
}
.reward-card.revealed .reward-reveal {
    display: none;
}
.reward-card.revealed .reward-text {
    display: block;
    animation: popFade 0.35s ease-out;
}
.reward-text {
    display: none;
    font-size: 15px;
    line-height: 1.5;
    color: #0f172a;
    text-align: center;
    padding: 4px 2px;
}
.reward-card.revealed {
    background: linear-gradient(180deg, #fef9e7 0%, #fff 40%);
    box-shadow: 0 16px 32px rgba(0,0,0,0.12);
    transform: translateY(-2px) scale(1.01);
    animation: revealCard 0.4s ease-out;
}
@keyframes popFade {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes revealCard {
    0% { opacity: 0; transform: translateY(10px) scale(0.93); }
    60% { opacity: 1; transform: translateY(-1px) scale(1.03); }
    100% { opacity: 1; transform: translateY(-2px) scale(1.01); }
}
.badge-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
    justify-content: center;
}
.badge-option {
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}
.badge-option.selected {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}
.hidden-text {
    display: none;
    margin-top: 6px;
    color: #333;
}
.hidden-text.visible {
    display: block;
}

.floating-confetti {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fef3c7;
    color: #b45309;
    font-size: 24px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 999;
}

/* Complete page */
.complete-page {
    text-align: center;
}

.complete-page h1 {
    color: #27ae60;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}


.ux-floating-cta {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 10px 14px;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}
.ux-floating-cta .btn {
    margin: 0;
}
