/* Tổng thể */
body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #f4f4f4, #e4e9f7);
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background: linear-gradient(to right, #45a061, #3c9b56);
    color: white;
    padding: 1.5rem 0;
    text-transform: uppercase;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

main {
    margin: 20px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    max-width: 800px;
}

/* Khung hình ảnh */
#imageContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;    
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}
/* Hình ảnh chính */
#mainImage {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
    filter: grayscale(100%);
}

#mainImage:hover {
    transform: scale(1.05);
    opacity: 0.9;
    filter: grayscale(100%); /* Trở lại màu sắc gốc khi hover */
}



/* Nút điều khiển */
#buttonContainer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

button {
    padding: 12px 25px;
    font-size: 1rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

button:hover {
    background-color: #3e8e41;
    transform: scale(1.05);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Bảng tiến độ */
#progressTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 0.9rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#progressTable th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-transform: uppercase;
    padding: 15px;
}

#progressTable td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

#progressTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#progressTable tr:hover {
    background-color: #eef2f5;
}

/* Danh sách bài đã học */
#viewedList {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

#viewedList li {
    margin-bottom: 20px;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#viewedList li:hover {
    transform: scale(1.02);
    background-color: #f1f1f1;
}

.retry-button {
    font-size: 0.85rem;
    padding: 5px 10px;
    background-color: #ff704d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #e55b3b;
}

/* Hình ảnh nhỏ */
/* Hình ảnh trong danh sách bài đã học */
#viewedList img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 4px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
}

#viewedList img:hover {
    transform: scale(1.1);
    filter: grayscale(100%); /* Trở lại màu sắc gốc khi hover */
}


/* Responsive */
@media (max-width: 768px) {
    #buttonContainer {
        flex-direction: column;
        gap: 10px;
    }

    button {
        width: 100%;
    }

  

    main {
        padding: 15px;
    }
}
