/*
 * GoRhyme Name That Play styles, refined.
 *
 * A drop-in replacement for the original CSS. Same class names, no markup or
 * script changes needed. The aim is to read like a finely set page rather than
 * a settings panel: the quote is the centerpiece, green stays the interactive
 * and state color, and a warm gold carries the literary ornament.
 *
 * House rules held throughout: labels at 13px or larger, body and descriptive
 * text at 14px or larger, nothing below 12px anywhere, and secondary text on
 * the dark panels at #9dbf9d or stronger. No em-dashes in any copy or comment.
 */

.gorhyme-ntp {
    --ntp-bg: #11201a;
    --ntp-bg-2: #142519;
    --ntp-panel: #182a1f;
    --ntp-panel-2: #1d3326;
    --ntp-border: #2c4a39;
    --ntp-text: #edf3ea;
    --ntp-secondary: #9dbf9d;        /* floor for secondary text on dark */
    --ntp-accent: #6fbf7a;           /* green: interactive and correct */
    --ntp-accent-strong: #4f9a5e;
    --ntp-gold: #c9a86a;             /* gold: literary ornament */
    --ntp-gold-bright: #e0c388;
    --ntp-gold-soft: rgba(201, 168, 106, 0.16);
    --ntp-correct: #6fbf7a;
    --ntp-wrong: #e0907f;
    --ntp-focus: #bfe6c4;
    --ntp-serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;

    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: 34px 36px 36px;
    color: var(--ntp-text);
    border: 1px solid var(--ntp-border);
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.55;
    box-sizing: border-box;

    /* Layered background for depth rather than a flat fill. */
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(111, 191, 122, 0.10), transparent 60%),
        linear-gradient(165deg, var(--ntp-bg-2), var(--ntp-bg));
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* A hairline gold rule along the very top edge, like a printed header rule. */
.gorhyme-ntp::before {
    content: "";
    position: absolute;
    top: 0;
    left: 36px;
    right: 36px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ntp-gold), transparent);
    opacity: 0.75;
    z-index: 2;
}

/* Faint grain overlay for atmosphere. Sits above the fill, below the content. */
.gorhyme-ntp::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gorhyme-ntp *,
.gorhyme-ntp *::before,
.gorhyme-ntp *::after {
    box-sizing: border-box;
}

/* Keep all screens above the grain overlay. */
.gorhyme-ntp .ntp-screen {
    position: relative;
    z-index: 1;
}

/* Title with a short gold flourish beneath it. */
.gorhyme-ntp .ntp-title {
    font-family: var(--ntp-serif);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--ntp-text);
}

.gorhyme-ntp .ntp-title::after {
    content: "";
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 12px;
    background: linear-gradient(90deg, var(--ntp-gold), transparent);
}

.gorhyme-ntp .ntp-intro {
    font-family: var(--ntp-serif);
    font-size: 18px;
    font-style: italic;
    line-height: 1.5;
    color: var(--ntp-secondary);
    margin: 0 0 24px;
    max-width: 60ch;
}

/* Setup controls */
.gorhyme-ntp .ntp-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.gorhyme-ntp .ntp-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Field labels and legends become small gold kickers. */
.gorhyme-ntp .ntp-field > label,
.gorhyme-ntp .ntp-fieldset legend {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ntp-gold);
    padding: 0;
}

.gorhyme-ntp .ntp-fieldset {
    border: 1px solid var(--ntp-border);
    border-radius: 12px;
    padding: 12px 16px 14px;
    margin: 0;
    background: rgba(255, 255, 255, 0.012);
}

.gorhyme-ntp .ntp-fieldset legend {
    padding: 0 6px;
}

.gorhyme-ntp .ntp-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--ntp-text);
    margin-top: 8px;
    cursor: pointer;
}

.gorhyme-ntp .ntp-radio input {
    accent-color: var(--ntp-accent);
    width: 17px;
    height: 17px;
}

/* Custom select with a gold chevron. */
.gorhyme-ntp select {
    -webkit-appearance: none;
    appearance: none;
    font-size: 15px;
    color: var(--ntp-text);
    background-color: var(--ntp-panel);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%23c9a86a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--ntp-border);
    border-radius: 9px;
    padding: 11px 36px 11px 13px;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.gorhyme-ntp select:hover {
    border-color: var(--ntp-accent-strong);
}

