/* css/style.css */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #f8f9fa;
    --background-color: #f4f7f9;
    --text-color: #333;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --card-radius: 12px;
}


body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: center;

}

header h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 5px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Dashboard Styles (index.html) */
.skill-section {
    margin-bottom: 40px;
}

.skill-section h2 {
    font-size: 1.8em;
    color: #34495e;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.skill-section h2 .icon {
    margin-right: 10px;
}

.part-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.part-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 5px solid var(--primary-color);
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.part-card h3 {
    margin-top: 0;
    color: var(--primary-hover);
}

.part-card p {
    margin-bottom: 0;
    color: #666;
}

.part-card.disabled {
    background-color: #f1f1f1;
    border-left-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.part-card.disabled:hover {
    transform: none;
    box-shadow: var(--card-shadow);
}

.part-card.disabled p {
    font-weight: bold;
    color: #999;
}


/* Practice Page Styles (reading.html) */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.quiz-card {
    background-color: #ffffff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #34495e;
}

.tag {
    font-size: 0.8em;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    color: #fff;
}

.tag-logic {
    background-color: #27ae60;
}

.tag-bia {
    background-color: #e67e22;
}

.instructions {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.sentence-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sentence-list li {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.original-number {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 10px;
    background-color: #e9ecef;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.show-answer-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.show-answer-btn:hover {
    background-color: var(--primary-hover);
}

.answer-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #e9f5ff;
    border-left: 4px solid var(--primary-hover);
    border-radius: 5px;
}

.answer-section h4 {
    margin-top: 0;
    color: #0056b3;
}

.answer-section p {
    margin-bottom: 5px;
}

.error {
    text-align: center;
    color: #e74c3c;
    font-size: 1.2em;
    background-color: #fbecec;
    padding: 20px;
    border-radius: 5px;
}

/* === HEADER & NAVIGATION STYLES === */
header#header-placeholder {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

.main-nav .nav-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.main-nav .nav-link.disabled {
    color: #aaa;
    cursor: not-allowed;
}

.main-nav .nav-link.disabled:hover {
    background-color: transparent;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a.active {
    font-weight: bold;
    color: var(--primary-color);
}



/* Page Intro Styles (cho tiêu đề bên dưới header) */
.page-intro {
    text-align: center;
    margin: 40px 0;
}

.page-intro h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-intro p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Bỏ margin-top của .container vì header đã có khoảng cách */
.container {
    padding-top: 20px;
}

/* Thêm vào cuối file */
.explanation-box {
    background-color: #eef7ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.explanation-box h3 {
    margin-top: 0;
    color: var(--primary-hover);
    font-size: 1.2em;
}

.explanation-box p {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #4a6a8a;
}

.explanation-box p:last-child {
    margin-bottom: 0;
}

/* Style cho danh sách có thể kéo thả */
.sortable-list li {
    cursor: grab;
    transition: background-color 0.2s;
}

.sortable-list li:active {
    cursor: grabbing;
}

/* Style cho phần tử đang được kéo */
.dragging {
    opacity: 0.5;
    background: #cde4ff !important;
}

/* Style cho các nút hành động */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    flex-grow: 1;
    /* Để 2 nút có chiều rộng bằng nhau */
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.check-answer-btn:hover {
    background-color: var(--primary-hover);
}

.show-story-btn {
    background-color: #fff;
    color: var(--primary-color);
}

.show-story-btn:hover {
    background-color: #f8f9fa;
}


/* Style cho khu vực feedback */
.feedback-message {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
    min-height: 24px;
    /* Giữ chiều cao ổn định */
}

/* Style cho card khi trả lời đúng/sai */
.quiz-card.correct {
    border: 2px solid #27ae60;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.quiz-card.incorrect {
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

/* === HEADER & NAVIGATION STYLES (RESPONSIVE) === */
header#header-placeholder {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    padding: 0 20px;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001;
    /* Đảm bảo logo luôn ở trên */
}

/* --- Mobile Styles --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 2rem;
    height: 0.25rem;
    background: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.nav-links-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background-color: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding-top: 5rem;
}

.nav-links-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-links-container a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    display: block;
}

.nav-links-container a:hover,
.nav-links-container a.active {
    color: var(--primary-color);
}

.dropdown-content {
    display: none;
    /* Tạm ẩn trên mobile */
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Open State */
body.nav-open .nav-links-container {
    transform: translateX(0);
}

body.nav-open .overlay {
    display: block;
}

body.nav-open .hamburger span:first-child {
    transform: rotate(45deg);
}

body.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

body.nav-open .hamburger span:last-child {
    transform: rotate(-45deg);
}


/* --- Desktop Styles --- */
@media (min-width: 800px) {

    .hamburger,
    .overlay {
        display: none !important;
    }

    .nav-links-container {
        position: static;
        height: auto;
        width: auto;
        transform: none;
        padding-top: 0;
        background-color: transparent;
    }

    .nav-links-container ul {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .nav-links-container a {
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 5px;
    }

    .nav-links-container a:hover,
    .nav-links-container a.active {
        background-color: var(--primary-color);
        color: #fff;
    }

    /* Dropdown on Desktop */
    .dropdown {
        position: relative;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #fff;
        min-width: 160px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 1;
        border-radius: 5px;
        overflow: hidden;
        margin-top: 5px;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        display: block;
        font-size: 0.9em;
    }

    .dropdown-content a:hover,
    .dropdown-content a.active {
        background-color: #f1f1f1;
        color: var(--primary-color);
    }
}

/* --- SORTABLEJS GHOST STYLE --- */
.sortable-ghost {
    opacity: 0.4;
    background: #cde4ff;
}

/* Các style khác giữ nguyên */

/* css/style.css */

/* === HEADER & NAVIGATION STYLES (RESPONSIVE & PUSH EFFECT) === */
body {
    overflow-x: hidden;
    /* QUAN TRỌNG: Ngăn thanh cuộn ngang khi sidebar mở */
}

/* Wrapper để đẩy nội dung */
.content-pusher {
    transition: transform 0.3s ease-in-out;
    background-color: var(--background-color);
    /* Đảm bảo có nền để che nội dung cũ */
}

header#header-placeholder {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    padding: 0 20px;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001;
}

/* --- Mobile Styles --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 2rem;
    height: 0.25rem;
    background: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.nav-links-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 280px;
    /* Chiều rộng cố định cho sidebar */
    background-color: #f4f7f9;
    /* Màu nền sáng hơn */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Căn giữa các mục theo chiều dọc */
    z-index: 1000;
}

.nav-links-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links-container ul li {
    margin: 0.75rem 1.5rem;
    /* Tạo khoảng cách giữa các mục */
}

.nav-links-container a {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem;
    display: block;
    background-color: var(--primary-color);
    /* Nền xanh cho nút */
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.nav-links-container a:hover,
.nav-links-container a.active {
    background-color: var(--primary-hover);
    /* Màu đậm hơn khi hover/active */
}

/* Tạm ẩn dropdown trên mobile, có thể làm phức tạp hơn sau */
.dropdown-content {
    display: none;
}

/* Open State */
body.nav-open .content-pusher {
    transform: translateX(-280px);
    /* Đẩy nội dung sang trái bằng chiều rộng của sidebar */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

body.nav-open .nav-links-container {
    transform: translateX(0);
}

body.nav-open .hamburger span:first-child {
    transform: rotate(45deg);
}

body.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

body.nav-open .hamburger span:last-child {
    transform: rotate(-45deg);
}


/* --- Desktop Styles --- */
@media (min-width: 800px) {
    .hamburger {
        display: none;
    }

    /* Trả lại trạng thái bình thường cho content-pusher */
    body.nav-open .content-pusher,
    .content-pusher {
        transform: none !important;
        box-shadow: none !important;
    }

    .nav-links-container {
        position: static;
        height: auto;
        width: auto;
        transform: none;
        padding-top: 0;
        background-color: transparent;
        box-shadow: none;
        flex-direction: row;
        justify-content: flex-end;
    }

    .nav-links-container ul {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .nav-links-container ul li {
        margin: 0;
    }

    .nav-links-container a {
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 5px;
        color: #555;
        background-color: transparent;
    }

    .nav-links-container a:hover,
    .nav-links-container a.active {
        background-color: var(--primary-color);
        color: #fff;
    }

    /* Dropdown on Desktop */
    .dropdown {
        position: relative;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #fff;
        min-width: 160px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 1;
        border-radius: 5px;
        overflow: hidden;
        margin-top: 5px;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        display: block;
        font-size: 0.9em;
        background-color: transparent;
        /* Reset nền */
    }

    .dropdown-content a:hover,
    .dropdown-content a.active {
        background-color: #f1f1f1;
        color: var(--primary-color);
    }
}

/* css/style.css */

/* --- STYLES FOR READING PART 1 KEY CARDS --- */

.key-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.key-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.key-card h3 {
    margin-top: 0;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.key-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
    /* Đẩy nút xuống dưới */
}

.key-list li {
    font-size: 1.1em;
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.key-number {
    font-weight: 700;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.key-card .show-story-btn {
    width: 100%;
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.key-card .show-story-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.story-section {
    margin-top: 15px;
    padding: 15px;
    background-color: #e9f5ff;
    border-left: 3px solid var(--primary-hover);
    border-radius: 5px;
    font-size: 0.95em;
}

.story-section p {
    margin: 0;
}

/* css/style.css */

/* --- STYLES FOR READING PART 4 --- */

.part4-card .card-header {
    margin-bottom: 20px;
}

.part4-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.part4-question p {
    margin: 0;
    padding-right: 15px;
    flex-grow: 1;
}

.part4-options {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.option-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background-color: #e9ecef;
}

.option-btn.selected {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Style cho kết quả đúng/sai */
.part4-question.correct {
    background-color: #e6ffed;
    border-color: #27ae60;
}

.part4-question.correct .selected {
    background-color: #27ae60;
    border-color: #27ae60;
}

.part4-question.incorrect {
    background-color: #fff0f0;
    border-color: #e74c3c;
}

.part4-question.incorrect .selected {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.part4-card .feedback-message {
    color: #333;
    /* Đổi màu chữ feedback cho dễ đọc */
    font-size: 1.1em;
}

/* Thêm vào cuối file */
.explanation-box ul {
    padding-left: 20px;
    margin-top: 5px;
}

.explanation-box ul li {
    margin-bottom: 5px;
}



/* --- STYLES FOR READING PART 5 (DRAG & DROP) --- */

.part5-card .card-header {
    margin-bottom: 25px;
}

.part5-drag-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .part5-drag-area {
        grid-template-columns: 1fr 1fr;
    }
}

.part5-source-container h4,
.part5-target-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-hover);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.part5-source-list {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 100px;
}

.part5-source-list li {
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.part5-target-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.part5-answer-slot {
    background-color: var(--secondary-color);
    border: 2px dashed #ccc;
    border-radius: 5px;
    min-height: 53px;
    display: flex;
    align-items: center;
    padding: 5px;
    transition: background-color 0.2s;
}

.part5-answer-slot .slot-number {
    font-weight: bold;
    color: #aaa;
    margin: 0 10px;
}

.part5-answer-slot li {
    width: 100%;
    margin: 0;
}

/* Khi có li bên trong, ẩn số thứ tự đi */
.part5-answer-slot:has(li) .slot-number {
    display: none;
}

/* Style lại li khi nó đã nằm trong ô đáp án */
.part5-answer-slot li {
    width: 100%;
    margin: 0;
    /* Bỏ margin */
    padding: 10px;
    /* Chỉnh lại padding cho vừa vặn */
    font-size: 0.95em;
    /* Có thể làm chữ nhỏ hơn một chút */
    box-shadow: none;
    /* Bỏ đổ bóng khi đã nằm trong ô */
    border: 1px solid #b8c5d0;
    /* Thêm viền nhẹ cho đẹp */
}

/* Thêm vào cuối file hoặc trong khu vực style Part 5 */
.answer-section .correct-headings-list {
    list-style: decimal;
    /* Sử dụng số thứ tự 1, 2, 3... */
    padding-left: 20px;
    margin: 0 0 15px 0;
}

.answer-section .correct-headings-list li {
    padding: 5px 0;
    font-weight: 500;
}

.answer-section .story-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* css/style.css */

/* --- STYLES FOR SPEAKING PART 1 --- */

.speaking-card .soundcloud-player {
    margin: 15px 0;
}

/* Đảm bảo iframe hiển thị đúng */
.soundcloud-player iframe {
    border-radius: 8px;
}

.speaking-questions h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary-hover);
}

.speaking-questions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.speaking-questions li {
    background-color: var(--secondary-color);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

/* css/style.css */

/* --- STYLES FOR SPEAKING PART 1 (FINAL VERSION) --- */
/* --- STYLES FOR SPEAKING TOPIC SELECTOR --- */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.topic-selector-btn {
    padding: 10px 5px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9em;
    text-align: center;
    transition: all 0.2s ease;
}

.topic-selector-btn:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
}

.topic-selector-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

/* --- LOGIC HIỂN THỊ/ẨN CARD --- */

/* Ẩn tất cả các card bài tập theo mặc định */
#speaking-container .speaking-card {
    display: none;
}

/* Chỉ hiển thị card nào có class 'active' */
#speaking-container .speaking-card.active {
    display: block;
}

.speaking-card .prompt-container {
    padding: 0;
    border: none;
    background-color: transparent;
}

.prompt-question {
    background-color: #eef7ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 0 0 25px 0;
    font-size: 1.1em;
    line-height: 1.5;
    border-radius: 5px;
}

.speaking-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-hover);
    font-size: 1.1em;
}

.timer-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.timer-controls .action-btn {
    flex-grow: 1;
    background-color: var(--primary-color);
    color: white;
}

.timer-controls .action-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.timer-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    min-width: 80px;
    text-align: center;
}

.sample-answer-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.audio-player-container {
    margin-bottom: 15px;
}

.custom-audio-player {
    width: 100%;
}

.sample-answer {
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: 5px;
    font-size: 0.95em;
    line-height: 1.7;
    color: #333;
}

.sample-answer p {
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    /* Giúp nút không bị vỡ layout trên màn hình hẹp */
}

/* Đảm bảo nút này trông giống các nút khác */
.show-sample-btn {
    flex-grow: 1;
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.show-sample-btn:hover {
    background-color: #f8f9fa;
}

/* --- STYLES FOR WRITING OVERVIEW PAGE --- */

.writing-overview-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.writing-part-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    border-top: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.writing-part-card .part-number {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.writing-part-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #34495e;
}

.writing-part-card p {
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
    /* Đẩy phần details xuống cuối card */
}

.part-details {
    margin-top: 20px;
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
}

.part-details div {
    margin-bottom: 8px;
    font-size: 1em;
}

.part-details div:last-child {
    margin-bottom: 0;
}

.part-details strong {
    color: #333;
}

/* css/style.css */

/* --- STYLES FOR EXAM STRUCTURE PAGE --- */

.structure-container .skill-overview-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
}

.skill-overview-card h2 {
    color: var(--primary-hover);
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.8em;
}

.skill-overview-card p {
    color: #666;
    margin-top: 15px;
}

.table-wrapper {
    overflow-x: auto;
    /* Giúp bảng cuộn ngang trên màn hình nhỏ */
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

table th,
table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

table thead th {
    background-color: var(--secondary-color);
    font-weight: 700;
    color: #333;
}

table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

table td:first-child {
    font-weight: bold;
    text-align: center;
    width: 5%;
}

.motivational-quote {
    margin-top: 40px;
    text-align: center;
}

.motivational-quote blockquote {
    margin: 0;
    padding: 25px;
    background-color: #eef7ff;
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1.2em;
    font-style: italic;
    color: #34495e;
}

.motivational-quote footer {
    margin-top: 15px;
    font-weight: bold;
    font-style: normal;
    color: #555;
}

/* css/style.css */

/* --- STYLES FOR SPEAKING IDEAS PAGE --- */
.idea-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.idea-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
}

.idea-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--primary-hover);
}

