/* ==========================================================================
   Nati Sports LiveChat — Mobile-First Dark Theme
   Premium sports-chat experience with animations and flair
   ========================================================================== */

/* ------------------------------------------------------------------ */
/*  CSS Custom Properties                                             */
/* ------------------------------------------------------------------ */
:root {
    --rlc-bg:           #0a0a0d;
    --rlc-surface:      #131318;
    --rlc-surface-2:    #1a1a22;
    --rlc-surface-3:    #22222d;
    --rlc-border:       #2a2a35;
    --rlc-text:         #efeff1;
    --rlc-text-muted:   #8e8ea0;
    --rlc-accent:       #c6011f;
    --rlc-accent-hover: #e0022a;
    --rlc-accent-glow:  rgba(198, 1, 31, 0.4);
    --rlc-accent-gold:  #ffd700;
    --rlc-accent-blue:  #1da1f2;
    --rlc-accent-purple:#8b5cf6;
    --rlc-superchat-1:  #2563eb;
    --rlc-superchat-2:  #7c3aed;
    --rlc-superchat-3:  #fbbf24;
    --rlc-buy:          #16a34a;
    --rlc-buy-hover:    #15803d;
    --rlc-buy-glow:     rgba(22, 163, 74, 0.35);
    --rlc-gradient:     linear-gradient(135deg, #c6011f 0%, #ff2d4a 50%, #c6011f 100%);
    --rlc-gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ffd700 100%);
    --rlc-gradient-buy:  linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #16a34a 100%);
    --rlc-radius:       10px;
    --rlc-radius-lg:    14px;
    --rlc-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------ */
/*  Light Theme Overrides                                              */
/* ------------------------------------------------------------------ */
.rlc-chat-app.rlc-theme-light {
    --rlc-bg:           #f5f5f7;
    --rlc-surface:      #ffffff;
    --rlc-surface-2:    #f0f0f2;
    --rlc-surface-3:    #e8e8ec;
    --rlc-border:       #d4d4dc;
    --rlc-text:         #1a1a2e;
    --rlc-text-muted:   #666680;
    --rlc-accent-glow:  rgba(198, 1, 31, 0.2);
}

.rlc-chat-app.rlc-theme-light .rlc-msg:hover {
    background: var(--rlc-surface-2);
}

.rlc-chat-app.rlc-theme-light .rlc-msg-input {
    background: var(--rlc-surface-2);
    color: var(--rlc-text);
}

.rlc-chat-app.rlc-theme-light .rlc-msg-input::placeholder {
    color: var(--rlc-text-muted);
}

/* Theme toggle icon visibility */
.rlc-theme-toggle-chat .rlc-theme-icon-light { display: none; }
.rlc-theme-toggle-chat .rlc-theme-icon-dark  { display: block; }

.rlc-theme-light .rlc-theme-toggle-chat .rlc-theme-icon-light { display: block; }
.rlc-theme-light .rlc-theme-toggle-chat .rlc-theme-icon-dark  { display: none; }

/* ------------------------------------------------------------------ */
/*  Container                                                         */
/* ------------------------------------------------------------------ */
.rlc-chat-app {
    position: sticky;
    top: 20px;
    font-family: var(--rlc-font);
    font-size: 14px;
    line-height: 1.45;
    color: var(--rlc-text);
    background: var(--rlc-bg);
    border: 1px solid var(--rlc-border);
    border-radius: var(--rlc-radius-lg);
    overflow: hidden;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(198,1,31,0.08);
    z-index: 50;
}

/* Inside schedule embed, the panel itself is sticky — reset the chat app. */
.rlc-sched-chat-embed .rlc-chat-app {
    position: relative;
    top: auto;
    z-index: auto;
}

/* Prevent WP theme global img rules from breaking our layout */
.rlc-chat-app img {
    max-width: none;
    height: auto;
}

.rlc-chat-app .rlc-brand-logo {
    height: 26px !important;
    max-height: 26px !important;
    width: auto !important;
}

/* ------------------------------------------------------------------ */
/*  Header                                                            */
/* ------------------------------------------------------------------ */
.rlc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--rlc-surface);
    border-bottom: 1px solid var(--rlc-border);
    min-height: 48px;
    flex-shrink: 0;
    position: relative;
}

/* Accent line under header */
.rlc-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rlc-gradient);
    opacity: 0.7;
}

/* ------------------------------------------------------------------ */
/*  Live Scoreboard Bar                                                */
/* ------------------------------------------------------------------ */
.rlc-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 14px;
    background: var(--rlc-surface-2);
    border-bottom: 1px solid var(--rlc-border);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    min-height: 32px;
    letter-spacing: -0.2px;
}

