
:root {
    --bg: #f5f6f7;
    --card: #ffffff;
    --text: #212529;
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --border: #dcdcdc;

    --sidebar: #1e1e2f;
    --sidebar-button: #2d2d44;
    --sidebar-hover: #404067;

    --drawer-width: 240px;

    --border: rgba(0,0,0,0.08);
    --shadow-color: rgba(0,0,0,0.12);
}

.dark {
    --border: rgba(255,255,255,0.08);
    --shadow-color: rgba(255,255,255,0.55);
}

body.dark {
    --bg: #141414;
    --card: #1f1f1f;
    --text: #ffffff;
    --border: #333333;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

button,
input {
    font-family: inherit;
}

.center-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    width: 420px;
    background: var(--card);
    border: 5px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.label {
    margin-bottom: 8px;
    font-size: 14px;
}

.input {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    margin-bottom: 20px;
    font-size: 15px;
}

.btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.btn:hover {
    opacity: 0.92;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.link-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    margin: 10px 0;
    cursor: pointer;
}

.dashboard {
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: var(--drawer-width);
    min-width: 0;
    overflow: hidden;

    background: var(--sidebar);
    color: white;

    display: flex;
    flex-direction: column;
    padding: 16px;

    transition:
        width 0.25s ease,
        padding 0.25s ease;
}

.sidebar.hidden {
    width: 0;
    padding-left: 0;
    padding-right: 0;
}



.avatar {
    text-align: center;
    font-size: 42px;
}

.sidebar-name {
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
}

.sidebar button {
    background: var(--sidebar-button);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    text-align: left;
    cursor: pointer;
}

.sidebar button:hover {
    background: var(--sidebar-hover);
}

.content {
    flex: 1;
    position: relative;
    overflow: auto;
    background: var(--card);
    min-width: 0;
}

.menu-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    z-index: 99999;
}

.page-container {
    width: 100%;
    height: 100%;
    padding: 70px 24px 24px 24px;
}

.home-image {
    width: 100%;
    height: calc(100vh - 70px);
    object-fit: cover;
    border-radius: 16px;
}

.message-frame {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff3cd;
    color: #ff9800;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    z-index: 9999;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal {
    width: 460px;    
    background: var(--card);
    border-radius: 16px;
    padding: 30px;
}

.status-success {
    color: #4CAF50;
}

.status-error {
    color: #FF5252;
}

.req-valid {
    color: #4CAF50;
}

.req-invalid {
    color: #FF5252;
}

.gdpr-link {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
}

@media(max-width: 800px) {

    .hero-text {
        font-size: 22px;
    }

    .tests-card,
    .avg-card {
        display: none;
    }

    #.stat-card {
        width: 320px;
        height: 220px;
    }
}

@media(max-width: 700px) {

    .sidebar {
        position: fixed;
        height: 100%;
        z-index: 3000;
    }

    .card {
        width: 92%;
    }

}

/* ==========================
   HOME PAGE
   ========================== */

.home-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
}

.home-logo {
    width: 100%;
    height: 42vh;
    object-fit: contain;
}

.hero-text {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 40px;
}

.stat-card {
    width: 280px;
    height: 200px;

    background: var(--card);

    border: 5px solid var(--border);

    border-radius: 16px;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.stat-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 30px;
    font-weight: bold;
}

.profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.profile-card {
    width: 100%;
    max-width: 520px;
    padding: 40px;
    margin-bottom: 20px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.profile-label {
    font-weight: 700;
    width: 140px;
}

.profile-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
}

