/* ============================================
   SOHBETROOM - SOHBET ODALARI STİLLERİ v2
   Premium Glassmorphism Design
   ============================================ */

/* ═══════════ ROOMS LIST PAGE ═══════════ */

/* Hero Section */
.rooms-hero-section {
    text-align: center;
    padding: 48px 0 40px;
    position: relative;
}

.rooms-hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(139,92,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.rooms-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: 50px;
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.rooms-hero-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 12px;
}

.rooms-hero-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.rooms-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 14px 32px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

.rhs-item { text-align: center; }
.rhs-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-white);
}
.rhs-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.rhs-divider {
    width: 1px;
    height: 32px;
    background: var(--border-glass);
}

/* Room Cards v3 */
.rooms-grid-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.room-card-v3 {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.room-card-v3:hover {
    transform: translateY(-6px);
    border-color: var(--room-color);
    box-shadow: 0 16px 48px var(--room-glow), 0 0 0 1px var(--room-color);
}

.rc3-gradient-line {
    height: 2px;
    width: 100%;
    opacity: 0.6;
}

.rc3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}

.rc3-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 1.2rem;
}

.rc3-emoji {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.rc3-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.2);
    color: #4ADE80;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rc3-content {
    padding: 16px 20px 0;
    flex: 1;
}

.rc3-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.rc3-desc {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc3-stats {
    display: flex;
    gap: 4px;
    padding: 16px 20px 0;
}

.rc3-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}

.rc3-stat-icon { opacity: 0.8; }
.rc3-stat-value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
}
.rc3-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.rc3-rules {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 12px 20px 0;
    background: rgba(139,92,246,0.06);
    border-radius: 10px;
    border: 1px solid rgba(139,92,246,0.1);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.rc3-rules svg { flex-shrink: 0; color: var(--primary-light); opacity: 0.7; }

.rc3-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 20px;
    gap: 12px;
}

.rc3-age-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #F87171;
    font-size: 0.72rem;
    font-weight: 600;
}

.rc3-btn {
    padding: 10px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    color: #fff !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.rc3-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.rc3-btn-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
}

/* ═══════════ ROOM CHAT PAGE v2 ═══════════ */

.room-layout-v2 {
    display: grid;
    grid-template-columns: 1fr 300px;
    height: calc(100vh - var(--navbar-height));
    height: calc(100dvh - var(--navbar-height));
    position: fixed;
    top: var(--navbar-height);
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: var(--bg-dark);
}

.room-main-v2 {
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

/* Room Header v2 */
.room-header-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(15,5,32,0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
    min-height: 62px;
    z-index: 10;
}

.room-back-btn {
    color: var(--text-white);
    text-decoration: none;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.room-back-btn:hover { background: var(--bg-glass); }

.room-header-icon-v2 {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.rhi-emoji {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.9rem;
}

.room-header-info-v2 { flex: 1; min-width: 0; }
.room-header-info-v2 h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-header-meta-v2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
}

.rhm-online { color: #4ADE80; display: flex; align-items: center; gap: 4px; }
.rhm-divider { color: var(--text-muted); }
.rhm-total { color: var(--text-muted); }

.room-header-actions {
    display: flex;
    gap: 6px;
}

.rha-btn {
    position: relative;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rha-btn:hover {
    background: rgba(139,92,246,0.15);
    color: var(--primary-light);
    border-color: rgba(139,92,246,0.3);
}

.rha-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gradient-main);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Room Info Banner */
.room-info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(139,92,246,0.06);
    animation: slideDown 0.3s ease;
}

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

.rib-content { flex: 1; }
.rib-content p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; margin-bottom: 6px; }
.rib-rules, .rib-welcome {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--text-muted); margin-top: 4px;
}
.rib-rules svg, .rib-welcome svg { flex-shrink: 0; }
.rib-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 4px;
}