.rlc-scoreboard-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ef4444;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rlc-scoreboard-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: rlc-pulse-dot 1.5s ease-in-out infinite;
}

@keyframes rlc-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.rlc-scoreboard-teams {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--rlc-text);
}

.rlc-scoreboard-team {
    white-space: nowrap;
}

.rlc-scoreboard-score {
    font-weight: 800;
    font-size: 15px;
    min-width: 14px;
    text-align: center;
}

.rlc-scoreboard-sep {
    color: var(--rlc-text-muted);
    font-weight: 400;
    margin: 0 2px;
}

.rlc-scoreboard-inning {
    color: var(--rlc-text-muted);
    font-size: 11px;
    font-weight: 600;
}

.rlc-scoreboard-final {
    color: var(--rlc-text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rlc-scoreboard-preview {
    color: var(--rlc-text-muted);
    font-size: 12px;
}

.rlc-scoreboard-preview .rlc-scoreboard-time {
    color: var(--rlc-accent);
    font-weight: 700;
}

.rlc-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rlc-brand-logo {
    height: 26px !important;
    max-height: 26px !important;
    width: auto !important;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(198,1,31,0.3));
}

.rlc-brand-name {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
    color: var(--rlc-accent);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .rlc-brand-name {
        background: var(--rlc-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}


/* Legacy dot fallback */
.rlc-live-dot {
    display: none;
}

.rlc-room-title {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--rlc-text-muted);
}

.rlc-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rlc-viewer-count {
    font-size: 12px;
    color: var(--rlc-text-muted);
    padding: 2px 6px;
    background: var(--rlc-surface-2);
    border-radius: 6px;
    font-weight: 600;
}

.rlc-balance {
    font-weight: 700;
    color: var(--rlc-accent-gold);
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255,215,0,0.3);
}

/* ------------------------------------------------------------------ */
/*  Messages                                                          */
/* ------------------------------------------------------------------ */
.rlc-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: var(--rlc-bg);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.rlc-messages-inner {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

/* Message entrance animation */
.rlc-msg {
    padding: 5px 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: background 0.15s;
    animation: rlc-msg-enter 0.25s ease-out;
    border-left: 2px solid transparent;
}

@keyframes rlc-msg-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rlc-msg:hover {
    background: var(--rlc-surface);
    border-left-color: var(--rlc-accent);
}

.rlc-msg-badges {
    display: inline;
    margin-right: 3px;
}

.rlc-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    color: #fff;
    vertical-align: middle;
    margin-right: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    line-height: 1.4;
}

.rlc-msg-username {
    font-weight: 700;
    cursor: pointer;
    margin-right: 4px;
    transition: text-shadow 0.2s;
    color: var(--rlc-text);
}

.rlc-msg-username:hover {
    text-shadow: 0 0 8px currentColor;
}

.rlc-msg-username::after {
    content: ':';
    opacity: 0.5;
}

/* Twitter / X link next to username */
.rlc-twitter-link {
    color: var(--rlc-text-muted);
    margin-right: 4px;
    vertical-align: middle;
    text-decoration: none;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
}

.rlc-twitter-link:hover {
    color: var(--rlc-text);
}

.rlc-twitter-icon {
    vertical-align: middle;
}

.rlc-msg-text {
    word-break: break-word;
}

/* Reactions */
.rlc-reactions {
    display: inline-flex;
    gap: 2px;
    margin-left: 6px;
    vertical-align: middle;
}
.rlc-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--rlc-surface-2);
    border: 1px solid var(--rlc-border);
    border-radius: 10px;
    padding: 0 5px;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
    color: var(--rlc-text-muted);
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
/* Hide empty reaction buttons — only show on message hover. */
.rlc-reaction-btn.rlc-reaction-empty {
    opacity: 0;
    pointer-events: none;
}
.rlc-msg:hover .rlc-reaction-btn.rlc-reaction-empty {
    opacity: 1;
    pointer-events: auto;
}
.rlc-reaction-btn:hover {
    background: var(--rlc-surface-3);
    border-color: var(--rlc-text-muted);
}
.rlc-reaction-btn.rlc-reaction-mine {
    background: rgba(198, 1, 31, 0.15);
    border-color: var(--rlc-accent);
}
.rlc-reaction-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--rlc-text);
}

.rlc-msg-time {
    font-size: 10px;
    color: var(--rlc-text-muted);
    margin-left: 6px;
    float: right;
    opacity: 0;
    transition: opacity 0.2s;
}

.rlc-msg:hover .rlc-msg-time {
    opacity: 1;
}