.profile-avatar {
    text-align: center;
    font-size: 60px;
    margin-bottom: 20px;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.profile-value {
    flex: 1;
    word-break: break-word;
}

/* Mobile adjustments */
@media (max-width: 600px) {

    .profile-card {
        padding: 20px;
    }

    .profile-label {
        width: 100%;
    }

    .profile-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================
   TRANSCRIPT PAGE
========================== */

#pageContent {
    padding-bottom: 40px;
    margin-bottom: 60px;
}

.transcript-page {
    width: 100%;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.transcript-title {
    font-size: 2rem;
    font-weight: 700;
}

.info-btn {
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
}

.filter-bar {
    display: grid;
    grid-template-columns: auto 180px auto 320px auto auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.filter-bar select {
    padding: 10px;
    border-radius: 8px;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
}


.transcript-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    color: var(--text);
}

/* HEADER */
.transcript-table th {
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

/* CELLS */
.transcript-table th,
.transcript-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

/* ROWS */
.transcript-table tbody tr {
    cursor: pointer;
    background: var(--card);
}


.transcript-table tbody tr:hover,
.transcript-table tbody tr:hover td {
    background: rgba(0, 0, 0, 0.05);
}



@media(max-width:900px){

    .table-wrapper {
        padding-bottom: 60px;
    }

    .filter-bar{
        grid-template-columns: 1fr;
    }

    .filter-bar button,
    .filter-bar select{
        width:100%;
    }
}


.review-option {
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    background: var(--card);
    white-space:pre-wrap;
}

.review-option.correct {
    background: #3b82f6;
    color: white;
}

.review-option.selected-correct {
    background: #4caf50;
    color: white;
}

.review-option.selected-wrong {
    background: #ff4d4d;
    color: white;
}

.review-image {
    display:block;
    max-width:100%;
    max-height:350px;
    margin:20px auto;
}

.no-answer-banner {

    background:#ff4d4d;
    color:white;

    font-weight:700;

    text-align:center;

    padding:12px;

    border-radius:8px;

    margin-bottom:20px;
}

.review-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}


.review-header {
    margin-bottom:20px;
}

.review-header,
.review-wrapper .card {
    max-width: none;
    width: 100%;
}

.review-nav {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.question-text {
    white-space:pre-wrap;
}

.review-explanation {

    margin-top: 20px;

    padding: 20px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 12px;

    margin-bottom: 40px;
}


.explanation-text {

    white-space: pre-wrap;

    line-height: 1.6;
}

.question-meta {

    border: 2px solid var(--border);
    margin-bottom: 20px;
    display: inline-block;
    float: right;
}

#domainModal {

    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    z-index: 99999;

    background: rgba(
        0,
        0,
        0,
        0.85
    );

    display: flex;
}

.domain-modal {

    width: 100%;
    height: 100%;

    background: var(--bg);

    color: var(--text);

    display: flex;
    flex-direction: column;

    padding: 20px;
}

.domain-modal-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 24px;

    border-bottom:
        1px solid var(--border);
}

.domain-modal-content {

    flex: 1;

    overflow-y: auto;

    padding: 24px;
}

.domain-row {

    display: grid;

    grid-template-columns:
        2fr
        120px
        120px
        350px;

    gap: 20px;

    align-items: center;

    margin-bottom: 24px;
}

.domain-name {

    font-size: 22px;

    font-weight: 700;
}

.domain-score {

    font-size: 20px;
}

.domain-percent {

    font-size: 20px;

    font-weight: 700;
}

.domain-bar {

    height: 24px;

    background: #444;

    border-radius: 999px;

    overflow: hidden;
}

.domain-bar-fill {

    height: 100%;

    transition: width .3s ease;
}

@media (max-width: 900px) {

    .domain-row {

        grid-template-columns: 1fr;

        gap: 10px;
    }

    .domain-name {

        font-size: 18px;
    }
}

#domainBreakdownBtn {

    margin-top: 10px;
    margin-bottom: 40px;
}

.review-top-bar {

    display: flex;

    justify-content: flex-end;

    margin-bottom: 16px;
}

.review-close-btn {

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    font-size: 22px;

    font-weight: bold;

    background: var(--card);

    color: var(--text);

    border: 1px solid var(--border);

    transition: background 0.2s ease;
}

.review-close-btn:hover {

    background: rgba(128, 128, 128, 0.15);
}




.voucher-container {

    display:flex;
    justify-content:center;
    margin-top:40px;

}

.voucher-info-message {

    margin-bottom: 20px;

    text-align: center;

    font-size: 0.95rem;

    color: var(--text);

    opacity: 0.9;

}


.voucher-info-message a {

    color: var(--primary);

    text-decoration: underline;

    font-weight: 600;

}


.voucher-info-message a:hover {

    opacity: 0.8;

}