/* Room Messages v2 */
.room-messages-v2 {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.room-messages-v2::-webkit-scrollbar { width: 4px; }
.room-messages-v2::-webkit-scrollbar-track { background: transparent; }
.room-messages-v2::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Date Divider */
.room-date-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0 8px;
}

.room-date-divider::before,
.room-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.room-date-divider span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    white-space: nowrap;
}

/* Messages */
.room-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: msgFadeIn 0.25s ease;
    max-width: 75%;
    margin-top: 2px;
}

.room-msg-compact { margin-top: 1px; }

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.room-msg-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.room-msg-avatar {
    flex-shrink: 0;
    position: relative;
}

.room-msg-avatar .rm-online-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 8px; height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.room-msg-avatar-spacer {
    width: 32px;
    flex-shrink: 0;
}

.room-msg-body {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    border-top-left-radius: 4px;
    padding: 8px 14px;
    max-width: 100%;
    position: relative;
}

.room-msg-mine .room-msg-body {
    background: linear-gradient(135deg, rgba(124,58,237,0.85), rgba(139,92,246,0.85));
    border: none;
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.room-msg-compact .room-msg-body {
    border-top-left-radius: 4px;
}

.room-msg-mine.room-msg-compact .room-msg-body {
    border-top-right-radius: 4px;
    border-top-left-radius: 16px;
}

.room-msg-name {
    font-size: 0.74rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.room-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

/* Nickname Bubble - baloncuk lakap */
.room-msg-nickname-bubble {
    position: relative;
    margin-bottom: 4px;
}

.room-msg-nickname-bubble .nickname-text {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px 12px 12px 2px;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(217,70,239,0.15));
    border: 1px solid rgba(139,92,246,0.25);
    color: var(--primary-light);
    white-space: nowrap;
    letter-spacing: 0.3px;
    animation: nickBubbleIn 0.3s ease;
}

@keyframes nickBubbleIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Level Badge */
.chat-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.chat-level-newbie  { background: rgba(139,148,103,0.15); border: 1px solid rgba(139,148,103,0.25); color: #8B9467; }
.chat-level-member  { background: rgba(124,185,232,0.15); border: 1px solid rgba(124,185,232,0.25); color: #7CB9E8; }
.chat-level-bronze  { background: rgba(205,127,50,0.15);  border: 1px solid rgba(205,127,50,0.25);  color: #CD7F32; }
.chat-level-silver  { background: rgba(192,192,192,0.15); border: 1px solid rgba(192,192,192,0.25); color: #C0C0C0; }
.chat-level-gold    { background: rgba(255,215,0,0.15);   border: 1px solid rgba(255,215,0,0.25);   color: #FFD700; }
.chat-level-platinum{ background: rgba(229,228,226,0.15); border: 1px solid rgba(229,228,226,0.25); color: #E5E4E2; }
.chat-level-diamond { background: rgba(185,242,255,0.15); border: 1px solid rgba(185,242,255,0.25); color: #B9F2FF; }
.chat-level-master  { background: rgba(255,107,53,0.15);  border: 1px solid rgba(255,107,53,0.25);  color: #FF6B35; }
.chat-level-legend  { background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.25); color: #A78BFA; }
.chat-level-titan   { background: rgba(255,69,0,0.15);    border: 1px solid rgba(255,69,0,0.25);    color: #FF4500; text-shadow: 0 0 8px rgba(255,69,0,0.3); }

/* Chat Role Badge */
.chat-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.chat-role-admin {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.25);
    color: #F87171;
}

/* User Badge Chips */
.user-badges-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}

.user-badge-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--badge-color, rgba(255,255,255,0.1));
    cursor: default;
    transition: transform 0.2s;
}

.user-badge-chip:hover {
    transform: scale(1.3);
    z-index: 2;
}

.badge-more {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    cursor: default;
}

/* Level Badge (profile/members) */
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    border-radius: 8px;
    white-space: nowrap;
}

.level-badge-sm {
    font-size: 0.65rem;
    padding: 2px 8px;
}

.level-badge-lg {
    font-size: 0.78rem;
    padding: 4px 12px;
}

.level-newbie   { background: rgba(139,148,103,0.15); color: #8B9467; border: 1px solid rgba(139,148,103,0.3); }
.level-member   { background: rgba(124,185,232,0.15); color: #7CB9E8; border: 1px solid rgba(124,185,232,0.3); }
.level-bronze   { background: rgba(205,127,50,0.15);  color: #CD7F32; border: 1px solid rgba(205,127,50,0.3);  }
.level-silver   { background: rgba(192,192,192,0.15); color: #C0C0C0; border: 1px solid rgba(192,192,192,0.3); }
.level-gold     { background: rgba(255,215,0,0.15);   color: #FFD700; border: 1px solid rgba(255,215,0,0.3);   }
.level-platinum { background: rgba(229,228,226,0.15); color: #E5E4E2; border: 1px solid rgba(229,228,226,0.3); }
.level-diamond  { background: rgba(185,242,255,0.15); color: #B9F2FF; border: 1px solid rgba(185,242,255,0.3); }
.level-master   { background: rgba(255,107,53,0.15);  color: #FF6B35; border: 1px solid rgba(255,107,53,0.3);  }
.level-legend   { background: rgba(167,139,250,0.15); color: #A78BFA; border: 1px solid rgba(167,139,250,0.3); }
.level-titan    { background: rgba(255,69,0,0.15);    color: #FF4500; border: 1px solid rgba(255,69,0,0.3); text-shadow: 0 0 8px rgba(255,69,0,0.3); }

/* Level Progress Bar */
.level-progress {
    margin-top: 6px;
}

.level-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.level-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.level-text {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.room-msg-text {
    font-size: 0.88rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.room-msg-text img.emoji,
.room-msg-text .emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
}

.room-msg-time {
    font-size: 0.62rem;
    color: var(--text-muted);
    display: block;
    text-align: right;
    margin-top: 2px;
    opacity: 0.7;
}

.room-msg-mine .room-msg-time {
    color: rgba(255,255,255,0.5);
}

.room-msg-sending { opacity: 0.6; }
.room-msg-error .room-msg-body { border: 1px solid rgba(239,68,68,0.4) !important; }

/* Room Welcome v2 */
.room-welcome-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    margin: auto 0;
    gap: 8px;
}

.rw-icon {
    position: relative;
    margin-bottom: 12px;
}

.rw-emoji {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
}

.room-welcome-v2 h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-white);
}
.room-welcome-v2 p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 360px;
}
.rw-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding: 6px 16px;
    background: rgba(139,92,246,0.08);
    border-radius: 20px;
}

/* Room Input v2 */
.room-input-area-v2 {
    padding: 12px 16px 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    border-top: 1px solid var(--border-glass);
    background: rgba(15,5,32,0.85);
    backdrop-filter: blur(24px);
    flex-shrink: 0;
    z-index: 20;
    position: relative;
}

.room-input-form-v2 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rif-emoji-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.rif-emoji-btn:hover {
    color: var(--primary-light);
    background: rgba(139,92,246,0.1);
}

.room-input-v2 {
    flex: 1;
    padding: 12px 18px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid var(--border-glass);
    border-radius: 24px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    min-height: 44px;
    transition: all 0.25s ease;
}

.room-input-v2:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139,92,246,0.08);
    background: rgba(255,255,255,0.07);
}

.room-input-v2::placeholder { color: var(--text-muted); }

.rif-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.rif-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.rif-send-btn:disabled {
    opacity: 0.5;
    transform: none;
}

.rif-char-count {
    text-align: right;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding-right: 60px;
    opacity: 0.6;
}

/* ═══════════ MEMBERS PANEL v2 ═══════════ */

.room-members-panel-v2 {
    background: rgba(15,5,32,0.9);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rmp-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.rmp-header h3 {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rmp-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}
.rmp-close:hover { background: var(--bg-glass); }

/* Room info in panel */
.rmp-room-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rmp-ri-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rmp-ri-text { min-width: 0; }
.rmp-ri-text strong {
    display: block;
    font-size: 0.82rem;
    color: var(--text-white);
}
.rmp-ri-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Panel Stats */
.rmp-stats {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rmp-stat {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.rmp-stat-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
}

.rmp-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Member Search */
.rmp-search {
    padding: 10px 16px;
}

.rmp-search input {
    width: 100%;
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 0.82rem;
    outline: none;
    font-family: var(--font-body);
}

.rmp-search input:focus {
    border-color: var(--primary);
}

.rmp-search input::placeholder { color: var(--text-muted); }

/* Members List */
.rmp-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}

.rmp-list::-webkit-scrollbar { width: 3px; }
.rmp-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.rmp-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 10px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rmp-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s;
}

.rmp-member:hover { background: rgba(255,255,255,0.05); }

.rmp-member-info {
    flex: 1;
    min-width: 0;
}

.rmp-member-name {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rmp-member-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.rmp-member-seen {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.rmp-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.rmp-role-admin {
    background: rgba(239,68,68,0.15);
    color: #F87171;
}

.rmp-role-mod {
    background: rgba(245,158,11,0.15);
    color: #FBBF24;
}

.rmp-member-status {
    font-size: 0.55rem;
    flex-shrink: 0;
}

.rmp-member-status.online { color: #4ADE80; }

/* ═══════════ DOT PULSES ═══════════ */

.dot-pulse {
    width: 8px;
    height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.dot-pulse-sm {
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* ═══════════ TYPING INDICATOR ═══════════ */

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.typing-dots {
    display: flex;
    gap: 3px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.typing-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 900px) {
    .room-layout-v2 {
        grid-template-columns: 1fr;
        height: calc(100vh - var(--navbar-height));
        height: calc(100dvh - var(--navbar-height));
    }

    .room-main-v2 {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .room-messages-v2 {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .room-input-area-v2 {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    }

    .room-members-panel-v2 {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        right: 0;
        bottom: 0;
        width: 85%;
        max-width: 300px;
        z-index: 100;
        box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    }

    .room-members-panel-v2.open {
        display: flex;
        animation: slideLeft 0.3s ease;
    }

    @keyframes slideLeft {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }

    .rmp-close { display: flex; }
}

@media (max-width: 768px) {
    .rooms-grid-v3 {
        grid-template-columns: 1fr;
    }

    .rooms-hero-title { font-size: 1.8rem; }
    .rooms-hero-stats { flex-direction: row; gap: 16px; padding: 12px 20px; }
    .rhs-divider { width: 1px; height: 24px; }

    .room-msg { max-width: 88%; }

    .room-input-v2 { font-size: 16px; padding: 10px 14px; }

    .room-input-area-v2 {
        padding: 10px 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    }

    .rif-char-count { display: none; }

    .room-messages-v2 { padding: 10px 8px; }

    .room-header-v2 { padding: 8px 12px; min-height: 54px; }

    .room-header-info-v2 h2 { font-size: 0.92rem; }
}

@media (max-width: 480px) {
    .rooms-hero-stats {
        flex-direction: column;
        gap: 8px;
    }
    .rhs-divider {
        width: 40px;
        height: 1px;
    }

    .rc3-stats {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════
   LIGHT THEME - ROOMS
   ═══════════════════════════════════ */

[data-theme="light"] .room-layout-v2 {
    background: var(--bg-dark);
}

[data-theme="light"] .room-header-v2 {
    background: rgba(247,243,255,0.95);
    border-bottom-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .room-messages-v2 {
    background: linear-gradient(135deg, #f7f3ff, #ede9fe);
}

[data-theme="light"] .room-welcome {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.2);
}

[data-theme="light"] .room-msg-body {
    background: rgba(255,255,255,0.9);
    border-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .room-msg-mine .room-msg-body {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(217,70,239,0.1));
    border-color: rgba(139,92,246,0.25);
}

[data-theme="light"] .room-input-area-v2 {
    background: rgba(247,243,255,0.95);
    border-top-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .room-input-v2 {
    background: rgba(139,92,246,0.06);
    border-color: rgba(139,92,246,0.15);
    color: var(--text-primary);
}

[data-theme="light"] .room-input-v2:focus {
    background: rgba(139,92,246,0.1);
    border-color: var(--primary);
}

[data-theme="light"] .room-members-panel-v2 {
    background: rgba(247,243,255,0.98);
    border-left-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .rmp-header {
    background: rgba(139,92,246,0.08);
    border-bottom-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .rmp-member {
    background: rgba(255,255,255,0.6);
    border-color: rgba(139,92,246,0.1);
}

[data-theme="light"] .rmp-member:hover {
    background: rgba(255,255,255,0.9);
    border-color: rgba(139,92,246,0.2);
}

[data-theme="light"] .typing-dots {
    background: rgba(139,92,246,0.1);
}

[data-theme="light"] .room-card-v3 {
    background: rgba(255,255,255,0.9);
    border-color: rgba(139,92,246,0.15);
}

[data-theme="light"] .room-card-v3:hover {
    background: rgba(255,255,255,0.95);
    border-color: rgba(139,92,246,0.25);
}

[data-theme="light"] .room-card-v3 h3,
[data-theme="light"] .room-card-v3 .room-name {
    color: #1a0a2e !important;
}

[data-theme="light"] .room-card-v3 p,
[data-theme="light"] .room-card-v3 .room-desc {
    color: rgba(26, 10, 46, 0.75) !important;
}

[data-theme="light"] .room-stats span {
    color: rgba(26, 10, 46, 0.7) !important;
}

/* ═══════════ MÜZİK PLAYER WİDGET ═══════════ */

.music-widget {
    position: relative;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.10));
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 12px;
    padding: 8px 10px;
    margin: 0 0 4px 0;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    overflow: visible;
    z-index: 10;
}
.music-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #3B82F6, #10B981, #8B5CF6);
    background-size: 300% 100%;
    animation: musicGradient 4s ease infinite;
}
@keyframes musicGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Player ana içerik */
.music-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.music-thumb-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.music-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.music-thumb-pulse {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid rgba(139,92,246,0.5);
    animation: musicPulse 2s ease-in-out infinite;
}
@keyframes musicPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.music-info {
    flex: 1;
    min-width: 0;
}
.music-info-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.music-info-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kontrol butonları */
.music-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.music-ctrl-btn {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
}
.music-ctrl-btn:hover {
    background: rgba(139,92,246,0.2);
    transform: scale(1.1);
}
.music-ctrl-btn.music-play-btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    background: rgba(139,92,246,0.2);
}
.music-ctrl-btn.music-play-btn:hover {
    background: rgba(139,92,246,0.4);
}

/* İlerleme çubuğu */
.music-progress-wrap {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.music-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}
.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B5CF6, #3B82F6);
    border-radius: 4px;
    transition: width 1s linear;
    width: 0%;
}
.music-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* Ses kontrolü */
.music-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}
.music-vol-icon {
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px;
}
.music-vol-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    outline: none;
    max-width: 100px;
}
.music-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8B5CF6;
    cursor: pointer;
}
.music-vol-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8B5CF6;
    cursor: pointer;
    border: none;
}

/* Playlist butonu */
.music-extra-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.music-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
.music-icon-btn:hover {
    color: var(--text-white);
    background: rgba(139,92,246,0.15);
}

/* Autoplay hint (mobilde ilk tıklama gerekli) */
.music-autoplay-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 10px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #F59E0B;
}
.music-autoplay-hint:hover {
    background: rgba(245,158,11,0.25);
}

/* Minimize modu */
.music-widget.music-minimized .music-progress-wrap,
.music-widget.music-minimized .music-volume-wrap,
.music-widget.music-minimized .music-autoplay-hint,
.music-widget.music-minimized .music-extra-btns {
    display: none !important;
}
.music-widget.music-minimized {
    padding: 8px 12px;
}

/* Hidden YouTube player */
.music-yt-container {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ═══════════ PLAYLIST PANELİ ═══════════ */

/* Overlay arkaplan */
.mpl-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
}
.mpl-overlay.open { display: block; }

.music-playlist-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 600px;
    background: #0d0520;
    border-top: 2px solid rgba(139,92,246,0.5);
    border-radius: 16px 16px 0 0;
    max-height: 65vh;
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 9999;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.8);
}
.music-playlist-panel.open {
    transform: translateX(-50%) translateY(0);
    overflow-y: auto;
    padding: 12px;
}

.mpl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 8px;
}
.mpl-header-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-white);
}

/* Kapatma butonu */
.mpl-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}
.mpl-close-btn:hover {
    color: var(--text-white);
    background: rgba(239,68,68,0.15);
}

/* Arama kutusu */
.mpl-search-wrap {
    padding: 0 4px 8px;
}
.mpl-search-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--text-white);
    outline: none;
    box-sizing: border-box;
}
.mpl-search-input:focus {
    border-color: #8B5CF6;
    background: rgba(255,255,255,0.08);
}
.mpl-search-input::placeholder {
    color: var(--text-muted);
}

/* Arama sonucu ekleme ikonu */
.mpl-add-icon {
    color: #8B5CF6;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(139,92,246,0.12);
    transition: all 0.2s;
}
.mpl-search-result {
    cursor: pointer !important;
}
.mpl-search-result:hover {
    background: rgba(139,92,246,0.15) !important;
}
.mpl-search-result:hover .mpl-add-icon {
    background: rgba(139,92,246,0.3);
    transform: scale(1.1);
}

/* Playlist item */
.mpl-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: default;
}
.mpl-item:hover {
    background: rgba(139,92,246,0.08);
}
.mpl-item.mpl-current {
    background: rgba(139,92,246,0.15);
    border-left: 3px solid #8B5CF6;
}
.mpl-num {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.mpl-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.mpl-info {
    flex: 1;
    min-width: 0;
}
.mpl-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mpl-artist {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.mpl-duration {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.mpl-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 20px;
}

/* ═══════════ LIGHT THEME ═══════════ */
[data-theme="light"] .music-widget {
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(59,130,246,0.06));
    border-color: rgba(139,92,246,0.15);
}
[data-theme="light"] .music-info-title { color: #1a0a2e; }
[data-theme="light"] .music-ctrl-btn { color: #1a0a2e; }
[data-theme="light"] .music-playlist-panel {
    background: #fff;
    border-color: rgba(139,92,246,0.12);
}
[data-theme="light"] .mpl-title { color: #1a0a2e; }
[data-theme="light"] .mpl-add-input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(139,92,246,0.15);
    color: #1a0a2e;
}

/* ═══════════ MOBİL UYUM ═══════════ */
@media (max-width: 768px) {
    .music-widget {
        border-radius: 12px;
        padding: 10px;
        margin: 0 0 6px 0;
    }
    .music-thumb-wrap {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    .music-info-title {
        font-size: 0.82rem;
    }
    .music-ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    .music-ctrl-btn.music-play-btn {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    .music-volume-wrap {
        display: none;
    }
    .music-playlist-panel.open {
        max-height: 280px;
    }
    .mpl-add-form {
        flex-wrap: wrap;
    }
    .mpl-add-input {
        min-width: 0;
    }
}