/* Always show timestamps + reactions on touch devices */
@media (hover: none), (max-width: 480px) {
    .rlc-msg-time {
        opacity: 0.6;
    }
    .rlc-msg-mod-actions {
        display: inline;
    }
    /* On touch devices, show empty reactions on tap (via :active parent) */
    .rlc-msg:active .rlc-reaction-btn.rlc-reaction-empty {
        opacity: 1;
        pointer-events: auto;
    }
    .rlc-reaction-btn {
        min-height: 32px;
        min-width: 32px;
        padding: 4px 8px;
        font-size: 14px;
    }
    .rlc-reaction-count {
        font-size: 11px;
    }
}

.rlc-msg-mod-actions {
    display: none;
    float: right;
    margin-left: 6px;
}

.rlc-msg:hover .rlc-msg-mod-actions {
    display: inline;
}

.rlc-msg-delete {
    background: none;
    border: none;
    color: var(--rlc-accent);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    transition: transform 0.15s;
}

.rlc-msg-delete:hover {
    transform: scale(1.3);
}

/* ------------------------------------------------------------------ */
/*  Superchat styles — with shimmer & glow                            */
/* ------------------------------------------------------------------ */
.rlc-msg-superchat {
    border-radius: 8px;
    margin: 6px 10px;
    padding: 10px 14px;
    border-left: 3px solid;
    position: relative;
    overflow: hidden;
    animation: rlc-msg-enter 0.3s ease-out, rlc-sc-flash 0.6s ease-out;
}

/* Bigger text for superchats — scales with tier */
.rlc-msg-superchat.rlc-sc-tier-1 .rlc-msg-text {
    font-size: 16px;
    font-weight: 600;
}

.rlc-msg-superchat.rlc-sc-tier-2 .rlc-msg-text {
    font-size: 18px;
    font-weight: 700;
}

.rlc-msg-superchat.rlc-sc-tier-3 .rlc-msg-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

@keyframes rlc-sc-flash {
    0% { filter: brightness(1.8); }
    100% { filter: brightness(1); }
}

/* Shimmer overlay for superchats */
.rlc-msg-superchat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    animation: rlc-shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes rlc-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.rlc-msg-superchat.rlc-sc-tier-1 {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%);
    border-color: var(--rlc-superchat-1);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.15), inset 0 0 20px rgba(37, 99, 235, 0.05);
}

.rlc-msg-superchat.rlc-sc-tier-2 {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.06) 100%);
    border-color: var(--rlc-superchat-2);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.2), inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.rlc-msg-superchat.rlc-sc-tier-3 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(251, 191, 36, 0.06) 100%);
    border-color: var(--rlc-superchat-3);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25), inset 0 0 24px rgba(251, 191, 36, 0.06);
}

.rlc-msg-superchat.rlc-sc-tier-3 .rlc-msg-username {
    color: var(--rlc-superchat-3);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.rlc-sc-label-inline {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-right: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    color: #fff;
}

.rlc-sc-tier-1 .rlc-sc-label-inline { background: var(--rlc-superchat-1); box-shadow: 0 0 8px rgba(37, 99, 235, 0.3); }
.rlc-sc-tier-2 .rlc-sc-label-inline { background: var(--rlc-superchat-2); box-shadow: 0 0 8px rgba(124, 58, 237, 0.3); }
.rlc-sc-tier-3 .rlc-sc-label-inline { background: var(--rlc-superchat-3); color: #000; box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }

/* ------------------------------------------------------------------ */
/*  GIF messages                                                      */
/* ------------------------------------------------------------------ */
.rlc-msg-gif img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    display: block;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ------------------------------------------------------------------ */
/*  System messages                                                   */
/* ------------------------------------------------------------------ */
.rlc-msg-system {
    color: var(--rlc-text-muted);
    font-style: italic;
    text-align: center;
    font-size: 12px;
    padding: 8px 14px;
    border-left-color: transparent !important;
}

/* Live score update system messages (from Nati Sports Game Updates) */
.rlc-msg-score-update {
    background: linear-gradient(135deg, rgba(198, 1, 31, 0.08) 0%, rgba(255, 215, 0, 0.06) 100%);
    border: 1px solid rgba(198, 1, 31, 0.2);
    border-radius: 8px;
    margin: 6px 12px;
    padding: 10px 14px;
    font-style: normal;
    text-align: left;
    font-size: 13px;
    color: var(--rlc-text);
    border-left: 3px solid var(--rlc-accent) !important;
}

.rlc-score-update-source {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--rlc-accent);
    margin-bottom: 4px;
    display: block;
}

.rlc-msg-score-update.rlc-score-final {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(198, 1, 31, 0.06) 100%);
    border-left-color: var(--rlc-accent-gold) !important;
}

.rlc-msg-score-update.rlc-score-final .rlc-score-update-source {
    color: var(--rlc-accent-gold);
}