.idea-card ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
    color: #333;
}

.idea-card li {
    margin-bottom: 8px;
    line-height: 1.6;
}



/* --- STYLES FOR SPEAKING PART 2 --- */

.speaking-part2-image {
    width: 100%;
    border-radius: var(--card-radius);
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.speaking-task-container {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.tasks-wrapper .speaking-task-container:first-child {
    border-top: none;
}

/* --- STYLES FOR METHOD GUIDE --- */
.method-guide-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    margin-top: 30px;
    box-shadow: var(--card-shadow);
    border-top: 5px solid #27ae60;
    /* Màu xanh lá để phân biệt */
}

.method-guide-card h2 {
    margin-top: 0;
    text-align: center;
    color: #2c3e50;
}

.method-step {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.method-guide-card .method-step:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.method-step h4 {
    margin: 0 0 10px 0;
    color: var(--primary-hover);
}

.method-step ul {
    padding-left: 20px;
    margin: 0;
}

.method-step li {
    margin-bottom: 8px;
}

.method-step code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #c7254e;
}

/* --- THÊM VÀO PHẦN STYLES FOR METHOD GUIDE --- */
.method-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.method-guide-card .method-step {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
}

/* --- THÊM VÀO PHẦN SPEAKING PART 2 --- */

/* Logic ẩn/hiện card (giống Part 1) */
#speaking-container .speaking-part2-card {
    display: none;
}

