ul.server-list {
    margin-top: 2px;
}

.ad-container {
    display: inline-block;
    text-align: center;
}
.ad-container a {
    margin-top: 5px;
    display: block;
}

.backup-server a.btn-episode {
    cursor: pointer;
    padding: 7px;
}

#jwplayer {
    height: 100% !important;
}

.server-group .list-episode {
    max-height: 300px;
    overflow: auto;
}

.list-episode .episode {
    display: inline-block;
    text-align: center;
    padding: 3px;
    margin: 0 !important;
}

.list-episode .episode a {
    white-space: nowrap;
    text-overflow: ellipsis;
    -ms-text-overflow: ellipsis;
    overflow: hidden;
}

.btn3d {
    padding: 0 !important;
    width: 100%;
}

.Wdgt .block-movie {
    padding: 10px;
    background: rgb(19, 19, 19);
}
.Wdgt .block-movie a {
    margin-bottom: 5px;
    display: block;
    position: relative;
}
.Wdgt .block-movie a:hover > span {
    background: rgba(0, 0, 0, 0.8) none repeat scroll 0% 0%;
}
.Wdgt .block-movie a:hover {
    opacity: 0.8;
}

.Wdgt .block-movie a img {
    width: 100%;
    height: 157px;
}
.Wdgt .block-movie span {
    background: rgba(0, 0, 0, 0.5) none repeat scroll 0% 0%;
    display: block;
    bottom: 0px;
    position: absolute;
    width: 100%;
    color: #fff;
    padding: 5px;
}
.Wdgt .block-movie span h3 {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    color: #f5c864;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin: 5px 0px;
}
.Wdgt .block-movie span h4 {
    color: #fff;
    font-size: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-decoration: none;
    margin: 0px;
}

/* SweetAlert2 custom styles for notifications */
.swal2-dark {
    backdrop-filter: blur(5px);
}

.swal2-dark .swal2-title {
    color: #e0e0e0 !important;
    font-weight: 600;
}

.swal2-dark .swal2-html-container {
    color: #b0b0b0 !important;
    line-height: 1.5;
}

.swal2-dark .swal2-icon.swal2-warning {
    border-color: #f39c12 !important;
    color: #f39c12 !important;
}

.swal2-dark .swal2-icon.swal2-success {
    border-color: #27ae60 !important;
}

.swal2-dark .swal2-icon.swal2-success .swal2-success-ring {
    border-color: #27ae60 !important;
}

.swal2-dark .swal2-icon.swal2-error {
    border-color: #e74c3c !important;
}

.swal2-dark .swal2-icon.swal2-info {
    border-color: #3498db !important;
    color: #3498db !important;
}

.swal2-dark .swal2-icon.swal2-info .swal2-info-ring {
    border-color: #3498db !important;
}

.swal2-success-popup {
    border: 2px solid rgba(39, 174, 96, 0.3) !important;
}

.swal2-info-popup {
    border: 2px solid rgba(52, 152, 219, 0.3) !important;
}