.rlc-msg-score-update.rlc-score-reds-win {
    border-color: var(--rlc-accent-gold);
    background: linear-gradient(135deg, rgba(198, 1, 31, 0.15) 0%, rgba(255, 215, 0, 0.15) 50%, rgba(198, 1, 31, 0.1) 100%);
    border-left: 3px solid var(--rlc-accent-gold) !important;
    animation: rlc-win-glow 2s ease-in-out 3;
}

@keyframes rlc-win-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.5), 0 0 30px rgba(198, 1, 31, 0.3); }
}

.rlc-msg-score-update .rlc-reactions {
    display: flex;
    margin-left: 0;
    margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/*  Welcome banner                                                    */
/* ------------------------------------------------------------------ */
.rlc-welcome-banner {
    margin: 10px 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--rlc-surface-2) 0%, var(--rlc-surface) 100%);
    border: 1px solid var(--rlc-border);
    border-radius: var(--rlc-radius);
    text-align: center;
    animation: rlc-msg-enter 0.4s ease-out;
}

.rlc-welcome-banner .rlc-welcome-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    background: var(--rlc-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rlc-welcome-banner .rlc-welcome-sub {
    font-size: 12px;
    color: var(--rlc-text-muted);
}

/* ------------------------------------------------------------------ */
/*  Input area                                                        */
/* ------------------------------------------------------------------ */
.rlc-input-area {
    background: var(--rlc-surface);
    border-top: 1px solid var(--rlc-border);
    padding: 10px 12px;
    flex-shrink: 0;
}

.rlc-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.rlc-msg-input {
    flex: 1;
    background: var(--rlc-surface-2) !important;
    border: 1px solid var(--rlc-border);
    border-radius: var(--rlc-radius);
    color: var(--rlc-text) !important;
    padding: 10px 14px;
    font-size: 16px;
    font-family: var(--rlc-font);
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rlc-msg-input:focus {
    border-color: var(--rlc-accent);
    box-shadow: 0 0 0 3px var(--rlc-accent-glow);
}

.rlc-msg-input::placeholder {
    color: var(--rlc-text-muted);
}

.rlc-input-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    padding: 0 2px;
}

.rlc-char-count {
    font-size: 11px;
    color: var(--rlc-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/*  Superchat bar                                                     */
/* ------------------------------------------------------------------ */
.rlc-superchat-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--rlc-surface-2);
    border-radius: var(--rlc-radius);
    border: 1px solid var(--rlc-border);
    flex-wrap: wrap;
    animation: rlc-msg-enter 0.2s ease-out;
}

.rlc-sc-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--rlc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ------------------------------------------------------------------ */
/*  Buttons                                                           */
/* ------------------------------------------------------------------ */
.rlc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--rlc-radius);
    cursor: pointer;
    font-family: var(--rlc-font);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s ease;
    color: var(--rlc-text);
    background: var(--rlc-surface-2);
    padding: 6px 12px;
    -webkit-tap-highlight-color: transparent;
}

.rlc-btn:active {
    transform: scale(0.95);
}

.rlc-btn-primary {
    background: var(--rlc-gradient);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--rlc-accent-glow);
}

.rlc-btn-primary:hover {
    box-shadow: 0 4px 16px var(--rlc-accent-glow);
    filter: brightness(1.1);
}

.rlc-btn-icon {
    padding: 6px 8px;
    gap: 4px;
    background: transparent;
    border-radius: 8px;
}

.rlc-btn-icon:hover {
    background: var(--rlc-surface-2);
}

.rlc-btn-send {
    background: var(--rlc-gradient);
    padding: 10px 12px;
    color: #fff;
    border-radius: var(--rlc-radius);
    box-shadow: 0 2px 8px var(--rlc-accent-glow);
    transition: all 0.2s ease;
}

.rlc-btn-send:hover {
    box-shadow: 0 4px 16px var(--rlc-accent-glow);
    transform: scale(1.05);
}