#speaking-container .speaking-part2-card.active {
    display: block;
}

/* Style cho phần câu trả lời mẫu trong wrapper */
.sample-answer-wrapper .sample-answer {
    padding: 15px;
    background-color: #e9f5ff;
    border-left: 3px solid var(--primary-hover);
    border-radius: 5px;
    font-size: 0.95em;
    line-height: 1.6;
    margin-top: 10px;
}

.sample-answer-wrapper .sample-answer:first-child {
    margin-top: 0;
}

.sample-answer-wrapper p {
    margin: 0;
}

.speaking-part2-image-container {
    width: 80%;
    max-width: 300px; /* Giới hạn chiều rộng tối đa của ảnh */
    margin: 0 auto 25px auto; /* Căn giữa ảnh và tạo khoảng cách dưới */
}

.speaking-part2-image {
    width: 100%; /* Ảnh sẽ luôn vừa với container của nó */
    height: auto; /* Giữ đúng tỷ lệ ảnh */
    max-height: 300px; /* Giới hạn chiều cao tối đa của ảnh */
    object-fit: contain; /* Đảm bảo toàn bộ ảnh hiển thị, không bị cắt xén */
    border-radius: var(--card-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block; /* Bỏ khoảng trống thừa dưới ảnh */
}

/* css/style.css */

/* --- STYLES FOR LISTENING PART 1 --- */
.listening-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.listening-card .key-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.listening-card li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.listening-card li:last-child {
    border-bottom: none;
}

/* Logic ẩn/hiện đáp án */
.listening-card .answer-text {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin-left: 15px;
    font-weight: 500;
}

.listening-card.answers-visible .answer-text {
    visibility: visible;
    opacity: 1;
}

/* --- STYLES FOR LISTENING FLASHCARDS --- */
.flashcard-container {
    perspective: 1000px;
    margin-bottom: 20px;
}

.flashcard {
    width: 100%;
    height: 250px;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: var(--card-radius);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: var(--card-radius);
}

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

.flashcard-front p {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
}

.flashcard-back {
    background-color: var(--secondary-color);
    color: #333;
    transform: rotateY(180deg);
}

.flashcard-back p {
    font-size: 1.8em;
    font-weight: 500;
    color: #333;
}

.flashcard.is-flipped {
    transform: rotateY(180deg);
}

.flashcard-controls {
    text-align: center;
}

.flashcard-controls .action-btn {
    width: auto;
    padding: 12px 30px;
}

/* --- STYLES FOR LISTENING PAGINATION (FIXED) --- */

#listening-container .key-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

#listening-container .key-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    min-height: 28px;
    /* Giữ chiều cao ổn định */
}

