@font-face {
    font-family: 'Vazir';
    src: url('../assets/fonts/Vazir.woff2') format('woff2'),
         url('../assets/fonts/Vazir.woff') format('woff'),
         url('../assets/fonts/Vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #0c0b0b;
    --bg-secondary: #0B0B0C;
    --card-bg: rgba(25, 25, 25, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #4ab38c;
    --primary-hover: #e0e0e0;
    --primary-dim: rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-secondary: #adadad;
    --text-muted: #666;
    --danger: #ff4040;
    --font-main: 'Vazir', sans-serif;
    --radius: 12px;
    --header-height: 85px;
    --chat-width-desktop: 340px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
}

body.stream-page {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.main-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    position: relative;
}

.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0;
    gap: 0;
    order: 2;
    background-color: var(--bg-color);
    min-width: 0;
}

.video-wrapper {
    width: 100%;
    flex: 1;
    min-height: 0;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.controls-bar {
    background: rgba(11, 11, 11, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.streamer-info-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
}

.stream-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.4;
}

.streamer-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streamer-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.streamer-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.streamer-followers {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.followers-count {
    color: var(--primary);
    font-weight: bold;
}

.actions-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.viewers-stats-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.meta-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.stat-icon { font-size: 15px; opacity: 0.9; }

.stat-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

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

.btn-donate {
    background-color: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.btn-donate:hover {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.btn-follow {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-follow:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-dim);
}

.btn-follow.following {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.btn-settings {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.btn-settings:hover {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.more-options-wrapper {
    position: relative;
}

.more-options-menu {
    position: absolute;
    top: -80px;
    left: 0;
    margin-top: 8px;
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    width: 180px;
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.more-options-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

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

.more-options-menu .btn {
    width: 100%;
    justify-content: flex-start;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 10px 12px;
    gap: 10px;
}

.more-options-menu .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.more-options-menu .btn span {
    font-size: 13px;
}

@media (max-width: 768px) {
    .controls-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px;
        background: rgba(11, 11, 11, 0.98);
        border-bottom: 1px solid var(--card-border);
    }

    .streamer-info-block {
        width: 100%;
        text-align: right;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 8px;
        margin-bottom: 4px;
    }

    .stream-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .streamer-meta-row {
        justify-content: flex-start;
    }

    .actions-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .viewers-stats-bar {
        width: 100%;
        justify-content: center;
        order: -1;
    }

    .meta-stats {
        width: 100%;
        justify-content: space-between;
        padding: 6px 12px;
        font-size: 11px;
    }

    .action-buttons {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .btn-donate, .btn-settings, .btn-follow, .btn-admin-panel {
        flex: 1;
        padding: 10px;
        font-size: 13px;
        justify-content: center;
    }

    .more-options-wrapper {
        flex: 0 0 auto;
    }

    .btn-more {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--card-border);
    }

    .more-options-menu {
        left: auto;
        right: 0;
        width: 160px;
    }
}

.chat-section {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--card-border);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    position: relative;
    z-index: 5;
}

.chat-header {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    font-weight: bold;
    color: var(--primary);
    font-size: 14px;
    background-color: rgba(0,0,0,0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 14px;
    border-radius: 6px;
    position: relative;
    font-size: 13px;
    line-height: 1.5;
    transition: background 0.1s;
}

.message:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.msg-line {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    width: 100%;
    direction: rtl;
}

.username {
    font-weight: 800;
    cursor: pointer;
    margin-left: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.message-text {
    word-break: break-word;
    white-space: pre-wrap;
    unicode-bidi: plaintext;
    flex-grow: 1;
}

.chat-badge {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 3px;
    object-fit: contain;
}

.reply-indicator {
    display: block;
    background: rgba(255, 255, 255, 0.05);
    color: #adadb8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 4px;
    width: fit-content;
    cursor: pointer;
    border-right: 2px solid var(--primary);
}

.reply-icon-btn {
    position: absolute;
    left: 5px;
    top: 5px;
    background: #2f2f35;
    border: none;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    font-size: 12px;
}

.message:hover .reply-icon-btn { display: block; }

.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--card-border);
    background-color: var(--bg-secondary);
    flex-shrink: 0;
    position: relative;
    backdrop-filter: blur(10px);
}

.input-wrapper {
    display: flex;
    gap: 8px;
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 4px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgba(255,255,255,0.4);
}

.chat-input {
    flex: 1;
    background-color: transparent;
    border: none;
    padding: 8px 10px;
    color: white;
    font-family: var(--font-main);
    font-size: 13px;
    outline: none;
}

.send-btn {
    background-color: var(--primary);
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 5px;
}

.send-btn:hover {
    background-color: var(--primary-hover);
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0 5px;
    z-index: 2;
    transition: color 0.2s;
}

.emoji-btn:hover { color: var(--text-main); }

.reply-user,
.reply-text{
    display:inline;
}
.reply-user{
    font-weight:bold;
    color:#97ddcc;
}

.reply-text{
    color:#aaa;
}


.reply-preview {
    background: rgba(40, 40, 40, 0.6);
    border-right: 3px solid var(--primary);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 4px;   
    font-size: 12px;
    color: #eee;
    border-radius: 4px 4px 0 0;
    margin-bottom: 5px;
}


.cancel-reply-btn {
    position: absolute;
    left: 20px;
    top: 25%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #c90707;
}
.cancel-reply-btn:hover {
    color: #4d3636;
}

.login-prompt-btn {
    width: 100%;
    padding: 12px;
    background: rgba(31, 31, 31, 0.6);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.login-prompt-btn:hover {
    background: var(--primary);
    color: #000;
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px;
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    z-index: 100;
    width: 260px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    direction: ltr;
    backdrop-filter: blur(10px);
}

.emoji-item {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 4px;
    padding: 2px;
}

.emoji-item:hover {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.1);
}

.emoji-search {
    width: 100%;
    grid-column: span 6;
    background: rgba(39, 39, 42, 0.8);
    border: 1px solid var(--card-border);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-family: var(--font-main);
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    direction: rtl;
}

.context-menu {
    display: none;
    position: fixed;
    background: rgba(31, 31, 35, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    min-width: 140px;
    flex-direction: column;
    padding: 5px 0;
    backdrop-filter: blur(10px);
}

.menu-item {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    color: white;
    text-align: right;
    transition: background 0.2s;
}

.menu-item:hover {
    background: var(--primary);
    color: #000;
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-input {
    width: 100%;
    background: rgba(39, 39, 42, 0.8);
    border: 1px solid var(--card-border);
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn-confirm {
    background: var(--primary);
    color: #000;
    flex: 1;
    font-weight: bold;
}

.btn-cancel {
    background: rgba(63, 63, 70, 0.8);
    color: white;
    flex: 1;
}

.platform-info { display: none; }

.video-wrapper.offline-mode {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7.5;
    background-color: #000;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.offline-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.5s ease;
}

.video-wrapper.offline-mode:hover .offline-cover-img {
    transform: scale(1.05);
}

.offline-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.offline-badge {
    background-color: var(--danger);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.offline-chat-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
    gap: 4px;
    margin: 5px;
    backdrop-filter: blur(5px);
}

@media (min-width: 769px) {
    .chat-section {
        flex: 0 0 var(--chat-width-desktop);
        height: 100%;
        position: relative;
        transform: none !important;
        border-radius: 0;
    }

    .chat-toggle-btn {
        display: none !important;
    }

    .chat-section.active {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        z-index: 1000;
        border-radius: 0;
        border: none;
    }

    .chat-section.active .close-chat-modal {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .main-layout {
        display: block;
        height: 100vh;
        overflow: hidden;
        padding-bottom: 0 !important;
    }

    .content-section {
        height: 100%;
        overflow-y: auto;
        padding-bottom: 70px;
        z-index: 10;
        background: var(--bg-color);
    }

    .video-wrapper {
        height: auto;
        aspect-ratio: 16/9;
        flex: none;
        border-radius: 0;
        background: #000;
    }

    .controls-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
        background: rgba(11, 11, 11, 0.95);
        border-radius: 0;
    }

    .streamer-info-block { max-width: 100%; }

    .action-buttons {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .btn {
        flex: 1;
        justify-content: center;
        min-width: 45%;
        padding: 10px;
    }

    .chat-section {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(97dvh - 56.25vw - 60px);
        background-color: var(--bg-secondary);
        border-radius: 18px 18px 0 0;
        border: none;
        border-top: 1px solid var(--card-border);
        transform: translateY(100%);
        box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
        z-index: 2000;
        order: 2;
    }

    .chat-section.active {
        transform: translateY(0);
    }

    .mobile-close-indicator {
        display: block;
        width: 40px;
        height: 4px;
        background-color: rgba(255,255,255,0.2);
        border-radius: 2px;
        margin-bottom: 8px;
    }

    .chat-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #131313;
        color: #fff;
        padding: 12px 18px;
        border-radius: 8px;
        cursor: pointer;
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: 400px;
        z-index: 1900;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        font-family: inherit;
        font-weight: bold;
        font-size: 13px;
        border: 1px solid rgba(255,255,255,0.1);
        transition: transform 0.2s;
    }

    .chat-toggle-btn:active { transform: translateX(-50%) scale(0.98); }

    .chat-section.active ~ .chat-toggle-btn,
    body.chat-open .chat-toggle-btn {
        display: none !important;
    }

    body.chat-open .content-section {
        overflow: hidden;
    }

    .close-chat-modal {
        display: none !important;
    }

    .offline-text { font-size: 1.1rem; }
    .offline-badge { font-size: 1rem; padding: 6px 16px; }
}

.chat-section.full-screen-chat {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100% !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    border: none;
    background-color: #0b0b0b;
    transform: none !important;
}

.chat-section.full-screen-chat .close-chat-modal {
    display: flex !important;
    position: absolute;
    top: 20px; left: 20px;
    background: rgba(255,255,255,0.1);
    width: 40px; height: 40px;
    border-radius: 50%;
    align-items: center; justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
}

.chat-section.full-screen-chat .chat-header { cursor: default; }

#reportModal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#reportModal .modal-content {
    background-color: #1e1e24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    text-align: right;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#reportModal h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 8px;
}

#reportModal .modal-input,
#reportModal select {
    width: 100%;
    background-color: rgba(40, 40, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#reportModal .modal-input:focus,
#reportModal select:focus {
    border-color: var(--danger);
    background-color: rgba(40, 40, 45, 1);
}

#reportModal .modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

#reportModal .modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

#reportModal .modal-buttons button:active {
    transform: scale(0.98);
}

#reportModal .btn-confirm {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

#reportModal .btn-confirm:hover {
    background-color: #ff2e43;
}

#reportModal .btn-cancel {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

#reportModal .btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

#reportModal label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #aaa;
}

.local-warning-message {
    background: #ffdddd;
    color: #a90000;
    padding: 8px 12px;
    border-left: 4px solid #ff3b3b;
    margin: 6px 0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
}

.pinned-message-container {
    display: flex;
    align-items: center;
    background: var(--accent-soft); 
    border-bottom: 1px solid var(--card-border); 
    border-right: 3px solid var(--accent-color); 
    padding: 10px 14px;
    gap: 10px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(8px); 
    transition: all 0.3s ease;
}

.pinned-icon {
    font-size: 1.1rem;
    color: var(--accent-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pinned-text {
    font-size: 0.85rem;
    color: var(--text-main); 
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 65px; 
    overflow-y: auto;
    flex-grow: 1;
}

.pinned-text::-webkit-scrollbar {
    width: 4px;
}

.pinned-text::-webkit-scrollbar-track {
    background: transparent;
}

.pinned-text::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}

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

.pinned-message-container[style*="display: none"] {
    display: none !important;
}

@media (max-width: 480px) {
    #reportModal {
        padding: 15px;
        align-items: flex-end;
    }

    #reportModal .modal-content {
        width: 100%;
        max-width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-height: 85vh;
        padding: 20px;
        animation: slideUpMobile 0.3s ease-out;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    #reportModal h3 { font-size: 20px; }
    #reportModal .modal-input, #reportModal select { padding: 14px; font-size: 16px; }
    #reportModal .modal-buttons { margin-top: 25px; gap: 10px; }
    #reportModal .modal-buttons button { padding: 14px; font-size: 15px; }
}

.soft-deleted .message-text {
    color: #ff6b81 !important;
    font-style: italic;
    opacity: 0.7;
}

.soft-deleted .username,
.soft-deleted .chat-avatar {
    opacity: 0.5;
}

.system-message {
    padding: 8px 12px;
    margin: 4px 0;
    background-color: rgba(60, 60, 70, 0.5); 
    color: #a9a9b1; 
    font-size: 0.9em;
    border-radius: 4px;
    text-align: center;
    border-left: 3px solid #71717a;
}

.bot-badge-icon {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    vertical-align: middle;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bot-name-gradient {
    background: linear-gradient(90deg, #4ab38c, #ffffff14, #4ab38c);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

.game-category-section {
    width: 100%;
    padding: 16px 20px;
    margin-top: 2.5px;
    clear: both;
}


.game-category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    pointer-events: none;
    width: 100%;
}

.game-category-img {
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.game-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.game-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-category-count {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
}

.btn-donate.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-admin-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px; 
    padding: 0 20px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    border-radius: 12px;
    background-color: rgba(32, 191, 107, 0.1);
    color: var(--primary, #20bf6b);
    border: 1px solid rgba(32, 191, 107, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-admin-panel:hover {
    background-color: var(--primary, #20bf6b);
    color: #000; 
}

.admin-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); 
}

.admin-panel-content {
    background-color: #1e1e2d; 
    border-radius: 12px;
    width: 350px;
    max-width: 90%;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    color: #fff;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.admin-panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.close-panel {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-panel:hover {
    color: #ff4757;
}

.admin-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

.admin-panel-body .btn-ban {
    width: 100%;
}

.streamer-username {
    font-weight: 800 !important; 
    font-size: 0.95em;
    vertical-align: middle;
    display: inline;
    
    background: linear-gradient(45deg, #ff4757, #ffaf40, #ff4757, #ff8c00);
    background-size: 300% 300%;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    
    filter: drop-shadow(0 0 5px rgba(255, 71, 87, 0.5));
    
    animation: streamerShine 4s ease-in-out infinite;
}

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

