.fs-livestream-room {
    max-width: 1330px;
    margin: 10px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 15px 32px 15px;
    color: #fff;
}

.fs-livestream-teams {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: #23232b;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

.fs-livestream-content {
    flex: 1;
    min-width: 0;
    max-width: 900px;
    background: #23232b;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

.fs-livestream-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    position: relative;
    margin-bottom: 15px;
}

.fs-livestream-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 50%;
    background: #4CAF50;
}

.fs-livestream-title {
    flex: 1;
    margin-right: 20px;
}

.fs-livestream-title .match-title {
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 4px 0;
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    text-align: left;
}

.fs-livestream-title .league-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: normal;
}

.fs-livestream-time {
    font-size: 12px;
    background: linear-gradient(102deg, #F8C32F -7.82%, #B1571A 110.99%);
    padding: 3px 6px;
    border-radius: 4px;
    color: #000;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.fs-livestream-time:hover {
    background: #ff7d1f;
}

.fs-livestream-time::before {
    content: '\f06b';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.fs-livestream-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
    padding: 0 15px;
}

.fs-livestream-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #23232b;
}

.fs-livestream-video::before {
    content: "";
    display: block;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

/* DPlayer specific styles */
.dplayer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

.dplayer .dplayer-video-wrap {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #23232b !important;
}

.dplayer .dplayer-video-wrap .dplayer-video {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    background: #23232b !important;
}

.dplayer video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #23232b !important;
}

.dplayer-controller {
    z-index: 2 !important;
}