.rlc-btn-gif {
    font-weight: 800;
    font-size: 11px;
    padding: 8px 10px;
    background: var(--rlc-surface-3);
    border: 1px solid var(--rlc-border);
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.rlc-btn-gif:hover {
    background: var(--rlc-surface-2);
    border-color: var(--rlc-accent);
}

.rlc-btn-sm {
    font-size: 12px;
    padding: 5px 12px;
    background: var(--rlc-gradient);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px var(--rlc-accent-glow);
}

.rlc-btn-sm:hover {
    box-shadow: 0 4px 12px var(--rlc-accent-glow);
    filter: brightness(1.1);
}

/* Green "Buy" buttons */
.rlc-btn-buy {
    background: var(--rlc-gradient-buy);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 16px;
    box-shadow: 0 2px 8px var(--rlc-buy-glow);
}

.rlc-btn-buy:hover {
    box-shadow: 0 4px 16px var(--rlc-buy-glow);
    filter: brightness(1.1);
}

.rlc-btn-tiny {
    font-size: 11px;
    padding: 3px 10px;
    border: 1px solid var(--rlc-border);
    background: var(--rlc-surface-2);
}

.rlc-btn-tiny:hover {
    border-color: var(--rlc-accent);
    color: var(--rlc-accent);
}

.rlc-sc-tier {
    font-size: 12px;
    padding: 5px 12px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s;
}

.rlc-sc-tier[data-tier="1"] { background: var(--rlc-superchat-1); color: #fff; }
.rlc-sc-tier[data-tier="2"] { background: var(--rlc-superchat-2); color: #fff; }
.rlc-sc-tier[data-tier="3"] { background: var(--rlc-superchat-3); color: #000; }

.rlc-sc-tier:not(.rlc-sc-tier-active) { opacity: 0.45; }
.rlc-sc-tier.rlc-sc-tier-active {
    opacity: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 12px currentColor;
    transform: scale(1.05);
}

.rlc-sc-cancel {
    font-size: 11px;
    color: var(--rlc-text-muted);
    background: transparent;
}

/* ------------------------------------------------------------------ */
/*  Login prompt                                                      */
/* ------------------------------------------------------------------ */
.rlc-login-prompt {
    text-align: center;
    padding: 16px;
    background: var(--rlc-surface);
    border-top: 1px solid var(--rlc-border);
}

.rlc-login-prompt .rlc-btn-primary {
    padding: 10px 24px;
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/*  Archive banner                                                     */
/* ------------------------------------------------------------------ */
.rlc-archive-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--rlc-surface-2);
    border-top: 1px solid var(--rlc-border);
    color: var(--rlc-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.rlc-archive-banner svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Grayed-out input area for archived chats */
.rlc-input-archived {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.rlc-input-archived .rlc-msg-input {
    cursor: not-allowed;
    background: var(--rlc-surface-3) !important;
    color: var(--rlc-text-muted) !important;
}

.rlc-input-archived .rlc-btn-send {
    cursor: not-allowed;
    opacity: 0.5;
}

.rlc-chat-app.rlc-archived .rlc-viewer-count {
    display: none;
}

/* ------------------------------------------------------------------ */
/*  Panels (shop, profile, GIF picker)                                */
/* ------------------------------------------------------------------ */
.rlc-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 340px;
    background: var(--rlc-surface);
    border-left: 1px solid var(--rlc-border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rlc-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -4px 0 16px rgba(0,0,0,0.4);
}

@keyframes rlc-slide-in {
    from { transform: translateX(100%); opacity: 0.8; }
    to   { transform: translateX(0); opacity: 1; }
}

.rlc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rlc-border);
    background: var(--rlc-surface-2);
}

.rlc-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--rlc-text);
}

.rlc-panel-close {
    font-size: 22px;
    line-height: 1;
    color: var(--rlc-text-muted);
    transition: color 0.15s;
}

.rlc-panel-close:hover {
    color: var(--rlc-accent);
}

.rlc-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
    color: var(--rlc-text);
}

/* Force all panel body text to use theme text color (overrides WP theme) */
.rlc-panel-body h4 {
    color: var(--rlc-text);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 18px 0 10px;
}

.rlc-panel-body h4:first-child {
    margin-top: 0;
}

.rlc-panel-body p,
.rlc-panel-body span,
.rlc-panel-body strong,
.rlc-panel-body label,
.rlc-panel-body small,
.rlc-panel-body div {
    color: var(--rlc-text);
}

.rlc-panel-body .rlc-balance {
    color: var(--rlc-accent-gold);
}

/* Shop items */
.rlc-shop-balance {
    font-size: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--rlc-surface-2);
    border-radius: var(--rlc-radius);
    border: 1px solid var(--rlc-border);
    color: var(--rlc-text);
}

.rlc-credit-packs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.rlc-credit-pack {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--rlc-surface-2);
    border-radius: var(--rlc-radius);
    border: 1px solid var(--rlc-border);
    transition: border-color 0.2s;
}

.rlc-credit-pack:hover {
    border-color: var(--rlc-accent);
}

.rlc-credit-pack-info {
    font-size: 14px;
    font-weight: 700;
    color: var(--rlc-text);
}

.rlc-credit-pack-price {
    font-size: 12px;
    color: var(--rlc-accent-gold);
    font-weight: 600;
}

.rlc-shop-item span {
    color: var(--rlc-text);
}

.rlc-shop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rlc-shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--rlc-surface-2);
    border-radius: var(--rlc-radius);
    font-size: 13px;
    border: 1px solid var(--rlc-border);
}