#listening-container .key-list li:last-child {
    border-bottom: none;
}

/* Sửa lỗi CSS ở đây */
/* Sử dụng lại style của .original-number từ các trang khác */
#listening-container .key-list .key-number {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 15px;
    background-color: #e9ecef;
    border-radius: 50%;
    width: 32px;
    /* Tăng kích thước một chút */
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9em;
}

/* Logic ẩn/hiện đáp án */
#listening-container .answer-text {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-weight: 500;
    /* Bỏ margin-left vì key-number đã có margin-right */
}

#listening-container .key-list.answers-visible .answer-text {
    visibility: visible;
    opacity: 1;
}

/* Các style khác cho pagination giữ nguyên */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination-controls .action-btn {
    width: auto;
    padding: 10px 20px;
}

.pagination-controls .action-btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    border-color: var(--border-color);
}

#page-number-indicator {
    padding: 20px;
    font-weight: bold;
    color: #333;
}

#toggle-all-btn {
    width: auto;
    padding: 8px 15px;
    font-size: 0.9em;
}

#page-title-indicator {
    padding: 20px;
}

/* --- STYLES FOR LISTENING CHEATSHEET PAGE --- */
.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.cheatsheet-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
}

.cheatsheet-card h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.cheatsheet-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
}

.cheatsheet-card th,
.cheatsheet-card td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cheatsheet-card thead {
    background-color: var(--secondary-color);
    font-weight: 600;
}

.cheatsheet-card tr:last-child td {
    border-bottom: none;
}

.cheatsheet-card tr:hover {
    background-color: #f8f9fa;
}

.cheatsheet-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
    table-layout: fixed;
    /* THÊM DÒNG NÀY: Quan trọng nhất! */
}

.cheatsheet-card th,
.cheatsheet-card td {
    padding: 12px;
    /* Tăng padding một chút cho thoáng */
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    /* THÊM DÒNG NÀY: Giúp chữ tự xuống dòng */
}

/* THÊM KHỐI MỚI NÀY ĐỂ CHIA CỘT */
.cheatsheet-card th:first-child,
.cheatsheet-card td:first-child {
    width: 50%;
}

.cheatsheet-card th:last-child,
.cheatsheet-card td:last-child {
    width: 50%;
}


.cheatsheet-card thead {
    background-color: var(--secondary-color);
    font-weight: 600;
}

/* css/style.css */

/* --- STYLES FOR EXAM TIPS PAGE --- */
.tips-container .tip-section {
    margin-bottom: 30px;
}

