    /* CRITICAL: Hide AI button by default - NUCLEAR approach to prevent cache issues */
    button#getPlayerInsights,
    div#loadInsightsBtn,
    #ai-insights-button-container button {
        display: none !important;
    }
    
    /* Only show when explicitly enabled via JS class */
    button#getPlayerInsights.ai-access-granted,
    div#loadInsightsBtn.ai-access-granted,
    #ai-insights-button-container.ai-access-granted button {
        display: inline-block !important;
    }
    
    /* VOD Chat Replay - hidden by default, only shown when playing VOD */
    #vod-chat-container {
        display: none !important;
    }
    #vod-chat-container.vod-chat-visible {
        display: block !important;
    }
    
    /* VOD Comments - hidden by default, shown for uploaded videos */
    #vod-comments-container {
        display: none !important;
    }
    #vod-comments-container.vod-comments-visible {
        display: flex !important;
        flex-direction: column;
    }

    /* Fix chat input visibility - ensure flex layout is never broken by jQuery .show()
       which sets display:block. The .chat-container class already defines:
       height: 650px (700/750px responsive), display: flex, flex-direction: column, overflow: hidden.
       DO NOT set height here - let .chat-container handle sizing (matches teams page). */
    #live-chat-container:not([style*="display: none"]) {
        display: flex !important;
        flex-direction: column !important;
    }
    #liveChatMessages {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-y: auto;
    }

    /* Hide Video.js error display - use loading overlay instead */
    .video-js .vjs-error-display,
    .video-js.vjs-error .vjs-error-display {
        display: none !important;
    }
    
    /* Fullscreen fixes for mobile devices (Samsung S22 Ultra, etc.) */
    .video-js.vjs-fullscreen,
    .video-js:-webkit-full-screen,
    .video-js:-moz-full-screen,
    .video-js:-ms-fullscreen {
        width: 100% !important;
        height: 100% !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 9999 !important;
    }
    
    .video-js.vjs-fullscreen video,
    .video-js:-webkit-full-screen video {
        width: 100% !important;
        height: 100% !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        object-fit: contain !important;
    }
    
    /* Fix for Samsung/Android tall screens - ensure video fills screen properly */
    @media screen and (max-aspect-ratio: 9/16) {
        .video-js.vjs-fullscreen video {
            object-fit: contain !important;
            width: 100vw !important;
            height: 100vh !important;
        }
    }
    
    /* iOS Safari fullscreen fix */
    video::-webkit-media-controls {
        display: flex !important;
    }
    
    /* Ensure uploaded videos (portrait/non-standard) don't stretch */
    #vod-player_html5_api,
    #vod-video-wrapper .vjs-tech {
        object-fit: contain !important;
    }

    /* Default: white background on video player to blend with page */
    #vod-video-wrapper .video-js {
        background-color: #fff !important;
    }

    /* Portrait video wrapper: JS sets inline styles for sizing/centering.
       CSS ensures the wrapper itself has no extra background. */
    #vod-video-wrapper.portrait-video {
        background: #fff !important;
    }

    /* Fullscreen container fix */
    .video-js.vjs-fullscreen .vjs-tech {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    /* Hide any overflow on fullscreen */
    body.vjs-full-window {
        overflow: hidden !important;
    }
    
    /* Mobile touch improvements for video player controls */
    @media (max-width: 768px), (pointer: coarse) {
        .video-js .vjs-progress-control {
            min-height: 44px !important; /* Apple minimum touch target */
        }
        .video-js .vjs-progress-holder {
            min-height: 20px !important;
        }
        .video-js .vjs-volume-panel {
            min-width: 44px !important;
        }
        .video-js .vjs-play-control,
        .video-js .vjs-fullscreen-control,
        .video-js .vjs-picture-in-picture-control {
            min-width: 44px !important;
            min-height: 44px !important;
        }
        /* Ensure progress bar is touchable on mobile */
        .video-js .vjs-slider {
            touch-action: pan-x !important;
        }
    }
</style>
<style>
  .card-sm-heading {
    font-size: 16px !important;
  }

  .trophies-img {
    width: 65px !important;
    height: 65px !important;
    border-radius: 0 !important;
  }

  /* 21-08-24 */
  .team-name span {
    flex-grow: 1 !important;
  }

  .team-detail-head img {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  }

  .default-btn.disabled {
    background: #dd163b !important;
    opacity: 1;
  }

  .picker{
      height: 80% !important;
  }

  /* Only affect videos in content area, not hero banner */
  .tournament-details-area video {
    height: auto !important;
  }

  /* Fix black space below video by ensuring tab-pane doesn't have fixed height */
  #players-stream.tab-pane {
    height: auto !important;
    min-height: 0 !important;
    background: #fff !important;
  }

  /* Prevent left column from stretching to match right column height */
  #mainTabContainer {
    align-self: flex-start !important;
  }

  /* Ensure tab content doesn't stretch */
  .matches-tabs, .tab-content {
    height: auto !important;
  }

  #players-stream .col-lg-12,
  #players-stream .row {
    height: auto !important;
    min-height: 0 !important;
  }

  .blinking-badge {
    background-color: #FF0000;
    color: white;
    padding: 3px 8px;
    animation: blink 1s infinite;
  }

  .blinking-mod {
    animation-delay: 0s;
  }

  .blinking-vip {
    animation-delay: 0.1s;
  }

  .text-bg-purple {
    background-color: #9b59b6 !important;
    color: white !important;
  }

  .blinking-sub {
    animation-delay: 0.2s;
  }

  .blinking-t1 {
    animation-delay: 0.2s;
  }

  .blinking-t2 {
    animation-delay: 0.4s;
  }

  .blinking-t3 {
    animation-delay: 0.6s;
  }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  .spin {
    animation: spin 1s linear infinite;
    display: inline-block;
  }

  /* VOD Grid Styles */
  .vod-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .vod-card img {
    transition: transform 0.2s;
  }

  .vod-card:hover img {
    transform: scale(1.05);
  }

  /* VOD Actions Menu */
  .vod-actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
  }

  .vod-actions .btn {
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .vod-actions .btn:hover {
    opacity: 0.9;
  }

  @media (max-width: 768px) {
    #vods-grid .col-lg-4 {
      flex: 0 0 50%;
      max-width: 50%;
    }

    /* Ensure VODs container doesn't overflow on mobile */
    #vods-container {
      width: 100%;
      overflow-x: hidden;
    }

    #vods-list {
      width: 100%;
      overflow-x: hidden;
    }

    #vods-grid {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    /* Fix tab content width on mobile */
    #mainTabContainer .tab-content {
      width: 100%;
      overflow-x: hidden;
    }
  }

  @media (max-width: 576px) {
    #vods-grid .col-lg-4 {
      flex: 0 0 100%;
      max-width: 100%;
    }
  }

