@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --bg-color: #b3e5fc;
    --sidebar-bg: #e8f8ff;
    --card-bg: #ffffff;
    --primary-green: #4caf50;
    --primary-blue: #1565c0;
    --accent-blue: #1d72ff;
    --text-main: #1a2a3a;
    --text-muted: #4a6070;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --border-radius: 16px;
    --card-border: 1px solid rgba(255,255,255,0.6);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(145deg, #b3e5fc 0%, #81d4fa 50%, #a5d8f0 100%);
    min-height: 100vh;
    color: var(--text-main);
}

/* ── Title ── */
.title {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1976d2 100%);
    padding: 28px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.35);
}

.title h1 {
    color: #ffffff;
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── Layout ── */
.workspace-container {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 28px 32px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

/* ── Sidebar ── */
.topics-sidebar {
    min-width: 220px;
    width: 240px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 22px 18px;
    box-shadow: 0 6px 24px rgba(21, 101, 192, 0.13);
    border: var(--card-border);
    flex-shrink: 0;
}

.topics-sidebar h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddeef8;
}

.topic-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: background 0.18s, color 0.18s;
}

.topic-item:hover {
    background: #d6eef9;
    color: var(--primary-blue);
}

.topic-item input[type="checkbox"] {
    accent-color: var(--primary-blue);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Main area ── */
.tests-display-area {
    flex: 1;
    min-width: 0;
}

.tests-display-area > h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.tests-display-area > h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ── Panel area ── */
.panel-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* ── Panel cards (sections per topic) ── */
.panel-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Practice card (each test row) ── */
.practice-card {
    background: rgba(255,255,255,0.92);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 3px 14px rgba(21, 101, 192, 0.10);
    border: var(--card-border);
    transition: box-shadow 0.2s;
}

.practice-card:hover {
    box-shadow: 0 6px 24px rgba(21, 101, 192, 0.18);
}

.test-card-title {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
}

.card-icon-img {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.card-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.25s;
}

.test-card-title.open .card-arrow {
    transform: rotate(90deg);
}

/* ── Utility ── */
.hide {
    display: none !important;
}

/*style for en-ett*/
.Block2, .Block1 {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    background-color: #2196f3; /* Default Blue */
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    
    /* Reset default button styles */
    border: none;
    outline: none;
    transition: background-color 0.3s ease, transform 0.1s active;
}

.badge.active {
    background-color: #4caf50; /* Green for Active */
}

.badge:hover {
    filter: brightness(1.1);
}

.badge:active {
    transform: scale(0.95); /* Slight click feedback */
}

.custom-dropdown {
    position: relative;
    width: 100%;
    max-width: 300px;
    font-family: sans-serif;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #005a42; /* Dark green border */
    border-radius: 12px;
    background: white;
    color: #005a42;
    font-weight: 500;
    cursor: pointer;
}

.Topic-list {
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    max-height: 250px; /* Limits height like your image */
    overflow-y: auto;  /* Adds scrollbar */
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0;
    margin: 0;
    list-style: none;
    display: none; /* Hidden by default */
    z-index: 100;
}

/* Show the menu when active */
.Topic-list.show {
    display: block;
}

.topic-item {
    padding: 12px 15px;
    color: #005a42;
    cursor: pointer;
    transition: background 0.2s;
}

.topic-item:hover {
    background-color: #f0fdfa;
}

/* Styling the scrollbar to look like the image */
.Topic-list::-webkit-scrollbar {
    width: 8px;
}
.Topic-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* ── test-card-area: expanded panel ── */
.test-card-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    padding: 18px 16px 12px;
    border-top: 1px solid #ddeef8;
    margin-top: 10px;
}

/* ── Block1: settings ── */
.Block1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f4fbff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid #d4eaf8;
}

.Titles-Information {
    font-size: 0.92rem;
    color: var(--text-muted);
    padding-bottom: 4px;
}

.settings-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.level-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Block2: quiz ── */
.Block2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.Questions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Quiz stats pill */
.Question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    background: linear-gradient(90deg, #dceefb 0%, #cfe8f7 100%);
    border: 1px solid #b5d4ee;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(21,101,192,0.08);
}

.stat-item {
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.text-green { color: #2e7d32; }
.text-red   { color: #c62828; }

.progress-container {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Quiz question card */
.quiz-area {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 18px;
    background: linear-gradient(160deg, #ffffff 60%, #eaf5fd 100%);
    padding: 28px 24px;
    border: 1px solid #d0e8f5;
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(21,101,192,0.10);
    text-align: center;
    width: 100%;
}

.question {
    margin: 0;
    font-size: 1.7rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.options {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-option {
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #d0e8f5;
    transition: transform 0.15s, background 0.15s, border-color 0.15s;
    color: var(--text-main);
    background: #ffffff;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 2px 6px rgba(21,101,192,0.07);
}

.btn-option:hover {
    transform: scale(1.08);
    background: #e3f2fd;
    border-color: #90caf9;
}

.explanation {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Quiz footer with NEXT button */
.quiz-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 4px;
}

.small-bnt {
    padding: 9px 26px;
    border-radius: 50px;
    background: linear-gradient(90deg, #1d72ff 0%, #1565c0 100%);
    color: white;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    letter-spacing: 0.8px;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 3px 10px rgba(29,114,255,0.3);
    transition: filter 0.2s, transform 0.15s;
}

.small-bnt:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Block3 & Block4 */
.Block3, .Block4 {
    width: 100%;
    background: #f4fbff;
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid #d4eaf8;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* Block4 warning / explanation label */
.explanation-label {
    font-weight: 800;
    color: var(--primary-blue);
}

/* ── Score card (shown in Block3 on quiz complete) ── */
.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 8px 0;
}

.score-emoji {
    font-size: 3rem;
    line-height: 1;
}

.score-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
}

.score-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
}

.score-stats {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.score-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 20px;
    border-radius: 14px;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(21,101,192,0.08);
}

.score-stat--total   { background: #e3f2fd; border: 1px solid #b0d4f0; }
.score-stat--correct { background: #e8f5e9; border: 1px solid #a5d6a7; }
.score-stat--wrong   { background: #fce4ec; border: 1px solid #f48fb1; }
.score-stat--pct     { background: linear-gradient(135deg, #e8f0fe, #dceefb); border: 1px solid #b0c4f5; }

.score-stat__num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
}

.score-stat__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

/* Progress bar under score stats */
.score-bar-wrap {
    width: 100%;
    max-width: 320px;
    height: 12px;
    background: #ddeef8;
    border-radius: 50px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #1d72ff);
    border-radius: 50px;
    transition: width 0.8s ease;
}

/* ── Retest button ── */
.retest-btn {
    padding: 9px 26px;
    border-radius: 50px;
    background: linear-gradient(90deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    letter-spacing: 0.8px;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 3px 10px rgba(46,125,50,0.3);
    transition: filter 0.2s, transform 0.15s;
}

.retest-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}