/* Primary button */
.gorhyme-ntp .ntp-btn {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0c1710;
    background: linear-gradient(180deg, #7fcd8a, var(--ntp-accent));
    border: none;
    border-radius: 10px;
    padding: 13px 28px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(79, 154, 94, 0.28);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gorhyme-ntp .ntp-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(79, 154, 94, 0.34);
}

.gorhyme-ntp .ntp-btn:active {
    transform: translateY(0);
}

.gorhyme-ntp .ntp-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.gorhyme-ntp .ntp-message {
    font-size: 14px;
    color: var(--ntp-secondary);
    margin: 16px 0 0;
    min-height: 18px;
}

/* Quiz status bar */
.gorhyme-ntp .ntp-statusbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: baseline;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ntp-secondary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ntp-border);
}

.gorhyme-ntp .ntp-score {
    font-weight: 700;
    color: var(--ntp-text);
}

.gorhyme-ntp .ntp-streak {
    font-weight: 700;
    color: var(--ntp-gold-bright);
}

/* The quote card: the centerpiece. */
.gorhyme-ntp .ntp-quote-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, var(--ntp-panel-2), var(--ntp-panel));
    border: 1px solid var(--ntp-border);
    border-radius: 14px;
    padding: 30px 32px 30px 36px;
    margin-bottom: 22px;
    box-shadow:
        inset 0 0 0 1px rgba(201, 168, 106, 0.10),
        0 8px 24px rgba(0, 0, 0, 0.26);
    animation: ntp-rise 0.5s ease both;
}

/* Oversized decorative open quote behind the line. */
.gorhyme-ntp .ntp-quote-card::before {
    content: "\201C";
    position: absolute;
    top: -18px;
    left: 14px;
    font-family: var(--ntp-serif);
    font-size: 150px;
    line-height: 1;
    color: var(--ntp-gold);
    opacity: 0.14;
    pointer-events: none;
}

.gorhyme-ntp .ntp-badge {
    position: relative;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ntp-secondary);
    padding: 4px 12px;
    margin-bottom: 16px;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.gorhyme-ntp .ntp-tier-easy { color: #8fd49a; }
.gorhyme-ntp .ntp-tier-medium { color: #d4c98a; }
.gorhyme-ntp .ntp-tier-hard { color: #e0b07f; }

.gorhyme-ntp .ntp-quote {
    position: relative;
    font-family: var(--ntp-serif);
    font-size: 27px;
    line-height: 1.42;
    font-style: italic;
    color: #f4f7f0;
    margin: 0;
}

.gorhyme-ntp .ntp-prompt-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ntp-gold);
    margin: 0 0 14px;
}

/* Multiple choice options */
.gorhyme-ntp .ntp-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.gorhyme-ntp .ntp-option {
    position: relative;
    font-family: var(--ntp-serif);
    font-size: 19px;
    text-align: left;
    color: var(--ntp-text);
    background: var(--ntp-panel);
    border: 1px solid var(--ntp-border);
    border-radius: 10px;
    padding: 15px 18px 15px 22px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
    animation: ntp-rise 0.4s ease both;
}

/* A gold accent bar on the left that grows on hover. */
.gorhyme-ntp .ntp-option::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ntp-gold);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.18s ease;
}

.gorhyme-ntp .ntp-option:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--ntp-panel-2);
    border-color: var(--ntp-accent-strong);
}

.gorhyme-ntp .ntp-option:hover:not(:disabled)::before {
    transform: scaleY(1);
}

.gorhyme-ntp .ntp-option:disabled {
    cursor: default;
}

/* Stagger the option entrance. */
.gorhyme-ntp .ntp-option:nth-child(1) { animation-delay: 0.02s; }
.gorhyme-ntp .ntp-option:nth-child(2) { animation-delay: 0.09s; }
.gorhyme-ntp .ntp-option:nth-child(3) { animation-delay: 0.16s; }
.gorhyme-ntp .ntp-option:nth-child(4) { animation-delay: 0.23s; }

.gorhyme-ntp .ntp-option.is-correct {
    border-color: var(--ntp-correct);
    background: rgba(111, 191, 122, 0.16);
    color: #dcf3e0;
}

.gorhyme-ntp .ntp-option.is-correct::before {
    background: var(--ntp-correct);
    transform: scaleY(1);
}

.gorhyme-ntp .ntp-option.is-wrong {
    border-color: var(--ntp-wrong);
    background: rgba(224, 144, 127, 0.16);
    color: #f5ddd7;
}

.gorhyme-ntp .ntp-option.is-wrong::before {
    background: var(--ntp-wrong);
    transform: scaleY(1);
}