.voucher-card {

    background: var(--card);

    border: 2px solid var(--border);

    padding: 60px;

    border-radius: 16px;

    text-align: center;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}



/* Card hover effect */
.voucher-card:hover {

    transform: translateY(-4px);

    box-shadow:
        0 10px 25px var(--shadow-color);

}



.voucher-instruction {

    font-size:1.2rem;

    margin-bottom:20px;

}



.voucher-input {

    width:320px;

    padding:12px;

    font-size:1.1rem;

    text-align:center;

    border-radius:8px;

    margin-bottom:20px;

}



.voucher-message {

    margin-bottom:20px;

    padding:12px;

    border-radius:8px;

    color:white;

    text-align:center;

}


.voucher-message.success {

    background:#28a745;

}


.voucher-message.error {

    background:#dc3545;

}


.voucher-success-card {

    margin:40px auto;

    width:350px;

    padding:30px;

    text-align:center;

    background:var(--card);

    color:var(--text);

    border:2px solid var(--border);

    border-radius:15px;

    box-shadow:
        0 5px 15px var(--shadow-color);

}




.launch-tests-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 24px;

    padding: 20px;
}


.test-card {

    background: var(--card);

    border: 5px solid var(--border);

    border-radius: 16px;

    padding: 24px;

    min-height: 360px;

    display: flex;

    flex-direction: column;

    //box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 18px var(--shadow-color);

    transition: box-shadow 0.2s ease, transform 0.2s ease;
}


.test-card > h3 {
    text-align: center;
    font-size: 1.5em;
}


.test-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px var(--shadow-color);
}


.lock-icon {

    font-size: 36px;

    text-align: center;

    margin: 10px 0;
}


.test-card-details {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin: 15px 0;
}

.unlock-info-card {

    min-width: 150px;

    padding: 12px;

    border-radius: 12px;

    border: 2px solid var(--border);

    background: var(--background);

    font-size: 13px;

    text-align: left;
}

.unlock-info-card.locked {

    text-align: center;

    font-weight: 700;
}

.page-title {
    text-align: center;
    font-size: 2em;
}


@media (max-width: 700px) {

    .test-card-details {

        flex-direction: column;
    }

    .unlock-info-card {

        width: 100%;
    }
}

.test-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 10px;
    gap: 12px;
    justify-content: center;
    align-content: start;
}


.test-category-card {

    background: var(--card);

    color: var(--text);

    border: 2px solid var(--border);

    border-radius: 16px;

    text-align: center;

    padding: 25px;

    font-size: 1rem;

    box-shadow:
        0 4px 12px var(--shadow-color);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;

    min-height: 220px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

}



/* Hover effect */
.test-category-card:hover {

    transform: translateY(-6px);

    box-shadow:
        0 12px 28px var(--shadow-color);

    border-color: var(--primary);

}



/* Test title */
.test-category-card h3 {

    font-size: 1.35rem;

    margin-top: 0;

    margin-bottom: 20px;

    font-weight: 700;

}



/* Stats area */
.test-meta {

    margin-bottom: 20px;

    font-size: 1rem;

}



.test-meta div {

    margin: 8px 0;

}



/* Start button spacing */
.test-category-card .btn {

    width: 100%;

    padding: 12px;

    font-size: 1.05rem;

}

@media (max-width: 750px) {

    .test-category-grid {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
        gap: 12px !important;
    }

    .test-category-card {
        width: 100% !important;
        margin: 0 auto;
    }
}


.btn-success {
    margin-top: 15px;
    background: var(--primary);
    color: white;
}

.palette-card {

    background: var(--card-bg);

    border: 2px solid var(--border);

    border-radius: 14px;

    padding: 16px;

    margin: 10px 0;

    box-shadow:
        0 8px 20px var(--shadow-color);

    display: flex;
    flex-direction: column;
}

.palette-title {

    font-size: 1.1rem;

    font-weight: 700;

    text-align: center;

    margin-bottom: 12px;

    color: var(--text-color);
}