.dropdown-list {
    display: none;
    position: absolute;
    background: #eeee;
    border: 1px solid #eeee;
    padding: 10px;
    width: 150px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(63, 59, 59, 0.3);
    top: 35px;
}

.chat-stats {
   position : relative;
}

/* Emoji Picker Styling - Consistent width across all devices, white background */
emoji-picker {
    max-height: 350px !important;
    height: 350px !important;
    width: 340px !important;
    --category-emoji-size: 1.25rem !important;
    --emoji-size: 1.5rem !important;
    /* White background theme to match D1Arena popup modals */
    --background: #fff !important;
    --border-color: #eee !important;
    --indicator-color: #dd163b !important;
    --input-border-color: #ddd !important;
    --input-font-color: #333 !important;
    --input-placeholder-color: #999 !important;
    --category-font-color: #333 !important;
    --button-active-background: #f0f0f0 !important;
    --button-hover-background: #f8f9fa !important;
}

/* Fix huge emojis in chat - make them inline with text */
.chat-messages img.emoji,
.chat-messages .message-text img.emoji,
.chat-messages .message-text img[class*="emoji"],
.chat-messages .message-text img[src*="twemoji"],
.chat-messages .message-text img[src*="emoji"] {
    width: 1.2em !important;
    height: 1.2em !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 0.1em !important;
}