.rlc-shop-item-action {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Custom badge shop item — mobile-friendly layout */
.rlc-shop-item-custom-badge {
    flex-wrap: wrap;
    gap: 8px;
}

.rlc-shop-item-custom-badge > span {
    width: 100%;
    flex-shrink: 0;
}

.rlc-shop-item-custom-badge .rlc-shop-item-action {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
}

.rlc-shop-item-custom-badge #rlc-custom-badge-text {
    flex: 1;
    min-width: 60px;
    padding: 6px 8px;
    font-size: 12px;
    background: var(--rlc-surface-3);
    border: 1px solid var(--rlc-border);
    border-radius: 6px;
    color: var(--rlc-text);
}

.rlc-shop-item-custom-badge #rlc-custom-badge-color {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

#rlc-color-picker {
    width: 32px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

/* ------------------------------------------------------------------ */
/*  Profile panel — styled fields                                      */
/* ------------------------------------------------------------------ */
.rlc-profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--rlc-border);
}

.rlc-profile-field:last-child {
    border-bottom: none;
}

.rlc-profile-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rlc-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rlc-profile-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--rlc-text) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rlc-profile-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--rlc-border);
    flex-shrink: 0;
}

.rlc-profile-color-picker {
    width: 28px;
    height: 28px;
    border: 2px solid var(--rlc-border);
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
    vertical-align: middle;
}

.rlc-profile-color-hex {
    font-size: 12px;
    color: var(--rlc-text-muted);
    font-family: monospace;
    margin: 0 4px;
}

.rlc-profile-color-note {
    font-size: 10px;
    color: var(--rlc-accent-gold);
    margin-left: 4px;
}

.rlc-color-need-credits {
    display: block;
    color: #ff6b6b;
    margin-left: 0;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
}

.rlc-profile-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.rlc-profile-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.rlc-profile-badge-expires {
    font-size: 11px;
    color: var(--rlc-text-muted) !important;
    flex: 1;
}

/* Badge hidden state — dimmed with strikethrough look */
.rlc-badge.rlc-badge-hidden {
    opacity: 0.35;
}

/* Badge visibility toggle switch */
.rlc-badge-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    margin-left: auto;
    flex-shrink: 0;
    cursor: pointer;
}

.rlc-badge-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.rlc-badge-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--rlc-surface-3);
    border-radius: 9px;
    transition: background 0.2s ease;
}

.rlc-badge-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--rlc-text-muted);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rlc-badge-toggle input:checked + .rlc-badge-toggle-slider {
    background: var(--rlc-accent);
}

.rlc-badge-toggle input:checked + .rlc-badge-toggle-slider::before {
    transform: translateX(14px);
    background: #fff;
}

/* Twitter / X handle field in profile */
.rlc-profile-twitter .rlc-profile-value {
    gap: 2px;
}

.rlc-twitter-at {
    font-size: 13px;
    color: var(--rlc-text-muted) !important;
    font-weight: 600;
    flex-shrink: 0;
}

.rlc-twitter-input {
    width: 100px;
    padding: 4px 8px;
    font-size: 13px;
    font-family: var(--rlc-font);
    background: var(--rlc-surface-2);
    border: 1px solid var(--rlc-border);
    border-radius: 6px;
    color: var(--rlc-text);
    outline: none;
}

.rlc-twitter-input:focus {
    border-color: var(--rlc-accent);
}

/* GIF picker */
.rlc-gif-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.rlc-gif-results img {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.rlc-gif-results img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(198,1,31,0.3);
}

.rlc-gif-results img:active {
    transform: scale(0.95);
}

.rlc-gif-note {
    font-size: 11px;
    color: var(--rlc-text-muted);
    margin-top: 8px;
}

/* Emote picker */
.rlc-emote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
}

.rlc-emote-grid img {
    width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 4px;
    padding: 4px;
    transition: background 0.15s, transform 0.15s;
}

.rlc-emote-grid img:hover {
    background: var(--rlc-surface-3);
    transform: scale(1.15);
}

.rlc-emote-grid img:active {
    transform: scale(0.9);
}

.rlc-emote-note {
    font-size: 11px;
    color: var(--rlc-text-muted);
    margin-top: 8px;
}

/* ------------------------------------------------------------------ */
/*  Toast notifications                                               */
/* ------------------------------------------------------------------ */
.rlc-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rlc-surface-2);
    color: var(--rlc-text);
    padding: 12px 24px;
    border-radius: var(--rlc-radius);
    font-size: 13px;
    font-weight: 600;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    border: 1px solid var(--rlc-border);
    max-width: 90vw;
    text-align: center;
    font-family: var(--rlc-font);
    animation: rlc-toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rlc-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Upgrade toast (VIP upsell) */