.palette-btn {

    width: 48px;
    height: 48px;

    border-radius: 8px;

    font-weight: 700;

    border: 2px solid var(--border);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.palette-btn:hover {

    transform: translateY(-2px);

    box-shadow:
        0 4px 10px var(--shadow-color);
}

.palette-btn.answered {
    background: #28a745;
    color: white;
}

.palette-btn.flagged {
    background: #ffc107;
    color: black;
}

.palette-btn.unanswered {
    background: #6c757d;
    color: white;
}

.palette-btn.current {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

.option-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text);
}

.option-btn.selected {
    background: #28a745;
    color: white;
}


.exam-question {
    font-size: 1.25rem;   /* larger question text */
    line-height: 1.6;
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    white-space: pre-wrap;   /* preserve \n in question text */
}

#examTimer {
    position: fixed;
    top: 10px;
    right: 20px;

    z-index: 1000;

    min-width: 140px;

    padding: 12px 18px;

    text-align: center;

    font-family: "Consolas", "Courier New", monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;

    color: orange;
    background: #111;

    border: 3px solid orange;
    border-radius: 10px;

    box-shadow:
        0 0 10px rgba(0,255,102,0.35),
        inset 0 0 8px rgba(0,255,102,0.15);
}

#prevBtn,
#nextBtn,
#flagBtn,
#submitBtn {

    color: white;

    font-size: 1.05rem;
    font-weight: 600;

    padding: 10px 20px;
    margin: 6px;

    border: none;
    border-radius: 8px;

    cursor: pointer;

    box-shadow:
        0 3px 6px rgba(0,0,0,0.15);

    transition:
        transform 0.15s ease,
        opacity 0.15s ease,
        box-shadow 0.15s ease;
}


#prevBtn,
#nextBtn,
#flagBtn {

    background: red;
}

#submitBtn {

    background: orange;
}

#prevBtn:hover,
#nextBtn:hover,
#flagBtn:hover,
#submitBtn:hover {

    box-shadow:
        0 0 8px rgba(255,255,255,0.15),
        0 0 14px rgba(255,255,255,0.08);

    transform: translateY(-1px);
}

#prevBtn:active,
#nextBtn:active,
#flagBtn:active,
#submitBtn:active {

    transform: translateY(2px);

    box-shadow:
        0 1px 2px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(0,0,0,0.25);
}

#palette {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));

    gap: 8px;
}


.question-image {
    max-width: 90%;
    height: auto;

    display: block;
    margin: 15px auto;
}


.exam-body {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

#examTitle {
    text-align: center;
    font-size: 1.6em;
    font-weight: 600;
}

#questionPanel {
    padding-bottom: 40px;
}

.exam-result-container {

    width:100%;
    min-height:80vh;

    display:flex;
    justify-content:center;
    align-items:center;

}


.exam-result-card {

    background:var(--card);

    padding:40px;

    border-radius:16px;

    text-align:center;

    box-shadow:0 5px 20px rgba(0,0,0,0.15);

}


.exam-result-title {

    display:block;

    font-size:2rem;
    font-weight:700;

    margin-bottom:25px;

    color:var(--text);

}


.exam-result-score,
.exam-result-percentage {

    display:block;

    font-size:1.4rem;

    margin:15px 0;

    color:var(--text);

}


.exam-result-status {

    display:block;

    font-size:2rem;

    font-weight:800;

    margin:25px 0;

}


.exam-result-status.pass {

    color:#28a745;

}


.exam-result-status.fail {

    color:#dc3545;

}


.app-modal-overlay {

    position: fixed;

    inset: 0;

    background:
        rgba(0,0,0,0.45);

    display:flex;

    justify-content:center;

    align-items:center;

    z-index:9999;

}



.app-modal-card {


    background:var(--card);

    color:var(--text);

    border:2px solid var(--border);

    border-radius:16px;


    padding:35px;


    width:380px;

    max-width:90%;


    text-align:center;


    box-shadow:

        0 15px 40px rgba(0,0,0,0.35);


    animation:

        modalFadeIn 0.2s ease;

}



.app-modal-card h2 {

    margin-top:0;

    margin-bottom:15px;

}



.app-modal-card p {

    font-size:1.05rem;

    margin-bottom:25px;

}