.tips-container h2 {
    font-size: 1.8em;
    color: var(--primary-hover);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tip-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.tip-card h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 1.3em;
}

.tip-card ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
}

.tip-card li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #333;
}

.tip-card li ul {
    margin-top: 10px;
}

.important-note {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 25px;
    border-radius: var(--card-radius);
}

.important-note h2 {
    border-bottom-color: #fadb14;
    color: #d46b08;
}

.important-note p {
    font-size: 1.1em;
    line-height: 1.8;
}

.good-luck-message {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 40px;
    color: var(--primary-color);
}

/* css/style.css */

/* --- STYLES FOR SKILL OVERVIEW PAGES (TABLES) --- */
.skill-overview-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    border-top: 5px solid var(--primary-color);
}

.skill-overview-card h2 {
    margin-top: 0;
    text-align: center;
    color: var(--primary-hover);
}

.table-wrapper {
    overflow-x: auto;
    /* Giúp bảng có thể cuộn ngang trên mobile */
    margin-top: 20px;
}

.skill-overview-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Đảm bảo các cột không bị quá hẹp */
}

.skill-overview-card th,
.skill-overview-card td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.skill-overview-card thead th {
    background-color: var(--secondary-color);
    font-weight: 600;
    color: #333;
}

.skill-overview-card tbody tr:hover {
    background-color: #f8f9fa;
}

.skill-overview-card td {
    vertical-align: middle;
}

/* css/style.css */

/* --- STYLES FOR LISTENING PART 15 --- */
.listening15-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.listening15-card .card-header {
    flex-wrap: wrap;
    /* Cho phép xuống dòng trên mobile */
}

.listening15-title {
    flex-grow: 1;
}

.story-hint {
    font-size: 0.9em;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.final-key-display {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    letter-spacing: 5px;
    /* Tách các chữ cái ra */
}


/* --- Styles for the toggle switch --- */
.speaker-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #555;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Thêm vào cuối phần style của toggle switch */
.speaker-toggle-container.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.speaker-toggle-container.disabled .slider {
    cursor: not-allowed;
}

/* --- STYLES FOR LISTENING PART 15 --- */
.listening15-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.listening15-title {
    flex-grow: 1;
}


/* --- STYLES FOR VOCABULARY PAGE (IMPROVED) --- */
.vocabulary-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.vocab-section h2 {
    font-size: 1.8em;
    color: var(--primary-hover);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.vocab-table-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.vocab-table-card h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: #34495e;
}

.vocab-table-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.vocab-table-card th,
.vocab-table-card td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    /* Căn giữa theo chiều dọc */
}

.vocab-table-card thead th {
    background-color: var(--secondary-color);
    font-weight: 600;
}

.vocab-table-card tbody tr:hover {
    background-color: #f8f9fa;
}

/* Style cho cột "Phân biệt" */
.vocab-table-card .category-cell {
    font-weight: 700;
    /* Tô đậm chữ */
    color: var(--primary-hover);
    /* Màu chữ khác */
    background-color: transparent;
    /* Bỏ nền xám */
    border-right: 1px solid #dee2e6;
    /* Thêm đường kẻ phải */
    width: 25%;
    /* Cố định chiều rộng cột */
}

/* Style cho các cột Tiếng Anh, Tiếng Việt */
.vocab-table-card td {
    font-weight: normal;
    /* Đảm bảo chữ bình thường */
    background-color: transparent;
}

/* Style cho cột "Phân biệt" */
.vocab-table-card .category-cell {
    font-weight: 700;
    color: var(--primary-hover);
    background-color: transparent;
    border-right: 1px solid #dee2e6;
    width: 25%;
    /* Cố định chiều rộng cột */
}

/* --- THÊM KHỐI MỚI NÀY ĐỂ CHIA CỘT 50-50 CHO BẢNG 2 CỘT --- */
#people-no-s table,
#people-with-s table {
    table-layout: fixed;
}

#people-no-s th,
#people-no-s td,
#people-with-s th,
#people-with-s td {
    width: 50%;
}

/* --- KẾT THÚC KHỐI MỚI --- */


/* Style cho các cột Tiếng Anh, Tiếng Việt */
.vocab-table-card td {
    font-weight: normal;
    background-color: transparent;
}

/* css/style.css */

/* --- STYLES FOR WRITING PART 1 --- */

.writing-timer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.writing-timer-bar .action-btn {
    width: auto;
}

.writing-timer-bar .timer-display {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-hover);
}

.writing-prompt {
    margin-bottom: 25px;
}

.writing-prompt:last-child {
    margin-bottom: 0;
}

.writing-prompt label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #34495e;
}

.writing-prompt textarea {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid #ced4da;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.writing-prompt textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.writing-prompt textarea:disabled {
    background-color: #e9ecef;
}

.word-count-container {
    text-align: right;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

.word-count.limit-exceeded {
    color: #e74c3c;
    font-weight: bold;
}

.writing-card {
    display: none;
    /* Ẩn tất cả các card theo mặc định */
}

.writing-card.active {
    display: block;
    /* Chỉ hiển thị card đang được chọn */
}

/* css/style.css */

/* --- STYLES FOR Q&A BANK PAGE --- */
.qa-bank-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.qa-card {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
}

.qa-card .question {
    margin: 0 0 10px 0;
    font-size: 1.05em;
    color: #34495e;
}

.qa-card .answer {
    margin: 0;
    color: #0056b3;
    font-weight: 500;
}

/* css/style.css */

/* --- STYLES FOR WRITING PART 4 --- */
.context-box {
    background-color: #eef7ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0 30px 0;
    border-radius: 8px;
}

.context-box h4 {
    margin-top: 0;
    color: var(--primary-hover);
}

.context-box p {
    margin-bottom: 0;
}

.writing-task {
    margin-bottom: 40px;
}

.writing-task .task-header {
    margin-bottom: 15px;
}

.task-header h3 {
    margin: 0 0 5px 0;
    color: #34495e;
}

.task-header .instruction {
    color: #666;
    font-style: italic;
    margin: 0;
}

.writing-textarea {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid #ced4da;
    box-sizing: border-box;
    resize: vertical;
}

.writing-task .card-actions,
.writing-task .sample-answer-wrapper {
    margin-top: 10px;
}

/* Dùng <pre> để giữ nguyên định dạng xuống dòng của email mẫu */
.sample-answer pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: inherit;
}