.rlc-toast-upgrade {
    background: linear-gradient(135deg, var(--rlc-surface-2) 0%, var(--rlc-surface-3) 100%);
    border: 1px solid var(--rlc-accent);
    padding: 14px 20px;
    max-width: 360px;
}

.rlc-toast-msg {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.rlc-toast-upgrade-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.rlc-toast-upgrade-text {
    font-size: 12px;
    color: var(--rlc-accent);
    font-weight: 700;
    flex: 1;
}

.rlc-toast-upgrade-btn {
    background: var(--rlc-gradient-buy);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--rlc-font);
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.15s, transform 0.15s;
}

.rlc-toast-upgrade-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

/* VIP banner in shop panel */
.rlc-vip-banner {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 50%, #ffd700 100%);
    border-radius: var(--rlc-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.rlc-vip-banner-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.rlc-vip-banner-perks {
    font-size: 11px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.rlc-vip-banner .rlc-btn-buy {
    font-size: 13px;
    padding: 8px 24px;
}

.rlc-vip-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.rlc-vip-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 6px;
    padding: 8px 6px;
}

.rlc-vip-option-season {
    border: 2px solid #1a1a2e;
}

.rlc-vip-option-label {
    font-size: 11px;
    font-weight: 800;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rlc-vip-option-price {
    font-size: 12px;
    font-weight: 700;
    color: #333;
}

.rlc-vip-option .rlc-btn-buy {
    font-size: 11px;
    padding: 5px 12px;
}

.rlc-vip-badge-active {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,179,0,0.1) 100%);
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: var(--rlc-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
}

/* In-chat upsell system message */
.rlc-msg-upsell {
    background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(198,1,31,0.06) 100%);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: var(--rlc-radius);
    margin: 8px 12px;
    padding: 10px 14px;
    text-align: center;
    font-size: 12px;
    color: var(--rlc-text-muted);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.rlc-msg-upsell:hover {
    border-color: rgba(255,215,0,0.5);
    background: linear-gradient(135deg, rgba(255,215,0,0.12) 0%, rgba(198,1,31,0.08) 100%);
}

.rlc-msg-upsell strong {
    color: #ffd700;
    font-weight: 700;
}

.rlc-msg-upsell .rlc-upsell-link {
    color: var(--rlc-accent);
    font-weight: 700;
    text-decoration: underline;
    margin-left: 4px;
}

/* ------------------------------------------------------------------ */
/*  Offline / Error states                                            */
/* ------------------------------------------------------------------ */
.rlc-offline,
.rlc-error {
    padding: 32px 24px;
    text-align: center;
    background: var(--rlc-surface);
    border: 1px solid var(--rlc-border);
    border-radius: var(--rlc-radius-lg);
    color: var(--rlc-text-muted);
    font-family: var(--rlc-font);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ------------------------------------------------------------------ */
/*  Scrollbar                                                         */
/* ------------------------------------------------------------------ */
.rlc-messages::-webkit-scrollbar {
    width: 6px;
}

.rlc-messages::-webkit-scrollbar-track {
    background: transparent;
}

.rlc-messages::-webkit-scrollbar-thumb {
    background: var(--rlc-border);
    border-radius: 3px;
}

.rlc-messages::-webkit-scrollbar-thumb:hover {
    background: var(--rlc-text-muted);
}

/* ------------------------------------------------------------------ */
/*  New message indicator                                             */
/* ------------------------------------------------------------------ */
.rlc-new-msgs-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rlc-accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--rlc-font);
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 16px var(--rlc-accent-glow);
    animation: rlc-bounce-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
}

@keyframes rlc-bounce-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.9); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.rlc-new-msgs-btn:hover {
    filter: brightness(1.15);
}

/* ------------------------------------------------------------------ */
/*  Responsive — small phones                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 479px) {
    .rlc-panel {
        max-width: 100%;
        border-left: none;
    }

    .rlc-vip-options {
        flex-direction: column;
    }

    .rlc-msg-gif img {
        max-width: 160px;
        max-height: 120px;
    }
}

/* ------------------------------------------------------------------ */
/*  Responsive — tablets + desktop                                    */
/* ------------------------------------------------------------------ */
@media (min-width: 480px) {
    .rlc-chat-app {
        max-width: 560px;
        margin: 0 auto;
    }

    .rlc-panel {
        max-width: 340px;
    }
}

@media (min-width: 768px) {
    .rlc-chat-app {
        max-width: 640px;
        border-radius: 16px;
    }

    .rlc-msg {
        padding: 5px 16px;
    }

    .rlc-msg-gif img {
        max-width: 250px;
    }

    .rlc-brand-logo {
        height: 30px;
    }

    .rlc-badge {
        font-size: 9px;
        padding: 2px 5px;
    }
}