@keyframes modalFadeIn {


    from {

        opacity:0;

        transform:
            translateY(-15px);

    }


    to {

        opacity:1;

        transform:
            translateY(0);

    }

}

.flashcard-sets-page {

    width:100%;

}

.flashcard-sets-page h1{

    text-align: center;

}

.flashcard-sets-page h2{

    text-align: center;

}

.flashcard-sets-page p{

    text-align: center;

}


.flashcard-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(250px, 1fr));

    gap: 20px;

    margin: 30px auto 0 auto;

    max-width: 1200px;

    justify-content: center;

}


/* 1 card - full width */
.flashcard-grid:has(.flashcard-set-card:only-child) {

    grid-template-columns: 1fr;

}


/* 2 cards - half width each */
.flashcard-grid:has(.flashcard-set-card:first-child:nth-last-child(2)) {

    grid-template-columns: repeat(2, 1fr);

}


.flashcard-set-card {

    padding:20px;

    border-radius:12px;

    background:var(--card);

    color:var(--text);

    box-shadow:0 3px 8px var(--shadow-color);

}


.flashcard-set-card h2 {

    margin-top:0;

}


.flashcard-set-card button {

    display: block;

    margin: 20px auto 0 auto;

    padding: 10px 30px;

    cursor: pointer;

    background-color: #007bff;

    color: white;

    border: none;

    border-radius: 6px;

    font-size: 16px;

    transition: background-color 0.2s ease;

}


.flashcard-set-card button:hover {

    background-color: #0056b3;

}


@media (max-width: 768px) {

    .flashcard-grid {

        grid-template-columns:
            1fr;

    }

}

.flashcards-page {

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

}


.flashcard-tabs {

    display: flex;

    border-bottom: 1px solid #ccc;

}


.flash-tab {

    padding: 12px 25px;

    border: 1px solid var(--border);

    background: var(--card);

    color: var(--text);

    cursor: pointer;

    font-size: 20px;

}


.flash-tab.active {

    font-weight: bold;

}


.flashcard-content {

    flex: 1;

    padding: 20px;

    overflow-y: auto;

}




.carousel {

    display:flex;
    justify-content:center;
    align-items:center;
    gap:30px;

}


.flashcard {

    width:500px;
    height:300px;
    perspective:1000px;
    cursor:pointer;

}


.flashcard-inner {

    position:relative;
    width:100%;
    height:100%;
    transition:transform 0.6s;
    transform-style:preserve-3d;

}


.flashcard.flipped 
.flashcard-inner {

    transform:rotateY(180deg);

}


.flashcard-front,
.flashcard-back {


    position:absolute;
    width:100%;
    height:100%;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:30px;

    box-sizing:border-box;

    backface-visibility:hidden;

    border-radius:15px;

    background:lightgreen;
    color:black;
    font-size: 20px;

    box-shadow:0 5px 15px rgba(0,0,0,0.2);

}



.flashcard-back {

    transform:rotateY(180deg);

}


.card-match-container {

    padding:30px;

}



.card-match-header {

    display:flex;

    flex-direction:column;

    align-items:center;

    text-align:center;

    margin-bottom:30px;

}



.card-match-header h2 {

    margin-bottom:10px;

}



.card-match-header p {

    margin-top:0;

    margin-bottom:25px;

}



.card-match-controls {

    display:flex;

    gap:20px;

    justify-content:center;

    align-items:center;

}



.match-stat {

    padding:10px;
    border:1px solid #ddd;
    border-radius:10px;
    text-align:center;

}



.match-stat span {

    display:block;

}



.match-board {

    display:grid;
    grid-template-columns:1fr 1fr;
    gap:80px;
    margin-top:15px;

}



.match-column {

    display:flex;
    flex-direction:column;
    gap:15px;

}



.match-card {


    padding:25px;

    border:2px solid #ccc;

    border-radius:12px;

    cursor:pointer;

    min-height:70px;

    display:flex;

    align-items:center;

}



.front-card {

    border-color:#3b82f6;

}



.back-card {

    border-color:#22c55e;

}



.match-card.selected {

    background:#3b82f6;

}



.match-card.matched {

    background:lightgreen;

    cursor:default;

}



