@font-face {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.characters-section {
    padding: 40px 0;
}

.section-title {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    color: #f9d16b;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h1 {
    background: linear-gradient(to right, #f9d16b, #ffd700);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.character-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    margin: 5px;
    padding: 8px 15px;
    background: #f9d16b;
    color: #000;
    border: 1px solid #f9d16b;
    border-radius: 5px;
    cursor: pointer;
    transition:  0.3s ease;
}
.category-btn a{
    color: #000;
    text-decoration: none;
}

.character-group {
    margin-bottom: 40px;
}

.group-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: uppercase;
    padding-left: 10px;
}

/* Màu khác nhau cho từng nhóm */
.character-group:nth-child(3) .group-title {
    color: #f9d16b;
    border-left: 10px solid #f9d16b;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    width: 100%;
    max-width: 280px;
}

.character-group:nth-child(4) .group-title {
    color: #e8e8e8;
    border-left: 10px solid #e8e8e8;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    width: 100%;
    max-width: 280px;
}

.character-group:nth-child(5) .group-title {
    color: rgb(223, 87, 87);
    border-left: 10px solid #b22222;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    width: 100%;
    max-width: 280px;
}

/* Tiêu đề vùng (Chapter) */
.region-title {
    font-size: 15px;
    color: rgb(223, 87, 87);
    margin: 20px 0 10px;
    padding-left: 20px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.character-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    min-height: 200px;
}

.character-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 8px rgba(249, 209, 107, 0.5);
}

/* Main Characters (Gold) */
.character-group:nth-child(3) .character-card:hover {
    box-shadow: 0 0 8px rgba(249, 209, 107, 0.6);
    border: 1px solid #f9d16b;
}

.character-group:nth-child(3) .character-name {
    color: #f9d16b;
}

.character-group:nth-child(3) .character-card:hover .character-name {
    color: #ffd700;
}

/* Allies (Silver) */
.character-group:nth-child(4) .character-card:hover {
    box-shadow: 0 0 8px rgba(232, 232, 232, 0.6);
    border: 1px solid #e8e8e8;
}

.character-group:nth-child(4) .character-name {
    color: #e8e8e8;
}

.character-group:nth-child(4) .character-card:hover .character-name {
    color: #ffffff;
}

/* Enemies/Bosses (Red) */
.character-group:nth-child(5) .character-card {
    background: rgba(35, 9, 9, 0.6);
}

.character-group:nth-child(5) .character-card:hover {
    box-shadow: 0 0 8px rgba(178, 34, 34, 0.6);
    border: 1px solid #b22222;
}

.character-group:nth-child(5) .character-name {
    color: rgb(255, 255, 255);
}

.character-group:nth-child(5) .character-card:hover .character-name {
    color: #ff4040;
}

.character-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.character-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-card:hover .character-img img {
    transform: scale(1.05);
}

.character-name {
    font-size: 16px;
    padding: 10px 10px 5px;
    text-align: center;
    transition: color 0.3s ease;
}

.character-type {
    font-size: 12px;
    color: #aaa;
    padding: 0 10px 10px;
    text-align: center;
    text-transform: uppercase;
}

.character-detail {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.back-button {
    display: inline-block;
    color: #f9d16b;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #e8e8e8;
}

.character-detail-content {
    display: flex;
    gap: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #f9d16b;
}

.character-detail-img {
    flex: 1;
    max-width: 300px;
}

.character-detail-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #f9d16b;
}

.character-detail-info {
    flex: 2;
}

.character-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #e8e8e8;
    margin-bottom: 20px;
}

.ability-title {
    font-size: 18px;
    color: #f9d16b;
    margin-bottom: 10px;
}

.ability-list {
    list-style: none;
}

.ability-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #e8e8e8;
}

.ability-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f9d16b;
}

@media screen and (max-width: 768px) {
    .characters-section {
        padding: 20px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .character-categories {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .category-btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 8px 12px;
    }

    .group-title {
        font-size: 20px;
        padding-left: 8px;
        max-width: 100%;
    }

    .region-title {
        font-size: 16px;
        padding-left: 15px;
        max-width: 100%;
    }

    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .character-card {
        min-height: 180px;
    }

    .character-img {
        height: 100px;
    }

    .character-name {
        font-size: 14px;
        padding: 8px 8px 4px;
    }

    .character-type {
        font-size: 10px;
        padding: 0 8px 8px;
    }

    .character-detail {
        padding: 20px 0;
    }

    .character-detail-content {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .character-detail-img {
        max-width: 100%;
    }

    .character-desc {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .ability-title {
        font-size: 16px;
    }

    .ability-list li {
        font-size: 14px;
        padding-left: 15px;
    }
}

@media screen and (max-width: 480px) {
    .characters-section {
        padding: 15px 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .character-categories {
        gap: 5px;
    }

    .category-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    .group-title {
        font-size: 18px;
        padding-left: 6px;
    }

    .region-title {
        font-size: 14px;
        padding-left: 10px;
    }

    .characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    .character-card {
        min-height: 160px;
    }

    .character-img {
        height: 90px;
    }

    .character-name {
        font-size: 13px;
        padding: 6px 6px 3px;
    }

    .character-type {
        font-size: 9px;
        padding: 0 6px 6px;
    }

    .character-detail {
        padding: 15px 0;
    }

    .back-button {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .character-detail-content {
        padding: 10px;
        gap: 15px;
    }

    .character-desc {
        font-size: 13px;
    }

    .ability-title {
        font-size: 15px;
    }

    .ability-list li {
        font-size: 13px;
        padding-left: 12px;
    }
}