/* GIF images in chat - balanced size */
.chat-messages .message-text img[src*="tenor"],
.chat-messages .message-text img[src*="giphy"],
.chat-messages .message-text img[src*=".gif"] {
    max-width: 180px !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 2px 0 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

/* Also target any img tags in message-text that are likely emojis (but not GIFs) */
.chat-messages .message-text img:not(.user-avatar):not([src*="tenor"]):not([src*="giphy"]):not([src*=".gif"]) {
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Prevent cutoff on right side */
emoji-picker {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

/* Desktop - slightly wider to prevent 9th emoji cutoff */
@media (min-width: 769px) {
    emoji-picker {
        width: 355px !important;
    }
    #emojiPicker {
        right: -5px !important;
    }
}

/* iPad responsive - same width, align horizontally */
@media (max-width: 768px) {
    emoji-picker {
        width: 340px !important;
        max-height: 350px !important;
        height: 350px !important;
    }
    #emojiPicker {
        right: 0px !important;
    }
}

/* Mobile/iPhone responsive - same width, align horizontally */
@media (max-width: 480px) {
    emoji-picker {
        width: 340px !important;
        max-height: 350px !important;
        height: 350px !important;
    }
    #emojiPicker {
        right: 0px !important;
    }
}

/* GIF Picker Responsive */
@media (min-width: 769px) {
    #gifPicker {
        width: 355px !important;
        right: -5px !important;
    }
}

@media (max-width: 768px) {
    #gifPicker {
        width: 340px !important;
        right: 0px !important;
    }
}

@media (max-width: 480px) {
    #gifPicker {
        width: 340px !important;
        right: 0px !important;
    }
}

.dropdown-list .user-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.dropdown-list .user-item img,
.dropdown-list .user-item video {
    display: inline-block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1a1a2e;
}

/* Video avatars in chat - same style as img avatars */
.chat-messages .message video.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

/* Video avatars continued */
.chat-messages .message video.user-avatar {
    border: 2px solid transparent;
}

.dropdown-list .user-item span {
    color: #000000ff;
    font-size: 10px;

}
.stat-item {
  position : relative;
}

/* Stream Info Bar dropdown styles */
.stream-user-item img,
.stream-user-item video {
    display: inline-block !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
    border: 2px solid #dd163b;
}

.stream-info-stat span {
    color: #666;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.stream-info-stat:hover span {
    color: #dd163b !important;
}

.theme-light .single-tournaments-box{
  height: auto;
}

/* Prevent iOS zoom on input focus - all inputs must be 16px or larger */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-size: 16px !important;
}

/* Mobile/iPad specific - ensure no zoom on focus */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* System message styling - matches website design */
.chat-messages .message.system-message {
  animation: fadeInMessage 0.3s ease-in;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  position: relative !important;
}

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

/* Ensure system messages persist and don't auto-hide */
.chat-messages .system-message {
  transition: opacity 0.3s ease-in !important;
}

div#adOverlay-detail {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 0%) !important;
  z-index: 999;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
}

/* ========== DISCORD-LIKE CHAT FEATURES ========== */

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 8px 12px;
    color: #72767d;
    font-size: 12px;
    font-style: italic;
    align-items: center;
    gap: 8px;
}
.typing-indicator.active {
    display: flex;
}
.typing-dots {
    display: flex;
    gap: 3px;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    background: #72767d;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* Message Hover Actions - Discord style (right side of message) */
.message {
    position: relative;
}
.message:hover {
    background: rgba(79, 84, 92, 0.16);
}
.message .message-actions {
    position: absolute;
    top: -16px;
    right: 16px;
    display: none;
    background: #2f3136;
    border-radius: 4px;
    padding: 0 4px;
    box-shadow: 0 0 0 1px rgba(4,4,5,0.15), 0 4px 8px rgba(0,0,0,0.16);
    z-index: 10;
}
.message:hover .message-actions {
    display: flex;
}
.message-action-btn {
    padding: 6px 8px;
    background: transparent;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
}
.message-action-btn:hover {
    background: rgba(79, 84, 92, 0.4);
    color: #dcddde;
}

/* Message Reactions */
.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.reaction {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.reaction:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.2);
}
.reaction.user-reacted {
    background: rgba(88, 101, 242, 0.3);
    border-color: #5865f2;
}
.reaction-count {
    color: #b9bbbe;
    font-size: 11px;
}
.add-reaction-btn {
    padding: 2px 6px;
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #72767d;
    cursor: pointer;
    font-size: 12px;
}
.add-reaction-btn:hover {
    background: rgba(255,255,255,0.1);
    border-style: solid;
}