.match-info {

    margin-top:30px;

    padding:15px;

    border:1px solid #ddd;

    border-radius:10px;

}


.column-heading {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}


.hangman-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    font-family: Arial, sans-serif;

    background: var(--bg);
    color: inherit;
}


.hangman-header {

    display: flex;

    justify-content: center;

    margin-bottom: 25px;

}


.hangman-header h2 {
    margin: 0;
}

.hangman-header p {
    margin: 5px 0 0 0;
    color: #666;
}


.hangman-text {

    background: var(--card);

    padding: 12px 25px;

    border-radius: 20px;

    font-weight: bold;

    text-align: center;

    border: 2px solid rgba(0,0,0,0.15);

}


.hangman-area {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    margin: 10px 0;

    background: var(--card);
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}


.hangman-question {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}


.hangman-question h3 {

    width: 70%;
    min-height: 100px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    background: var(--card);

    border: 3px solid rgba(74, 144, 226, 0.6);

    border-radius: 15px;

    padding: 10px;

    font-size: 28px;

    font-weight: 700;

    line-height: 1.4;

    box-shadow: 0 8px 20px rgba(0,0,0,0.12);

    position: relative;
}

.hangman-question h3::before {

    content: "TERM";

    position: absolute;

    top: -16px;

    left: 50%;

    transform: translateX(-50%);


    background: var(--card);

    padding: 5px 18px;

    border-radius: 20px;


    font-size: 13px;

    font-weight: 700;

    letter-spacing: 1px;

    border: 2px solid rgba(74,144,226,0.6);
}

.definition-section {

    margin-top: 25px;

    padding: 25px;

    background: var(--card);

    border: 2px solid rgba(0,0,0,0.15);

    border-radius: 15px;

}

.definition-section h3 {

    text-align: center;

    margin: 0 0 20px 0;

    font-size: 22px;

}


.hangman-options {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;

}


.hangman-option {

    background: var(--bg);

    border: 2px solid rgba(0,0,0,0.15);

    padding: 18px;

    border-radius: 10px;

    cursor: pointer;

    text-align: center;

    min-height: 70px;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: transform 0.2s ease,
                border-color 0.2s ease;

}


.hangman-option:hover {

    transform: translateY(-3px);

    border-color: #4a90e2;

}


.hangman-option.correct {
    background: var(--card);
    border-color: #2ecc71;
}

.hangman-option.wrong {
    background: var(--card);
    border-color: #e74c3c;
}


.hangman-end {
    text-align: center;
    padding: 50px;
    background: var(--bg);
}

.hangman-end h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.hangman-end p {
    color: inherit;
    opacity: 0.7;
    margin-bottom: 20px;
}


.hangman-end button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background: var(--card);
    color: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hangman-end button:hover {
    transform: translateY(-2px);
}



.hangman-popup {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.5);

    justify-content: center;

    align-items: center;

    z-index: 1000;

}


.hangman-popup-content {

    width: 400px;

    padding: 30px;

    background: var(--card);

    border-radius: 15px;

    text-align: center;

}


#hangmanDrawing {

    height: 280px;

    display: flex;

    justify-content: center;

    align-items: center;

}



.hangman-svg {

    width: 220px;

    height: 250px;

}



.draw {

    fill: none;

    stroke: currentColor;

    stroke-width: 4;

    stroke-linecap: round;


    stroke-dasharray: 400;

    stroke-dashoffset: 400;


    animation: drawLine 1.5s ease forwards;

}



@keyframes drawLine {


    from {

        stroke-dashoffset: 400;

    }


    to {

        stroke-dashoffset: 0;

    }

}

.popup-stats {

    text-align: center;

    margin-bottom: 10px;

    padding: 8px 12px;

    background: var(--card);

    border-radius: 20px;

    display: inline-block;

    font-size: 14px;

}

.hangman-popup-content .popup-stats {
    margin: 0 auto 10px auto;
}


@media (max-width: 768px) {

    .hangman-option {
        padding: 14px;
        font-size: 15px;
    }

    .hangman-options {
        grid-template-columns: 1fr;
    }

    .definition-section {
        padding: 18px;
    }

}




