/* =========================
   GLOBAL BASE
   ========================= */

body {
    background-color: #174C4F;      /* NEW */
    color: #FDF8F1;                 /* NEW */
    font-family: 'Karma', serif;    /* NEW */

    margin: 0;
    padding: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    height: 100vh;
    text-align: center;
}

.container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

h1 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* =========================
   OPTIONS (RADIO REPLACEMENT)
   ========================= */

.option {
    background-color: #1e5b5f;
    margin: 10px 0;
    padding: 15px;

    border: 2px solid rgba(253,248,241,0.25);
    border-radius: 8px;

    cursor: pointer;
    transition: background-color 0.25s ease;

    text-align: left;
}

/* Hide native radio */
.option input[type="radio"] {
    display: none;
}

/* Label layout */
.option label {
    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 1rem;
    cursor: pointer;

    color: #FDF8F1;
}

/* Square letter box (A/B/C/D) */
.option-letter {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #174C4F;
    border: 2px solid #CCAA41;
    border-radius: 4px;

    font-weight: bold;
    font-size: 0.9rem;
    color: #CCAA41;

    flex-shrink: 0;
}

/* Hover + checked background */
.option:hover,
.option input[type="radio"]:checked + label {
    background-color: #256b70;
}

.option input[type="radio"]:checked + label .option-letter {
    background-color: #CCAA41;
    color: #174C4F;
}

/* =========================
   FORMS
   ========================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;

    border-radius: 5px;
    border: none;

    font-family: 'Karma', serif;
}

.form-button {
    background-color: #CCAA41;   /* NEW */
    color: #174C4F;

    padding: 10px 20px;
    border: none;
    border-radius: 6px;

    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;

    transition: background-color 0.2s ease;
}

.form-button:hover {
    background-color: #b99937;
}

/* =========================
   START PAGE – EDITORIAL STYLE
   ========================= */

.intro-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.intro-title {
    font-family: 'Karma', serif;
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    color: #FDF8F1;
}

.intro-subtitle {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(253,248,241,0.85);
    margin-bottom: 32px;
}

.intro-note {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(253,248,241,0.75);
    margin-bottom: 40px;
}

.begin-button {
    background-color: #CCAA41;
    color: #174C4F;
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.begin-button:hover {
    background-color: #b99937;
}

.enter-hint,
.intro-wrapper form + span,
.intro-wrapper form + text {
    font-size: 0.85rem;
    color: rgba(253,248,241,0.7);
    margin-left: 8px;
}

.intro-time {
    margin-top: 18px;
    font-size: 0.85rem;
    color: rgba(253,248,241,0.7);
}

/* =========================
   CHART / ANALYSIS PAGE
   ========================= */

/* Disable global flex-centering for analysis pages */
body.analysis-page {
    display: block;
    height: auto;
    text-align: left;
}

/* Chart container */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
}

/* Canvas fills wrapper */
.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* =========================
   RESULT / STYLE PAGES
   ========================= */

body.analysis-page {
    display: block;
    height: auto;
    text-align: left;
    background-color: #FFFFFF;
}

/* Centered boxed container */
.result-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background-color: #174C4F;
    box-sizing: border-box;
}

/* Two-column layout */
.result-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* Text */
.result-text {
    color: #FDF8F1;
}

/* Image */
.result-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer */
.result-text .copyright {
    margin-top: 30px;
    font-size: 0.85rem;
    opacity: 0.85;
}

@media (min-width: 1024px) {
    h1 {
        white-space: nowrap;
    }
}