/* Reply Quote */
.reply-preview {
    display: none;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid #5865f2;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    align-items: center;
    gap: 8px;
}
.reply-preview.active {
    display: flex;
}
.reply-preview-text {
    flex: 1;
    color: #b9bbbe;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reply-preview-close {
    background: none;
    border: none;
    color: #72767d;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 16px;
}
.reply-preview-close:hover {
    color: #fff;
}
.message-reply-ref {
    font-size: 11px;
    color: #72767d;
    margin-bottom: 4px;
    cursor: pointer;
}
.message-reply-ref:hover {
    color: #b9bbbe;
}
.message-reply-ref i {
    margin-right: 4px;
}

/* @Mentions Autocomplete */
.mentions-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #2f3136;
    border: 1px solid #202225;
    border-radius: 8px;
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
}
.mentions-dropdown.active {
    display: block;
}
.mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.mention-item:hover, .mention-item.selected {
    background: #dc3545;
}
.mention-item img, .mention-item video {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.mention-name {
    color: #fff;
    font-size: 14px;
}
.mention-highlight {
    color: #5865f2;
    background: rgba(88, 101, 242, 0.2);
    padding: 0 2px;
    border-radius: 3px;
}

/* Scroll to Bottom Button */
.scroll-to-bottom {
    display: none;
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 50;
    transition: all 0.2s;
}
.scroll-to-bottom:hover {
    background: #4752c4;
    transform: translateX(-50%) scale(1.05);
}
.scroll-to-bottom.visible {
    display: block;
}
.scroll-to-bottom .new-msg-count {
    background: #ed4245;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-size: 10px;
}

/* Message Grouping */
.message.grouped {
    margin-top: 2px;
    padding-top: 2px;
}
.message.grouped .user-avatar,
.message.grouped .user-info {
    display: none;
}
.message.grouped .message-content {
    margin-left: 44px;
}
.message.grouped:hover .compact-timestamp {
    display: inline;
}
.compact-timestamp {
    display: none;
    font-size: 10px;
    color: #72767d;
    margin-right: 8px;
}

/* Live Timestamp */
.timestamp[data-timestamp] {
    cursor: help;
}

/* Delete Confirmation */
.delete-confirm {
    background: #2f3136;
    border: 1px solid #ed4245;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}
.delete-confirm-text {
    color: #fff;
    margin-bottom: 8px;
    font-size: 13px;
}
.delete-confirm-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.delete-confirm-btns button {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}
.btn-delete-cancel {
    background: #4f545c;
    color: #fff;
}
.btn-delete-confirm {
    background: #ed4245;
    color: #fff;
}

/* Reaction Picker */
.reaction-picker {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: #2f3136; border-radius: 8px; padding: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 100; white-space: nowrap;
}
.reaction-picker.active { display: flex; gap: 4px; }
.reaction-picker button {
    background: transparent;
    border: none;
    font-size: 20px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}
.reaction-picker button:hover {
    background: #40444b;
    transform: scale(1.2);
}

/* Sound notification indicator */
.mention-notification {
    animation: mentionPulse 0.5s ease-in-out;
}
@keyframes mentionPulse {
    0%, 100% { background: transparent; }
    50% { background: rgba(88, 101, 242, 0.3); }
}