.swal2-dark .swal2-styled.swal2-confirm {
    background-color: #e74c3c !important;
    border: none !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.swal2-dark .swal2-styled.swal2-confirm:hover {
    background-color: #c0392b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
}

.swal2-dark .swal2-styled.swal2-cancel {
    background-color: #6c757d !important;
    border: none !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.swal2-dark .swal2-styled.swal2-cancel:hover {
    background-color: #5a6268 !important;
    transform: translateY(-1px);
}

.swal2-dark .swal2-styled.swal2-info {
    background-color: #3498db !important;
    border: none !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.swal2-dark .swal2-styled.swal2-info:hover {
    background-color: #217dbb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
}

/* Error popup border */
.swal2-error-popup {
    border: 2px solid rgba(231, 76, 60, 0.3) !important;
}

/* Animation for success popup */
@keyframes swalSuccessBounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.swal2-success-popup.swal2-show {
    animation: swalSuccessBounce 0.6s ease-out;
}

/* Animation for info popup */
@keyframes swalInfoBounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.swal2-info-popup.swal2-show {
    animation: swalInfoBounce 0.6s ease-out;
}

/* Animation for error popup */
@keyframes swalErrorBounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.swal2-error-popup.swal2-show {
    animation: swalErrorBounce 0.6s ease-out;
}

/* Remember Me Checkbox Styling */
.remember-me-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #e0e0e0;
}

.remember-me-container input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #f1994f;
    cursor: pointer;
}

.remember-me-container label {
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

.remember-me-container label:hover {
    color: #f1994f;
    transition: color 0.3s ease;
}

/* Comment System Styles */
.comment-system {
    background: #272f33;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0px;
    /* border: 1px solid #333; */
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.comment-header h3 {
    color: #ffffff;
    font-weight: bold;
}

.comment-sort {
    display: flex;
    gap: 10px;
}

.sort-btn {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: #333;
    color: #fff;
}

.sort-btn.active {
    background: #a8876a;
    color: #000;
    border-color: #f1994f;
}

.comment-form {
    background: #222;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.comment-form textarea,
.reply-form textarea {
    width: 100%;
    min-height: 80px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 10px;
    color: #ccc;
    font-size: 14px;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #f1994f;
}

.comment-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.comment-form .login-prompt {
    color: #ccc;
    font-size: 14px;
    text-align: center;
}

.comment-form .login-prompt a {
    color: #f1994f;
    text-decoration: none;
}

.comment-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #a8876a;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    background: #dbb18d;
    transform: translateY(-1px);
}

.comment-submit:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* Float reply-actions buttons to the right */
.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reply-actions button {
    gap: 8px;
    background: #a8876a;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.reply-actions button:hover {
    background: #dbb18d;
    transform: translateY(-1px);
}

.reply-actions button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.reply-actions .btn-small.btn-cancel {
    background: #666;
}

.comment-list {
    max-height: 600px;
    overflow-y: auto;
}

.comment-item {
    margin-bottom: 10px;
}

.comment-item.reply {
    margin-left: 45px;
}

.comment-main-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-header-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.comment-main-content {
    flex: 1;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 15px;
}

.comment-item.reply .comment-main-content {
    background: #222;
}

.comment-user-info {
    margin-bottom: 10px;
}

.comment-username {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.comment-user-level {
    color: #000;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
    display: block;
    text-align: center;
    white-space: nowrap;
    min-width: 35px;
}

.comment-user-level-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.comment-user-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
    background: #00000066;
}

.comment-time {
    color: #666;
    font-size: 12px;
}

.comment-episode-info {
    color: #888;
    margin-left: 5px;
}

.comment-content {
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 0;
    font-size: 14px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    margin-left: 70px;
    flex-wrap: wrap;
}

/* Facebook-style Like Button - Text and Icon Only */
.like-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.like-btn:hover {
    color: #ccc;
    text-decoration: none;
}

.like-btn.liked {
    color: #1877f2 !important;
    font-weight: 600;
}

.like-btn.liked i {
    color: #1877f2 !important;
}

.like-btn.liked span {
    color: #1877f2 !important;
    font-weight: 600;
}

/* Facebook-style Dislike Button - Text and Icon Only */
.dislike-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.dislike-btn:hover {
    color: #ccc;
    text-decoration: none;
}

.dislike-btn.disliked {
    color: #e74c3c !important;
    font-weight: 600;
}

.dislike-btn.disliked i {
    color: #e74c3c !important;
}

.dislike-btn.disliked span {
    color: #e74c3c !important;
    font-weight: 600;
}

.dislike-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

.dislike-btn span {
    font-size: 13px;
    font-weight: inherit;
    transition: color 0.2s ease;
}

.like-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

.like-btn span {
    font-size: 13px;
    font-weight: inherit;
    transition: color 0.2s ease;
}

/* Facebook-style Reply Button */
.reply-btn,
.reply-to-reply-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.reply-btn:hover,
.reply-to-reply-btn:hover {
    color: #ccc;
    text-decoration: none;
}

.reply-btn i,
.reply-to-reply-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

/* Facebook-style Report Button */
.report-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.report-btn:hover {
    color: #e74c3c;
    text-decoration: none;
}

.report-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

/* Facebook-style Delete Button */
.delete-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.delete-btn:hover {
    color: #e74c3c;
    text-decoration: none;
}

.delete-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

/* Processing state for like button */
.like-btn.processing {
    pointer-events: none;
    opacity: 0.7;
}

.like-btn.processing i {
    animation: spin 1s linear infinite;
}

/* Processing state for dislike button */
.dislike-btn.processing {
    pointer-events: none;
    opacity: 0.7;
}

.dislike-btn.processing i {
    animation: spin 1s linear infinite;
}

/* Fast pulse animation for like/dislike feedback */
.pulse-effect {
    animation: pulse 0.2s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Fast counter change animation */
.counter-change {
    animation: counterBounce 0.15s ease-in-out;
}

@keyframes counterBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Rate limited button visual feedback */
.rate-limited {
    animation: rateLimit 0.5s ease-in-out;
}

@keyframes rateLimit {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(0.95);
        background-color: #ffebee;
    }
    50% {
        transform: scale(1.02);
        background-color: #ffcdd2;
    }
    75% {
        transform: scale(0.98);
        background-color: #ffebee;
    }
    100% {
        transform: scale(1);
        background-color: transparent;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.comment-action-btn {
    background: none;
    border: none;
    color: #65676b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
    outline: none;
    text-decoration: none;
}

.comment-action-btn:hover {
    color: #ccc;
    text-decoration: none;
}

.comment-action-btn i {
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .like-btn,
    .dislike-btn,
    .reply-btn,
    .reply-to-reply-btn,
    .report-btn,
    .delete-btn,
    .comment-action-btn {
        font-size: 12px;
        gap: 4px;
    }

    .like-btn i,
    .dislike-btn i,
    .reply-btn i,
    .reply-to-reply-btn i,
    .report-btn i,
    .delete-btn i,
    .comment-action-btn i {
        font-size: 14px;
    }

    .like-btn span,
    .dislike-btn span {
        font-size: 12px;
    }
}

/* Reply form styles */
.reply-form-container {
    margin-left: 70px;
    margin-top: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
}

/* Replies dropdown styles - positioned within main content */
.replies-dropdown {
    margin: 10px 0 10px 70px;
    padding: 8px 12px;
    background: #1a1a1a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #ccc;
}

.replies-dropdown:hover {
    background: #2a2a2a;
    border-color: #555;
}

.replies-dropdown-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.replies-dropdown-icon {
    transition: transform 0.3s ease;
    color: #f1994f;
}

.replies-dropdown.expanded .replies-dropdown-icon {
    transform: rotate(180deg);
}

.replies-dropdown-text {
    font-size: 13px;
    color: #a8876a;
}

.replies-container {
    overflow: hidden;
    transition: all 0.3s ease;
}

.replies-container.collapsed {
    max-height: 0;
    opacity: 0;
}

.replies-container.expanded {
    max-height: 1000px;
    opacity: 1;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 1000px;
    }

    to {
        opacity: 0;
        max-height: 0;
    }
}

.load-more-comments {
    /* display: block; */
    width: 100%;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #a8876a;
    padding: 10px;
    /* border-radius: 4px; */
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.load-more-comments:hover {
    background: #dbb18d;
    color: #000;
}

.load-more-comments:disabled {
    background: #444;
    color: #666;
    border-color: #666;
    cursor: not-allowed;
}

.comment-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.comment-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.comment-empty i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Report Modal */
.report-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.report-modal-content {
    background: #222;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    color: #fff;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.report-modal-header h3 {
    margin: 0;
    color: #f1994f;
}

.report-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.report-modal-close:hover {
    color: #fff;
}

.report-modal textarea {
    width: 100%;
    min-height: 100px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 10px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
}

.report-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.report-modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.report-modal-actions .btn-cancel {
    background: #666;
    color: #fff;
}

.report-modal-actions .btn-submit {
    background: #f44336;
    color: #fff;
}

/* Toast notification styles */
.comment-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 300px;
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    opacity: 0;
}

.comment-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.comment-toast-warning {
    background: #ff9800;
    border-left: 4px solid #f57c00;
}

.comment-toast-info {
    background: #2196f3;
    border-left: 4px solid #1976d2;
}

.comment-toast-error {
    background: #f44336;
    border-left: 4px solid #d32f2f;
}

.comment-toast-success {
    background: #4caf50;
    border-left: 4px solid #388e3c;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-content i {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-content span {
    flex: 1;
    line-height: 1.4;
}

/* Mobile responsiveness for toast */
@media (max-width: 768px) {
    .comment-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .comment-toast.show {
        transform: translateY(0);
    }
}

/* Rate limiting visual feedback */
.comment-btn.rate-limited {
    animation: shake 0.5s ease-in-out;
    border-color: #ff9800 !important;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Comment highlight effect */
.comment-highlight {
    background: linear-gradient(
        90deg,
        rgba(241, 153, 79, 0.2) 0%,
        rgba(241, 153, 79, 0.1) 50%,
        transparent 100%
    ) !important;
    border-left-color: #f1994f !important;
    border-left-width: 4px !important;
    animation: commentHighlight 0.6s ease-out;
    transition: all 0.8s ease;
}

@keyframes commentHighlight {
    0% {
        background: rgba(241, 153, 79, 0.4);
        transform: scale(1.02);
    }
    50% {
        background: rgba(241, 153, 79, 0.3);
    }
    100% {
        background: linear-gradient(
            90deg,
            rgba(241, 153, 79, 0.2) 0%,
            rgba(241, 153, 79, 0.1) 50%,
            transparent 100%
        );
        transform: scale(1);
    }
}

/* Loading state for priority comments */
.comment-priority-loading {
    position: relative;
    overflow: hidden;
}

.comment-priority-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(241, 153, 79, 0.3),
        transparent
    );
    animation: priorityShimmer 1.5s infinite;
}

@keyframes priorityShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Comment priority loading with smooth scroll */
.comment-item.comment-priority-loading {
    background: linear-gradient(
        90deg,
        rgba(241, 153, 79, 0.3),
        rgba(241, 153, 79, 0.15),
        rgba(241, 153, 79, 0.1)
    );
    border-left: 4px solid #f1994f;
    border-radius: 8px;
    padding: 8px;
    margin: 4px 0;
    animation: priorityPulse 2s ease-in-out infinite;
}

@keyframes priorityPulse {
    0%,
    100% {
        background: linear-gradient(
            90deg,
            rgba(241, 153, 79, 0.3),
            rgba(241, 153, 79, 0.15),
            rgba(241, 153, 79, 0.1)
        );
    }
    50% {
        background: linear-gradient(
            90deg,
            rgba(241, 153, 79, 0.4),
            rgba(241, 153, 79, 0.2),
            rgba(241, 153, 79, 0.15)
        );
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 768px) {
    .comment-system {
        padding: 15px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .comment-item.reply {
        margin-left: 45px;
    }

    .comment-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .report-modal-content {
        width: 350px;
    }
}

/* User mention tag styles */
.user-mention {
    background: #f1994f;
    color: #000;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid #e6873d;
    transition: all 0.2s ease;
}

.user-mention:hover {
    background: #e6873d;
    color: #000;
    text-decoration: none;
}
.character-count {
    font-size: 12px;
    color: #999;
}

.character-count .current {
    color: #4caf50;
    font-weight: 600;
}
#badge-selector {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid #555;
    background: #333;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#badge-selector:focus {
    outline: none;
    border-color: #f1994f;
    box-shadow: 0 0 0 2px rgba(241, 153, 79, 0.2);
}

#badge-selector option {
    background: #333;
    color: #fff;
    padding: 8px;
}

.user-badges-section {
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.badges-grid::-webkit-scrollbar {
    width: 6px;
}

.badges-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.badges-grid::-webkit-scrollbar-thumb {
    background: #f1994f;
    border-radius: 3px;
}

.badge-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid;
    transition: transform 0.2s ease, background-color 0.2s ease;
    cursor: default;
}

.badge-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.badge-item .badge-name {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-item .badge-description {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 6px;
    line-height: 1.3;
}

.badge-item .badge-earned {
    font-size: 10px;
    color: #999;
    font-style: italic;
}

.badge-rare-star {
    color: #ffd700;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .badges-grid {
        grid-template-columns: 1fr;
        max-height: 150px;
    }

    .badge-item {
        padding: 8px;
    }

    .user-info-row {
        font-size: 13px;
    }

    #badge-selector {
        font-size: 13px;
        padding: 8px;
    }
}

/* Top Users Widget Styles */

.top-user-item {
    cursor: pointer;
    padding: 5px 0;
    display: flex;
    align-items: center;
}

.top-user-item:last-child {
    border-bottom: none;
}

.top-user-item:hover {
    transform: translateY(-8px);
}

.user-rank {
    position: relative;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.rank-number {
    font-weight: bold;
    font-size: 16px;
    color: #f5c864;
}

.rank-icon {
    position: absolute;
    right: -5px;
    top: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.rank-icon.rank-1 {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #b8860b;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-icon.rank-2 {
    background: linear-gradient(45deg, #c0c0c0, #e8e8e8);
    color: #696969;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}

.rank-icon.rank-3 {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: #8b4513;
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
}

.rank-icon::before {
    content: "★";
}

.user-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid rgba(245, 200, 100, 0.3);
    transition: border-color 0.3s ease;
}

.top-user-item:hover .user-avatar {
    border-color: #f5c864;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge {
    background: #00000066;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.user-level {
    color: #fff;
    background-color: #333;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: bold;
}

.level-number {
    color: #fff;
    font-size: 11px;
    background: rgba(245, 200, 100, 0.2);
    padding: 1px 5px;
    border-radius: 8px;
}

.user-exp {
    margin-top: 2px;
}

.exp-text {
    color: #b0b0b0;
    font-size: 11px;
}

.no-users {
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-users p {
    margin: 0;
    font-style: italic;
}

/* Animation cho top 3 */
.top-user-item[data-rank="1"] .rank-number {
    animation: goldGlow 2s ease-in-out infinite alternate;
}

.top-user-item[data-rank="2"] .rank-number {
    animation: silverGlow 2s ease-in-out infinite alternate;
}

.top-user-item[data-rank="3"] .rank-number {
    animation: bronzeGlow 2s ease-in-out infinite alternate;
}

@keyframes goldGlow {
    from {
        text-shadow: 0 0 5px #ffd700;
    }
    to {
        text-shadow: 0 0 15px #ffd700, 0 0 20px #ffd700;
    }
}

@keyframes silverGlow {
    from {
        text-shadow: 0 0 5px #c0c0c0;
    }
    to {
        text-shadow: 0 0 15px #c0c0c0, 0 0 20px #c0c0c0;
    }
}

@keyframes bronzeGlow {
    from {
        text-shadow: 0 0 5px #cd7f32;
    }
    to {
        text-shadow: 0 0 15px #cd7f32, 0 0 20px #cd7f32;
    }
}

/* Responsive design cho mobile */
@media (max-width: 768px) {
    .top-user-item {
        padding: 10px 0;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }

    .user-name {
        font-size: 13px;
    }

    .level-name,
    .level-number {
        font-size: 11px;
    }

    .exp-text {
        font-size: 10px;
    }

    .user-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(241, 153, 79, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.scroll-to-top i {
    font-size: 16px;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}

.scroll-to-top span {
    font-size: 11px;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

/* Visible state */
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Hover effects */
.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(241, 153, 79, 0.5);
}

.scroll-to-top:hover i {
    transform: translateY(-2px);
    animation: bounceUp 0.6s ease infinite alternate;
}

/* Click animation */
.scroll-to-top.clicked {
    transform: translateY(0) scale(0.95);
}

/* Bounce animation for arrow */
@keyframes bounceUp {
    0% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(-6px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 10px;
    }

    .scroll-to-top i {
        font-size: 14px;
    }

    .scroll-to-top span {
        font-size: 7px;
    }
}

/* Alternative smaller design for compact screens */
@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top span {
        display: none;
    }

    .scroll-to-top i {
        font-size: 16px;
        margin-bottom: 0;
    }
}

/* Pulse effect when first appearing */
.scroll-to-top.visible {
    animation: initialPulse 1s ease-out;
}

@keyframes initialPulse {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 10px 35px rgba(241, 153, 79, 0.6);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}
