/*
 * =========================================================
 * CHEMISTRY TOOLS
 * ISOTOPES, MASS SPECTRA & RELATIVE ATOMIC MASS
 * =========================================================
 */

.chemistry-isotopes-app {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: Arial, Helvetica, sans-serif;
}


/*
 * =========================================================
 * HEADER
 * =========================================================
 */

.isotope-header {
    margin-bottom: 24px;
}

.isotope-header h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.isotope-header p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}


/*
 * =========================================================
 * CONTROLS
 * =========================================================
 */

.isotope-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.isotope-control {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.isotope-control label {
    font-weight: 700;
}

.isotope-control select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    font-size: 15px;
}


/*
 * =========================================================
 * QUESTION CARD
 * =========================================================
 */

.isotope-question-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/*
 * =========================================================
 * META
 * =========================================================
 */

.isotope-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.isotope-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}


/*
 * =========================================================
 * QUESTION
 * =========================================================
 */

.isotope-question {
    margin-bottom: 22px;
    font-size: 19px;
    line-height: 1.65;
    font-weight: 600;
}

.isotope-question sub {
    font-size: 70%;
}


/*
 * =========================================================
 * MASS SPECTRUM
 * =========================================================
 */

.isotope-spectrum {
    display: none;
    width: 100%;
    margin: 22px 0 26px;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.isotope-spectrum-svg {
    display: block;
    width: 100%;
    height: auto;
    color: #222;
}


/*
 * =========================================================
 * ANSWER AREA
 * =========================================================
 */

.isotope-answer-area {
    margin-top: 18px;
}

.isotope-answer-area label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.isotope-answer-area input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 17px;
}

.isotope-answer-area input:focus {
    outline: 2px solid rgba(0, 0, 0, 0.15);
    border-color: #777;
}

.isotope-answer-hint {
    margin-top: 7px;
    color: #666;
    font-size: 13px;
}


/*
 * =========================================================
 * BUTTONS
 * =========================================================
 */

.isotope-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.isotope-button {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.isotope-button:hover {
    opacity: 0.9;
}

.isotope-button-primary {
    background: #222;
    color: #fff;
}

.isotope-button-secondary {
    background: #ececec;
    color: #222;
}


/*
 * =========================================================
 * FEEDBACK
 * =========================================================
 */

.isotope-feedback {
    margin-top: 20px;
    padding: 0;
    border-radius: 10px;
    line-height: 1.6;
}

.isotope-feedback-correct,
.isotope-feedback-incorrect,
.isotope-feedback-info {
    padding: 16px;
}

.isotope-feedback-correct {
    background: #eaf7ee;
    border: 1px solid #9fd4ae;
}

.isotope-feedback-incorrect {
    background: #fff1f1;
    border: 1px solid #e2aaaa;
}

.isotope-feedback-info {
    background: #eef5ff;
    border: 1px solid #aac8e8;
}

.isotope-feedback-title {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.isotope-answer {
    margin-bottom: 14px;
    font-size: 16px;
}


/*
 * =========================================================
 * WORKING / MARKING POINTS
 * =========================================================
 */

.isotope-working,
.isotope-marking-points {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.isotope-working-title {
    margin-bottom: 8px;
    font-weight: 700;
}

.isotope-working ol,
.isotope-marking-points ul {
    margin: 0;
    padding-left: 24px;
}

.isotope-working li,
.isotope-marking-points li {
    margin-bottom: 6px;
}


/*
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (max-width: 650px) {

    .isotope-controls {
        grid-template-columns: 1fr;
    }

    .isotope-question-card {
        padding: 18px;
    }

    .isotope-question {
        font-size: 17px;
    }

    .isotope-spectrum {
        padding: 6px;
    }

    .isotope-buttons {
        flex-direction: column;
    }

    .isotope-button {
        width: 100%;
    }

}