.writing-task .writing-timer-bar {
    /* Tái sử dụng style timer bar của Part 1 */
    margin-bottom: 15px;
    /* Giảm margin so với Part 1 */
    padding: 10px 15px;
}

.writing-task .writing-timer-bar .action-btn {
    font-size: 0.9em;
}

.writing-task .writing-timer-bar .timer-display {
    font-size: 1.5em;
}

/* css/style.css */
.writing-part4-card {
    display: none;
}

.writing-part4-card.active {
    display: block;
}

/* css/style.css */

/* --- STYLES FOR WRITING PART 3 (CHAT ROOM) --- */
.chat-window {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.chat-user {
    font-size: 0.8em;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 4px;
}

.chat-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
}

/* Tin nhắn của người khác */
.chat-message.them {
    align-items: flex-start;
}

.chat-message.them .chat-bubble {
    background-color: #e9ecef;
    border-top-left-radius: 4px;
    color: #333;
}

.chat-message.them .chat-user {
    align-self: flex-start;
}

/* Tin nhắn của mình */
.chat-message.me {
    align-items: flex-end;
}

.chat-message.me .chat-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid #ccc;
    padding: 12px 15px;
    font-family: inherit;
    font-size: 1em;
}

.chat-message.me .word-count-container {
    align-self: flex-end;
}

.chat-room .sample-answer p {
    margin-bottom: 10px;
}

/* css/style.css (FINAL VERSION) */

/* === HEADER & NAVIGATION STYLES === */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;

}

.logo img {
    max-width: 30px;
    height: auto;
    vertical-align: middle;

}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger-btn {
    display: none;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

/* --- Desktop Nav --- */
.desktop-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.desktop-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 5px;
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.desktop-nav .dropdown {
    position: relative;
}

.desktop-nav .dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid #f0f0f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.desktop-nav .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-nav .dropdown-content a {
    color: black;
    padding: 12px 20px;
    display: block;
    font-size: 0.95em;
}

.desktop-nav .dropdown-content a:hover {
    background-color: #f8f9fa;
}

.desktop-nav .dropdown-content a::after {
    display: none;
}

/* --- Mobile Nav (Sidebar) --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-side-menu {
    position: fixed;
    top: 0;
    right: 0;
    /* Giữ sidebar ở bên phải */
    width: 300px;
    height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    /* Bắt đầu ẩn hoàn toàn về bên phải */
    transition: transform 0.3s ease-in-out;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.mobile-side-menu.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
}

.menu-title {
    font-size: 1.2em;
    font-weight: bold;
}

.close-btn {
    font-size: 2em;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.mobile-side-menu ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.mobile-side-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-side-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 1.1em;
}

.mobile-side-menu a i {
    width: 24px;
    text-align: center;
    color: #888;
}