@media (min-width: 1024px) {
    .rlc-chat-app {
        max-width: 720px;
    }
}

/* ------------------------------------------------------------------ */
/*  Safe-area insets for notched phones                               */
/* ------------------------------------------------------------------ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .rlc-input-area {
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
}

/* ------------------------------------------------------------------ */
/*  Full-height mode (for dedicated chat pages)                       */
/* ------------------------------------------------------------------ */
.rlc-chat-app.rlc-fullheight {
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    border-radius: 0;
    border: none;
}

.rlc-chat-app.rlc-fullheight .rlc-messages {
    height: auto !important;
    flex: 1;
}

/* ------------------------------------------------------------------ */
/*  Tier 3 confetti canvas (positioned inside chat app)               */
/* ------------------------------------------------------------------ */
.rlc-confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

/* ------------------------------------------------------------------ */
/*  Online Users Panel (admin only)                                    */
/* ------------------------------------------------------------------ */
.rlc-online-panel {
    border-bottom: 1px solid var(--rlc-border);
    background: var(--rlc-surface-2);
    max-height: 220px;
    overflow-y: auto;
}

.rlc-online-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--rlc-border);
    position: sticky;
    top: 0;
    background: var(--rlc-surface-2);
    z-index: 1;
}

.rlc-online-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rlc-text-muted);
}

.rlc-online-count {
    font-size: 10px;
    font-weight: 700;
    background: var(--rlc-accent);
    color: #fff;
    border-radius: 8px;
    padding: 1px 6px;
    min-width: 16px;
    text-align: center;
}

.rlc-online-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.rlc-online-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    font-size: 13px;
    color: var(--rlc-text);
}

.rlc-online-item.rlc-online-empty {
    color: var(--rlc-text-muted);
    font-style: italic;
}

.rlc-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rlc-online-dot-user {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.rlc-online-dot-guest {
    background: var(--rlc-text-muted);
}

/* ------------------------------------------------------------------ */
/*  Sound Toggle                                                       */
/* ------------------------------------------------------------------ */
.rlc-sound-icon-off { display: none; }
.rlc-sound-icon-on  { display: block; }

.rlc-sound-toggle.rlc-sound-muted .rlc-sound-icon-on  { display: none; }
.rlc-sound-toggle.rlc-sound-muted .rlc-sound-icon-off { display: block; }
.rlc-sound-toggle.rlc-sound-muted {
    opacity: 0.5;
}

.rlc-online-toggle.rlc-btn-icon {
    position: relative;
}

/* ------------------------------------------------------------------ */
/*  Auth Modal — Login & Registration                                  */
/* ------------------------------------------------------------------ */
.rlc-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rlc-auth-modal {
    position: relative;
    width: 92%;
    max-width: 380px;
    background: var(--rlc-surface, #131318);
    border: 1px solid var(--rlc-border, #2a2a35);
    border-radius: 16px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    animation: rlc-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--rlc-font, -apple-system, BlinkMacSystemFont, 'Inter', sans-serif);
}

@keyframes rlc-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rlc-auth-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: var(--rlc-text-muted, #8e8ea0);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.rlc-auth-close:hover {
    color: var(--rlc-accent, #c6011f);
}

.rlc-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--rlc-border, #2a2a35);
}

.rlc-auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--rlc-text-muted, #8e8ea0);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.rlc-auth-tab:hover {
    color: var(--rlc-text, #efeff1);
}

.rlc-auth-tab-active {
    color: var(--rlc-accent, #c6011f);
    border-bottom-color: var(--rlc-accent, #c6011f);
}

.rlc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rlc-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--rlc-text-muted, #8e8ea0);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rlc-auth-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--rlc-surface-2, #1a1a22);
    border: 1px solid var(--rlc-border, #2a2a35);
    border-radius: 8px;
    color: var(--rlc-text, #efeff1);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rlc-auth-field input:focus {
    border-color: var(--rlc-accent, #c6011f);
    box-shadow: 0 0 0 3px var(--rlc-accent-glow, rgba(198, 1, 31, 0.4));
}

.rlc-auth-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 16px;
    line-height: 1.4;
}

.rlc-auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--rlc-gradient, linear-gradient(135deg, #c6011f 0%, #ff2d4a 50%, #c6011f 100%));
    background-size: 200% auto;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s, background-position 0.4s;
}

.rlc-auth-submit:hover {
    filter: brightness(1.1);
    background-position: right center;
    transform: translateY(-1px);
}

.rlc-auth-submit:active {
    transform: translateY(0);
}

.rlc-auth-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}