.fs-match-countdown {
    background: linear-gradient(0deg, #181820 50%, #181818 100%);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.countdown-title {
    color: #feba4b;
    margin-bottom: 2rem;
    font-size: 1.5em;
    animation: pulse 2s infinite;
    width: 100%;
    text-align: center;
}

.countdown-timer {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.countdown-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(23, 28, 39, 1);
    padding: 1rem;
    border-radius: 8px;
    min-width: 100px;
    border: 1px solid rgba(254, 186, 75, 0.2);
}

.countdown-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #feba4b;
    text-shadow: 0 0 10px rgba(254, 186, 75, 0.3);
    position: relative;
    overflow: hidden;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-label {
    font-size: 0.9em;
    color: rgba(254, 186, 75, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes countSlide {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

.fs-livestream-team {
    display: flex;
    align-items: center;
    gap: 12px;
}


.fs-livestream-team img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.fs-livestream-team div {
    font-size: 15px;
    color: #fff;
}

.fs-livestream-vs {
    font-size: 32px;
    font-weight: bold;
    color: #feba4b;
    margin: 0 16px;
}

.fs-livestream-score {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin-top: 8px;
}

.fs-livestream-caster {
    text-align: center;
    color: #aaa;
    font-size: 15px;
    margin-top: 8px;
}

.fs-livestream-chat {
    width: 400px;
    background: var(--color-item-bg);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
    height: calc(900px * 9/16 + 24px + 16px + 32px + 24px + 80px);
}

.fs-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a32;
    position: relative;
}

.fs-chat-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.fs-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.fs-chat-status.connected {
    color: #4caf50;
}

.fs-chat-status.disconnected {
    color: #f44336;
}

.fs-chat-status i {
    font-size: 12px;
}

.fs-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 8px;
    max-height: calc(900px * 9/16);
}

/* Custom scrollbar for chat */
.fs-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.fs-chat-messages::-webkit-scrollbar-track {
    background: var(--color-item-bg);
}

.fs-chat-messages::-webkit-scrollbar-thumb {
    background: #2a2a32;
    border-radius: 3px;
}

.fs-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #3a3a42;
}

.fs-chat-message {
    margin-bottom: 8px;
    padding: 6px 8px;
    background: var(--color-item-bg);
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
}

.fs-chat-message-content {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.fs-chat-username {
    color: #feba4b;
    font-size: 13px;
    white-space: nowrap;
}

.fs-chat-text {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.fs-chat-time {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.fs-chat-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    background: var(--color-item-bg);
    border-radius: 6px;
    padding: 8px;
    height: 64px;
    box-sizing: border-box;
}

.fs-chat-input input[type="text"] {
    flex: 1;
    background: var(--color-item-bg);
    border: none;
    padding: 0 14px;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    outline: none;
    height: 40px;
    line-height: 40px;
    margin: 0;
}

.fs-chat-input button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: #feba4b;
    border: none;
    border-radius: 4px;
    color: #000;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    margin: 0;
    padding: 10px;
}

.fs-chat-input button:hover {
    background: #ffc96b;
}

/* Xóa tất cả các styles không cần thiết */
.emoji-picker,
.fire-btn {
    display: none;
}

/* User info popup */
.fs-chat-user-icon {
    color: #feba4b;
    font-size: 20px;
    cursor: pointer;
    margin-left: 12px;
    transition: color 0.2s;
}

.fs-chat-user-icon:hover {
    color: #fff;
}

.fs-chat-user-popup {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: var(--color-popup);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 100;
    min-width: 200px;
    text-align: center;
}

.fs-chat-user-popup:hover {
    background: var(--color-popup);
}

.fs-chat-user-popup.active {
    display: block;
}

.fs-chat-user-popup .user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid #feba4b;
}

.fs-chat-user-popup .user-info {
    margin-bottom: 12px;
}

.fs-chat-user-popup .user-name {
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.fs-chat-user-popup .user-level {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--color-item-bg);
}

.fs-chat-user-popup .user-level i {
    font-size: 12px;
}

.fs-chat-user-popup .user-logout-btn {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.fs-chat-user-popup .user-logout-btn:hover {
    background: #d32f2f;
}

/* Thêm animation cho popup */
.fs-chat-user-popup.active {
    animation: popupFadeIn 0.2s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles */
@media (max-width: 1330px) {
    .fs-livestream-room {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .fs-livestream-content {
        width: 100%;
        max-width: none;
    }

    .fs-livestream-chat {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 500px;
    }

    .fs-chat-messages {
        max-height: 400px;
    }
}

/* Add login modal styles */
.fs-login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.fs-login-modal.active {
    display: flex;
}

.fs-login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fs-login-close:hover {
    color: #feba4b;
}

.fs-login-header {
    text-align: center;
    margin-bottom: 24px;
}

.fs-login-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.fs-login-subtitle {
    color: #aaa;
    font-size: 14px;
}

.fs-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fs-login-input {
    background: #1a1a20;
    border: 1px solid #2a2a32;
    padding: 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.fs-login-input:focus {
    border-color: #feba4b;
    outline: none;
}

.fs-login-button {
    /* Styles are now in single-match.php */
}

.fs-login-error {
    color: #f44336;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.fs-login-error.active {
    display: block;
}

.fs-chat-login-required {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-item-bg);
    border-radius: 6px;
    padding: 8px;
    margin-top: auto;
    min-height: 48px;
    height: 48px;
    box-sizing: border-box;
    width: 100%;
    justify-content: flex-start;
}

.fs-chat-login-required p {
    margin: 0;
    color: #fff;
    font-size: 15px;
    flex: 1;
}

.fs-chat-login-button {
    /* Styles are now in single-match.php */
}

.fs-login-success {
    color: #4caf50;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.fs-login-success.active {
    display: block;
}

/* Level badge styles */
.fs-chat-level-icon {
    margin-left: 4px;
    font-size: 13px;
}

/* Level 1-10: Bronze VIP */
.level-1-10 {
    color: #CD7F32;
    text-shadow: 0 0 3px rgba(205, 127, 50, 0.3);
}

/* Level 11-20: Silver VIP */
.level-11-20 {
    color: #C0C0C0;
    text-shadow: 0 0 3px rgba(192, 192, 192, 0.3);
}

/* Level 21-30: Gold VIP */
.level-21-30 {
    color: #FFD700;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

/* Level 31-40: Platinum VIP */
.level-31-40 {
    background: linear-gradient(45deg, #E5E4E2, #B4B4B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 3px rgba(229, 228, 226, 0.3);
}

/* Level 41-50: Diamond VIP */
.level-41-50 {
    background: linear-gradient(45deg, #89CFF0, #7851A9, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(137, 207, 240, 0.5);
    animation: shine 2s linear infinite;
}

@keyframes shine {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Remove old level badge styles */
.fs-chat-level {
    display: none;
}

/* Emoji picker popup */
.emoji-picker {
    display: none;
    position: absolute;
    bottom: 54px;
    left: 8px;
    background: var(--color-item-bg);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 10px 12px 6px 12px;
    z-index: 200;
    min-width: 220px;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 320px;
}

.emoji-picker.active {
    display: flex;
}

.emoji-picker span {
    font-size: 22px;
    cursor: pointer;
    margin: 4px;
    transition: transform 0.1s;
    border-radius: 6px;
    padding: 2px 4px;
}

.emoji-picker span:hover {
    background: var(--color-item-bg);
    transform: scale(1.2);
}

.fs-livestream-league {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.fs-livestream-league img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
}

.fs-livestream-league-name {
    color: #feba4b;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .fs-livestream-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .fs-livestream-title {
        width: 100%;
    }

    .fs-livestream-title .match-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .fs-livestream-title .league-name {
        font-size: 12px;
    }

    .fs-livestream-time {
        width: 100%;
        justify-content: center;
        font-size: 11px;
    }

    .fs-livestream-teams {
        padding: 15px;
        gap: 15px;
    }

    .fs-livestream-team img {
        width: 36px;
        height: 36px;
    }

    .fs-livestream-team div {
        font-size: 13px;
    }

    .fs-livestream-vs {
        font-size: 24px;
    }

    .countdown-item {
        min-width: 80px;
        padding: 0.8rem;
    }

    .countdown-value {
        font-size: 2em;
        height: 40px;
    }

    .countdown-label {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .fs-livestream-title .match-title {
        font-size: 13px;
    }

    .fs-livestream-teams {
        padding: 12px;
        gap: 10px;
    }

    .fs-livestream-team img {
        width: 32px;
        height: 32px;
    }

    .fs-livestream-team div {
        font-size: 12px;
    }

    .fs-livestream-vs {
        font-size: 20px;
    }

    .fs-livestream-main {
        margin-top: 15px;
        padding: 0;
    }

    .fs-livestream-video {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* Responsive styles for countdown timer */
@media (max-width: 768px) {
    .fs-match-countdown {
        padding: 1.5rem;
    }

    .countdown-title {
        font-size: 1.2em;
        margin-bottom: 1.5rem;
    }

    .countdown-timer {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 70px;
        padding: 0.8rem;
    }

    .countdown-value {
        font-size: 2em;
        height: 35px;
    }

    .countdown-label {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .fs-match-countdown {
        padding: 1rem;
    }

    .countdown-title {
        font-size: 1em;
        margin-bottom: 1rem;
    }

    .countdown-timer {
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 60px;
        padding: 0.6rem;
    }

    .countdown-value {
        font-size: 1.5em;
        height: 30px;
    }

    .countdown-label {
        font-size: 0.7em;
    }
}

@media (max-width: 360px) {
    .countdown-timer {
        flex-wrap: wrap;
        justify-content: center;
    }

    .countdown-item {
        min-width: calc(50% - 1rem);
        margin-bottom: 0.5rem;
    }
}

.fs-score .vs {
    background: #16171B;
    stroke: #363636;
    text-align: center;
    font-family: "Oswald";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    color: #fff;
    stroke-width: 1px;
    position: relative;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.fs-score .vs::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    opacity: 0.6;
    pointer-events: none;
    transform: none;
    border-radius: 100px;
    padding: 1px;
    mask: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px) content-box exclude, linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px);
    background: linear-gradient(rgba(62, 61, 60, 0) 15%, var(--yellow-primary) 55%, rgba(62, 61, 60, 0) 80%);
}

.score-box {
    border-radius: 36px;
    border: 1px solid #29A81E;
    background: linear-gradient(280deg, #29A81E 22.76%, #14512C 43.68%, #16171B 74.93%);
    color: #FFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    height: 42px;
}
.teambox {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
@media screen and (max-width: 768px) {
    .teambox {
        gap: 10px;
    }
}
.score-home,
.score-away {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: transparent;
}

.score-highlight {
    background: linear-gradient(136deg, #29A81E, #14512C 31.07%, #16171B 80.51%) !important;
    color: #fff !important;
}

.score-colon {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.score-home span,
.score-away span,
.score-highlight span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.fs-match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fs-score {
    display: flex;
    align-items: center;
    justify-content: center;
}