.mobile-side-menu a:hover,
.mobile-side-menu a.active {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.menu-divider {
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    background-color: #f8f9fa;
}

.mobile-nav-footer {
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.mobile-nav-footer a {
    font-size: 1em;
}

body.u-no-scroll {
    overflow: hidden;
}

/* --- Mobile Dropdown Styles --- */
.mobile-dropdown .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-dropdown .dropdown-toggle span {
    transition: transform 0.3s ease;
}

.mobile-dropdown.open .dropdown-toggle span {
    transform: rotate(90deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #f8f9fa;
    padding-left: 30px;
}

.mobile-dropdown.open .mobile-dropdown-content {
    max-height: 500px;
}

/* --- Open State (PUSH CONTENT) (FIXED) --- */
body.u-nav-open .content-pusher {
    transform: translateX(-300px);
    /* Đẩy nội dung chính sang trái 300px */
}

body.u-nav-open .mobile-side-menu {
    transform: translateX(0);
    /* Đưa sidebar về vị trí 0 (hiện ra) */
}

body.u-nav-open {
    overflow: hidden;
}


/* Responsive Breakpoint */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .hamburger-btn {
        display: block;
    }
}

/* css/style.css */

/* --- STYLES FOR WRITING ERRORS PAGE --- */
.error-analysis-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.error-analysis-card h2 {
    margin-top: 0;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.email-sample {
    margin-top: 20px;
}

.email-sample p {
    font-weight: bold;
    color: #333;
}

.email-sample pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95em;
    line-height: 1.6;
}

.email-sample del {
    background-color: #fde0e3;
    color: #c01c28;
    text-decoration: none;
}

.email-sample strong {
    background-color: #d4edda;
    color: #155724;
}

.error-list {
    margin-top: 20px;
}

.error-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.error-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.error-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #34495e;
}

.error-item p {
    margin: 0;
    line-height: 1.8;
}

.error-item em {
    color: #6c757d;
    font-size: 0.9em;
}

/* css/style.css */

/* --- STYLES FOR SPEAKING PART 3 --- */
.speaking-part3-card {
    display: none;
}

.speaking-part3-card.active {
    display: block;
}

.part3-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.part3-images img {
    width: 100%;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

/* --- STYLES FOR SPEAKING PART 3 (ĐÃ SỬA LỖI KÍCH THƯỚC ẢNH) --- */
.speaking-part3-card {
    display: none;
}

.speaking-part3-card.active {
    display: block;
}

.part3-images-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Luôn chia làm 2 cột bằng nhau */
    gap: 20px; /* Khoảng cách giữa 2 ảnh */
    align-items: center; /* Căn các ảnh theo chiều dọc nếu chiều cao khác nhau */
    max-width: 900px; /* Giới hạn chiều rộng tối đa của cả khu vực 2 ảnh */
    margin: 0 auto 25px auto; /* Căn giữa khu vực ảnh và tạo khoảng cách dưới */
}

.part3-images-container img {
    width: 100%; /* Ảnh sẽ luôn vừa với cột của nó */
    height: auto; /* Giữ đúng tỷ lệ ảnh */
    max-height: 350px; /* Giới hạn chiều cao tối đa của MỖI ảnh */
    object-fit: contain; /* Đảm bảo toàn bộ ảnh hiển thị, không bị cắt xén */
    border-radius: var(--card-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}
/* css/style.css */

/* --- STYLES FOR SPEAKING PART 4 --- */
.speaking-part4-card {
    display: none;
}

.speaking-part4-card.active {
    display: block;
}

.part4-questions {
    background-color: var(--secondary-color);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.part4-questions h4 {
    margin: 0 0 10px 0;
}

.part4-questions ul {
    padding-left: 20px;
    margin: 0;
}

.part4-questions li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.part4-timers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.timer-section {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.timer-section h4 {
    margin: 0 0 15px 0;
}

.timer-section .timer-controls {
    flex-direction: column;
}

.timer-section .timer-display {
    margin-top: 10px;
}

/* --- STYLES FOR WRITING ANALYSIS PAGE --- */
.error-analysis-card {
    background-color: #fff;
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.error-analysis-card h2 {
    margin-top: 0;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.email-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.email-version h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #34495e;
}

.email-version pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
    line-height: 1.6;
    border: 1px solid #e9ecef;
}

/* Dùng CSS để tô màu thay vì thẻ HTML */
.email-version pre strong {
    background-color: #d4edda;
    padding: 2px 4px;
    border-radius: 3px;
    color: #155724;
}

.feedback-section {
    margin-top: 20px;
}

.feedback-section h4 {
    margin-bottom: 10px;
}

.feedback-section ul {
    list-style: none;
    padding: 0;
}

.feedback-section li {
    padding: 10px;
    border-bottom: 1px dashed #e9ecef;
}

.feedback-section li:last-child {
    border-bottom: none;
}

.feedback-section li strong {
    display: inline-block;
    background-color: #e2e3e5;
    color: #383d41;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 10px;
}

/* --- QUY TẮC TÔ MÀU MỚI --- */
/* Tô màu xanh cho phần đúng */
.email-version pre strong {
    background-color: #d4edda;
    padding: 2px 4px;
    border-radius: 3px;
    color: #155724;
    font-weight: normal;
    /* Trả lại font weight bình thường */
}

/* Tô màu đỏ cho phần sai */
.email-version pre del {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: none;
    /* Bỏ gạch ngang mặc định */
    padding: 2px 4px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .email-comparison {
        grid-template-columns: 1fr;
    }
}

/* css/style.css */

/* --- STYLES FOR SPEAKING TEST SIMULATION --- */
.test-simulation-wrapper {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.test-screen {
    display: none;
    text-align: center;
}

.test-screen.active {
    display: block;
}

#start-screen p,
#end-screen p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

#start-screen .action-btn,
#end-screen .action-btn {
    width: auto;
    padding: 15px 30px;
}

#part-indicator {
    font-size: 1.8em;
    color: var(--primary-hover);
}

#task-indicator {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 25px;
}

#question-area {
    margin-bottom: 30px;
}

.test-question-text {
    font-size: 1.5em;
    font-weight: 500;
    line-height: 1.6;
}

.test-image-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.test-image-container img {
    width: 100%;
    border-radius: 8px;
}

.test-part4-questions ul {
    list-style: decimal;
    padding-left: 20px;
    text-align: left;
}

#timer-area {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

#timer-label {
    font-weight: bold;
    margin-bottom: 10px;
}

#timer-display {
    font-size: 3em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.progress-bar-container {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

#progress-bar {
    height: 10px;
    width: 100%;
    background-color: var(--primary-color);
    transition: width 1s linear;
}

/* css/style.css */

/* --- STYLES FOR LOW QUALITY TOPICS --- */
.low-quality-btn {
    border-style: dashed;
}

.low-quality-btn .fa-exclamation-triangle {
    color: #e67e22;
}

.image-quality-warning {
    background-color: #fffbe6;
    color: #d46b08;
    padding: 10px 15px;
    border: 1px solid #ffe58f;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
}


.topic-selector-btn {
    position: relative;
    /* Cần thiết để định vị các tag */
    padding-bottom: 25px;
    /* Thêm không gian cho tag */
}