/* Free response */
.gorhyme-ntp .ntp-free {
    margin-bottom: 18px;
}

.gorhyme-ntp .ntp-free > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ntp-gold);
    margin-bottom: 8px;
}

.gorhyme-ntp .ntp-free-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gorhyme-ntp .ntp-free-input {
    flex: 1 1 220px;
    font-family: var(--ntp-serif);
    font-size: 18px;
    color: var(--ntp-text);
    background: var(--ntp-panel);
    border: 1px solid var(--ntp-border);
    border-radius: 9px;
    padding: 12px 14px;
}

.gorhyme-ntp .ntp-free-input:focus {
    border-color: var(--ntp-accent);
    outline: none;
}

/* Reveal panel */
.gorhyme-ntp .ntp-reveal {
    background: var(--ntp-panel);
    border: 1px solid var(--ntp-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    animation: ntp-rise 0.35s ease both;
}

.gorhyme-ntp .ntp-reveal.is-correct { border-left: 3px solid var(--ntp-correct); }
.gorhyme-ntp .ntp-reveal.is-wrong { border-left: 3px solid var(--ntp-wrong); }

.gorhyme-ntp .ntp-verdict {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.gorhyme-ntp .ntp-reveal.is-correct .ntp-verdict { color: var(--ntp-correct); }
.gorhyme-ntp .ntp-reveal.is-wrong .ntp-verdict { color: var(--ntp-wrong); }

.gorhyme-ntp .ntp-reveal-work {
    font-family: var(--ntp-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--ntp-text);
    margin: 0 0 5px;
}

.gorhyme-ntp .ntp-reveal-meta {
    font-size: 14px;
    color: var(--ntp-secondary);
    margin: 0;
}

/* The textual note reads like a scholarly margin gloss. */
.gorhyme-ntp .ntp-variant-note {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--ntp-gold-soft);
    border-left: 3px solid var(--ntp-gold);
    border-radius: 0 8px 8px 0;
}

.gorhyme-ntp .ntp-variant-head {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ntp-gold-bright);
    margin-bottom: 6px;
}

.gorhyme-ntp .ntp-variant-note p {
    font-size: 14px;
    color: var(--ntp-text);
    margin: 0;
    line-height: 1.6;
}

/* Summary */
.gorhyme-ntp .ntp-summary-score {
    font-family: var(--ntp-serif);
    font-size: 20px;
    color: var(--ntp-text);
    margin: 0 0 22px;
}

.gorhyme-ntp .ntp-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 24px;
}

.gorhyme-ntp .ntp-breakdown-group h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--ntp-gold);
    margin: 0 0 10px;
}

.gorhyme-ntp .ntp-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.gorhyme-ntp .ntp-breakdown-table td {
    font-size: 14px;
    color: var(--ntp-secondary);
    padding: 7px 0;
    border-bottom: 1px solid var(--ntp-border);
}

.gorhyme-ntp .ntp-breakdown-val {
    text-align: right;
    color: var(--ntp-text);
    font-weight: 600;
}

@keyframes ntp-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Honor reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .gorhyme-ntp .ntp-quote-card,
    .gorhyme-ntp .ntp-option,
    .gorhyme-ntp .ntp-reveal {
        animation: none;
    }
    .gorhyme-ntp .ntp-btn,
    .gorhyme-ntp .ntp-option {
        transition: none;
    }
}

/* Accessibility: clearly visible focus on every interactive element. */
.gorhyme-ntp button:focus-visible,
.gorhyme-ntp select:focus-visible,
.gorhyme-ntp input:focus-visible,
.gorhyme-ntp .ntp-radio input:focus-visible {
    outline: 3px solid var(--ntp-focus);
    outline-offset: 2px;
}

/* Responsive: single column on narrow screens. */
@media (max-width: 540px) {
    .gorhyme-ntp {
        padding: 26px 22px 28px;
    }
    .gorhyme-ntp::before {
        left: 22px;
        right: 22px;
    }
    .gorhyme-ntp .ntp-title {
        font-size: 27px;
    }
    .gorhyme-ntp .ntp-controls,
    .gorhyme-ntp .ntp-options,
    .gorhyme-ntp .ntp-breakdown {
        grid-template-columns: 1fr;
    }
    .gorhyme-ntp .ntp-quote {
        font-size: 22px;
    }
    .gorhyme-ntp .ntp-quote-card::before {
        font-size: 110px;
        top: -10px;
    }
}
