/* style.css - Giao diện cấu hình TPB Addon */

body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin: 0;
}

.box {
    background: #222;
    padding: 30px;
    border-radius: 10px;
    display: inline-block;
    max-width: 400px;
    width: 100%;
    border: 1px solid #ff9900;
    box-shadow: 0px 0px 15px rgba(255, 153, 0, 0.3);
    box-sizing: border-box;
}

input, select {
    width: 100%;
    padding: 10px;
    margin: 12px 0;
    border-radius: 5px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

/* Khung bọc ô nhập liệu mật khẩu */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px; /* Trừa không gian cho chiếc mắt */
}

/* Thiết kế nút bấm icon chiếc mắt */
.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    fill: #ff9900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 5px;
    user-select: none;
    transition: 0.2s;
}

.toggle-btn:hover {
    fill: #cc7a00;
    transform: scale(1.05);
}

.toggle-btn svg {
    width: 22px;
    height: 22px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0 25px 5px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    width: auto;
    margin: 0 10px 0 0;
    transform: scale(1.3);
    cursor: pointer;
}

.submit-btn {
    background: #ff9900;
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
    box-sizing: border-box;
}

.submit-btn:hover {
    background: #cc7a00;
}

label {
    font-weight: bold;
    display: block;
    text-align: left;
    margin-left: 5px;
    color: #ff9900;
}

/* ======================================================================
   CẤU HÌNH ĐỒ HỌA PANEL TÙY CHỈNH THỂ LOẠI NÂNG CAO (DARK MODE)
   ====================================================================== */

/* 1. Định dạng dòng Checkbox tổng điều hướng */
.customize-trigger-label {
    color: #00ffff !important;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 255, 255, 0.03);
    border: 1px dashed rgba(0, 255, 255, 0.2);
    transition: all 0.25s ease-in-out;
}

.customize-trigger-label:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

/* 2. Khối hộp Panel chứa danh mục thể loại (Mặc định ẩn và có hiệu ứng trượt) */
#customize_genres_panel {
    display: none; /* Quản lý ẩn hiện bằng JS */
    margin-top: 15px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    background: #141414;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    animation: fadeInSlide 0.3s ease-in-out forwards;
}

/* 3. Khối lưới chia đều 2 cột cho các ô Checkbox thể loại con */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* Định dạng nhãn text và hiệu ứng hover của từng ô checkbox thể loại con */
.genre-item-label {
    color: #b3b3b3;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #1c1c1c;
    border: 1px solid #262626;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    user-select: none;
}

.genre-item-label:hover {
    color: #ffffff;
    background: #262626;
    border-color: #404040;
}

/* Thay đổi màu sắc khi ô checkbox được tích chọn */
.genre-item-label input[type="checkbox"]:checked + span,
.genre-item-label:has(input[type="checkbox"]:checked) {
    color: #00ffff;
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(0, 255, 255, 0.02);
}

/* Ép các ô input checkbox thô to hơn và đổi màu con trỏ */
.genre-checkbox, #enable_customize_genres {
    width: 16px;
    height: 16px;
    accent-color: #00ffff; /* Đổi màu xanh neon đặc trưng cho nút tích */
    cursor: pointer;
}

/* 4. Định dạng ô TextBox gõ chữ tự chế */
.custom-genres-textbox {
    width: 100%;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #2b2b2b;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.custom-genres-textbox:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
    background: #1e1e1e;
}

/* Hiệu ứng hoạt họa mượt mà khi bảng chọn trượt hiện ra */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