.topic-tags {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.topic-tags span {
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    color: white;
}

.tag-hot {
    background-color: #e74c3c;
    /* Màu đỏ */
}

.tag-warning {
    background-color: #f39c12;
    /* Màu vàng */
}

.non-existent-answers {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.non-existent-answers span {
    background-color: #dc3545;
    /* Màu đỏ cảnh báo */
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: line-through;
    /* Gạch ngang để nhấn mạnh */
}

/* Thêm vào css/style.css */
.translation-controls {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    display: flex;
    gap: 10px;
}

.action-btn-small {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    font-size: 0.8em;
    border-radius: 5px;
    cursor: pointer;
}

.translation-content {
    margin-top: 15px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.keywords-list h4 {
    margin-top: 10px;
}

/* Sửa lại CSS một chút cho gọn */
.translation-controls {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    /* display: flex; và gap: 10px; không còn cần thiết */
}

.action-btn-small {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    /* Tăng padding một chút */
    font-size: 0.9em;
    /* Tăng font size một chút */
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

/* --- STYLES FOR HINTS --- */
.hints-wrapper {
    margin-top: 10px;
    padding: 15px;
    background-color: #fffbe6;
    /* Màu vàng nhạt */
    border-left: 3px solid #ffe58f;
    border-radius: 5px;
}

.hints-wrapper h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #856404;
}

.hints-wrapper ul {
    list-style-type: '💡';
    padding-left: 25px;
    margin: 0;
}

.hints-wrapper li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- THÊM VÀO CUỐI PHẦN STYLES FOR HINTS --- */
.support-wrapper {
    margin-top: 15px;
}

.support-wrapper .hints-wrapper {
    margin-top: 0;
    margin-bottom: 15px;
    /* Tạo khoảng cách với đáp án mẫu */
    border-radius: 8px;
    /* Bo góc đẹp hơn */
}

.support-wrapper .sample-answer-wrapper .sample-answer {
    border-radius: 8px;
    /* Bo góc đẹp hơn */
}

/* Đảm bảo nút mới chiếm toàn bộ chiều rộng */
.writing-task .card-actions .action-btn {
    flex-grow: 1;
}

/* === FOOTER STYLES (NEW VP Computer STYLE) === */
footer {
    background-color: #fff;
    color: #555;
    border-top: 1px solid #e9ecef;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1em;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bio {
    font-size: 0.95em;
    line-height: 1.7;
    color: #6c757d;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #555;
    transition: color 0.2s, padding-left 0.2s;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-links a i {
    margin-right: 8px;
    font-size: 0.8em;
    color: var(--primary-color);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    margin-right: 10px;
    margin-top: 4px;
    color: var(--primary-color);
    width: 16px;
    /* Căn lề cho icon */
}

.footer-social {
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f1f1;
    color: #555;
    text-decoration: none;
    margin-right: 10px;
    transition: background-color 0.2s, color 0.2s;
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.footer-bottom {
    background-color: #f8f9fa;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9em;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

.footer-bottom p {
    margin: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cột bằng nhau */
    gap: 30px;
    /* Khoảng cách giữa các cột */
}

/* Footer Dropdown Styling */
.footer-col .footer-dropdown {
    position: relative;
    /* Cần thiết cho dropdown */
    margin-bottom: 10px;
}

.footer-col .footer-dropdown>a {
    display: inline-block;
    padding: 5px 0;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color, #666);
    /* Sử dụng màu chữ mặc định hoặc biến CSS nếu có */
    transition: color 0.3s;
}

.footer-col .footer-dropdown>a:hover {
    color: var(--primary-color, #007bff);
}

.footer-col .footer-dropdown .dropdown-content {
    display: none;
    /* Ẩn mặc định */
    position: absolute;
    bottom: 100%;
    /* Hiển thị bên trên thẻ cha */
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10;
    border-radius: 5px;
    padding: 10px 0;
    margin-bottom: 5px;
    /* Khoảng cách giữa dropdown và link chính */
}

.footer-col .footer-dropdown .dropdown-content a {
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.footer-col .footer-dropdown .dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Hiển thị dropdown khi hover trên desktop */
@media (min-width: 769px) {
    .footer-col .footer-dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Hiển thị dropdown khi có class 'active' (cho mobile click) */
.footer-col .footer-dropdown.active .dropdown-content {
    display: block;
}

/* === FIX LỖI XUỐNG DÒNG CHO CỘT "THÔNG TIN" === */
.footer-contact li {
    white-space: nowrap;
    /* Ngăn text bị xuống dòng */
}

/* === KẾT THÚC FIX === */


/* Responsive cho Grid */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cột trên tablet */
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        /* 1 cột trên mobile */
        text-align: center;
        /* Căn giữa nội dung khi xếp chồng */
    }

    .footer-col {
        margin-bottom: 20px;
    }

    .footer-col .footer-dropdown .dropdown-content {
        left: 50%;
        transform: translateX(-50%);
        /* Căn giữa dropdown trên mobile */
    }

    .footer-contact li {
        white-space: normal;
        /* Cho phép xuống dòng lại trên mobile nếu cần */
    }
}

.action-btn-secondary {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

.action-btn-secondary:hover {
    text-decoration: underline;
}

/* --- STYLES FOR CLUB-SPECIFIC ERROR ANALYSIS --- */
.text-comparison {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.text-comparison p {
    margin: 0 0 10px 0;
}

.text-comparison p:last-child {
    margin-bottom: 0;
}

.text-comparison del {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: none;
    padding: 1px 3px;
    border-radius: 3px;
}

.text-comparison strong {
    background-color: #d4edda;
    color: #155724;
    padding: 1px 3px;
    border-radius: 3px;
}

.feedback {
    background-color: #eef7ff;
    border-left: 3px solid var(--primary-color);
    padding: 10px 15px;
    font-size: 0.95em;
}

.feedback strong {
    color: var(--primary-hover);
}

/* Style cho các câu đã viết đúng */
.text-comparison.correct-text {
    background-color: #e2fdef;
    /* Nền xanh lá nhạt */
    border-left: 3px solid #34a853;
}

.text-comparison.correct-text p {
    color: #0d652d;
}

.feedback.correct {
    background-color: #e2fdef;
    border-left-color: #34a853;
}

.feedback.correct strong {
    color: #0d652d;
}