/* CSS Variables */
:root {
    --bg-dark: #0f0f1a;
    --bg-darker: #0a0a12;
    --bg-card: #1a1a2e;
    --bg-hover: #252540;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-purple: #7c3aed;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --gradient-purple: linear-gradient(135deg, #7c3aed, #a855f7);
    --gradient-blue: linear-gradient(135deg, #3b82f6, #06b6d4);
    --gradient-green: linear-gradient(135deg, #10b981, #34d399);
    --gradient-orange: linear-gradient(135deg, #f59e0b, #fb923c);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* Top Bar - iOS 26 Style */
.top-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 60px;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sign-in-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-in-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

.sign-in-btn.hidden {
    display: none;
}

.sign-in-btn svg {
    opacity: 0.9;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    background: rgba(124, 58, 237, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-pill:hover {
    background: rgba(124, 58, 237, 0.3);
}

.user-pill.hidden {
    display: none;
}

.user-pill-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-pill-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}


/* Settings Page */
#settings {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.settings-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(to right, #fff, #a0a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Profile Card */
.profile-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

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

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

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-signout {
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-signout:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

/* Settings Cards */
.settings-card {
    background: rgba(22, 22, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 6px 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-card-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 8px;
}

.settings-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Settings Rows */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    transition: background 0.15s ease;
}

.settings-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.settings-row + .settings-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-row-info {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.settings-row-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.settings-row-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Dropdown */
.settings-dropdown {
    padding: 10px 36px 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 170px;
    transition: all 0.2s ease;
}

.settings-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(124, 58, 237, 0.4);
}

.settings-dropdown:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.settings-dropdown option {
    background: #1a1a2e;
    color: #fff;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    transition: background 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-track:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle input:checked + .toggle-track {
    background: var(--accent-purple);
    border-color: transparent;
}

.toggle input:checked + .toggle-track:before {
    transform: translateX(22px);
}

/* Save Button */
.settings-save-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--gradient-purple);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.settings-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
}

.settings-save-btn:active {
    transform: translateY(0);
}

.settings-save-btn.saved {
    background: var(--gradient-green);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--bg-darker);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 20px 12px 12px 12px;
    overflow-y: auto;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.nav-icon {
    font-size: 18px;
}

.user-section {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 10px;
}

.user-section:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

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

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-settings-icon {
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.user-section:hover .user-settings-icon {
    opacity: 1;
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 90px 40px 30px 40px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #12121f 100%);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #a0a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Welcome Grid */
.welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.welcome-card {
    padding: 28px;
    border-radius: 16px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-card:hover::before {
    opacity: 1;
}

.gradient-purple {
    background: var(--gradient-purple);
}

.gradient-blue {
    background: var(--gradient-blue);
}

.gradient-green {
    background: var(--gradient-green);
}

.gradient-orange {
    background: var(--gradient-orange);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.welcome-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px 32px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Chat Container */
.chat-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-container.large {
    height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
}

.chat-messages {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 16px;
    min-height: 150px;
}

.chat-messages:empty::before {
    content: "No messages yet. Be the first to say something!";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 130px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.chat-container.large .chat-messages {
    flex: 1;
    max-height: none;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

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

.message.self {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    background: var(--bg-hover);
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
}

.message.self .message-content {
    background: var(--gradient-purple);
    border-radius: 16px;
    border-top-right-radius: 4px;
}

.message-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 4px;
}

.message.self .message-author {
    display: none;
}

.message-content p {
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 6px;
}

.message.self .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Message action buttons (unsend / edit) */
.message-actions {
    display: none;
    gap: 4px;
    margin-top: 6px;
    justify-content: flex-end;
}

.message:hover .message-actions {
    display: flex;
}

.msg-edit-btn,
.msg-unsend-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #fff;
}

.msg-edit-btn:hover {
    background: rgba(59, 130, 246, 0.5);
}

.msg-unsend-btn:hover {
    background: rgba(239, 68, 68, 0.5);
}

.edited-tag {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin-left: 4px;
}

.chat-input-container {
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    background: var(--bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    background: var(--gradient-purple);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Resources Panel */
.resources-panel {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.resources-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resource-link {
    background: var(--bg-hover);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-link:hover {
    background: var(--accent-purple);
    color: white;
}

/* Meme Grid */
.meme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.meme-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.meme-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-pink);
}

.meme-placeholder {
    font-size: 64px;
    margin-bottom: 12px;
}

.meme-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Gaming Grid */
.gaming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.game-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, color 0.15s ease;
}
.game-fav-btn:hover { transform: scale(1.15); color: #ffd166; }
.game-fav-btn.active { color: #ffd166; }

.game-card:hover {
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.game-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.game-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.game-players {
    font-size: 12px;
    color: var(--accent-green);
}

/* Game toolbar */
.game-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.game-search {
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.game-search:focus {
    border-color: var(--accent-cyan);
}

.game-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.game-filter-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.game-filter-btn.active {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
    color: #fff;
}

.game-filter-btn:hover:not(.active) {
    background: var(--bg-hover);
}

.game-card.playable:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.game-iframe-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
}

#gameBackBtn:hover {
    background: var(--bg-card) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Music Player */
.music-source-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.music-src-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.music-src-btn.active {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--accent-purple);
    color: #fff;
}

.music-src-btn:hover:not(.active) {
    background: var(--bg-hover);
}

.music-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.music-url-input {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.music-url-input:focus {
    border-color: var(--accent-purple);
}

.music-play-btn {
    padding: 11px 22px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.music-play-btn:hover {
    opacity: 0.85;
}

.music-player-area {
    margin-bottom: 16px;
}

.music-player-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
}

.music-player-wrap iframe {
    width: 100%;
    border: none;
    display: block;
}

/* Audius search + player */
.audius-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.audius-status {
    padding: 14px;
    color: var(--text-secondary);
    font-size: 14px;
}

.audius-track {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-card);
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.audius-track:hover {
    background: var(--bg-hover);
}

.audius-track.playing {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.2);
}

.audius-track img,
.audius-track .audius-art-fallback {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.audius-art-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    font-size: 20px;
}

.audius-track-info,
.audius-now-info {
    flex: 1;
    min-width: 0;
}

.audius-track-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audius-track-artist {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audius-track-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.audius-now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
}

.audius-now-playing > img,
.audius-now-playing > .audius-art-fallback {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.audius-now-playing audio {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 520px) {
    .audius-now-playing > img,
    .audius-now-playing > .audius-art-fallback {
        width: 64px;
        height: 64px;
    }
}

/* Notes Container */
.notes-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
}

.notes-sidebar {
    width: 250px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.new-note-btn {
    width: 100%;
    background: var(--gradient-purple);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.new-note-btn:hover {
    transform: scale(1.02);
}

.notes-list {
    flex: 1;
    overflow-y: auto;
}

.note-item {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-item:hover,
.note-item.active {
    background: var(--bg-hover);
}

.note-item.active {
    border-left: 3px solid var(--accent-purple);
}

.note-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.note-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.notes-editor {
    flex: 1;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.note-title-input {
    background: transparent;
    border: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.note-title-input:focus {
    outline: none;
}

.note-content {
    flex: 1;
    background: var(--bg-hover);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    line-height: 1.6;
}

.note-content:focus {
    outline: none;
}

.notes-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.save-note-btn,
.share-note-btn,
.pin-note-btn,
.delete-note-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-note-btn {
    background: var(--gradient-green);
    color: white;
}

.share-note-btn,
.pin-note-btn {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.delete-note-btn {
    background: var(--bg-hover);
    color: #ff6b6b;
}

.save-note-btn:hover,
.share-note-btn:hover,
.pin-note-btn:hover,
.delete-note-btn:hover {
    transform: scale(1.05);
}

.pin-note-btn:disabled,
.delete-note-btn:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none !important;
}

.note-pin-dot {
    color: #ffb454;
    margin-right: 4px;
    font-size: 12px;
}

/* Calendar Container */
.calendar-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.cal-nav {
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-nav:hover {
    background: var(--accent-purple);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.cal-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cal-day:hover {
    background: var(--bg-hover);
}

.cal-day.today {
    background: var(--gradient-purple);
    font-weight: 700;
}

.cal-day.event {
    color: var(--accent-orange);
    font-weight: 600;
}

.event-dot {
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: var(--accent-orange);
    border-radius: 50%;
}

.upcoming-events h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.event-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--bg-hover);
    border-radius: 10px;
    margin-bottom: 10px;
}

.event-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-purple);
    min-width: 60px;
}

.event-name {
    font-size: 14px;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.resource-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px);
}

.resource-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 16px;
}

.resource-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.resource-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.resource-btn {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.resource-btn:hover {
    color: var(--accent-cyan);
}

/* ── Home Page Additions ──────────────────────────────────────────────────── */
.announcement-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 146, 60, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.announcement-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.announcement-text strong {
    color: #fbbf24;
}

.home-section {
    margin-top: 32px;
}

.section-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.section-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.channel-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.channel-pill {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.channel-pill:hover {
    background: var(--gradient-purple);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

.ai-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.ai-room-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.ai-room-card:hover {
    border-color: rgba(124, 58, 237, 0.45);
    background: var(--bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.ai-room-icon {
    font-size: 30px;
}

.ai-room-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-room-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(124, 58, 237, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.study-tip-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.07));
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 16px;
    padding: 22px 24px;
    margin-top: 28px;
}

.study-tip-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.study-tip-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-green);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.study-tip-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.quick-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quick-tool-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-tool-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: var(--bg-hover);
    transform: translateY(-3px);
}

.quick-tool-icon {
    font-size: 28px;
}

.quick-tool-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-tool-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── AI Tutor message styles ──────────────────────────────────────────────── */
.ai-author {
    color: #a78bfa !important;
}

.ai-typing-bubble {
    background: rgba(124, 58, 237, 0.1) !important;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    background: #a78bfa;
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

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

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* ── Toast notification ───────────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 12px;
        overflow-x: auto;
    }

    .nav-section {
        display: flex;
        gap: 8px;
        margin-bottom: 0;
    }

    .nav-label {
        display: none;
    }

    .nav-btn span:last-child {
        display: none;
    }

    .logo-text {
        display: none;
    }

    .user-section {
        margin-top: 0;
    }

    .user-info {
        display: none;
    }

    .main-content {
        height: calc(100vh - 80px);
    }

    .notes-container {
        flex-direction: column;
        height: auto;
    }

    .notes-sidebar {
        width: 100%;
        height: 200px;
    }
}

/* ── Unread Badge ─────────────────────────────────────────────────────────── */
.unread-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
}

.unread-badge.hidden {
    display: none;
}

.nav-btn.hidden {
    display: none !important;
}

/* ── Reply Bar ────────────────────────────────────────────────────────────── */
.reply-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(124, 58, 237, 0.12);
    border-left: 3px solid var(--accent-purple);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.reply-bar-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-bar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}

/* ── Reply Quote in messages ─────────────────────────────────────────────── */
.reply-quote {
    background: rgba(255, 255, 255, 0.07);
    border-left: 3px solid var(--accent-purple);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reply-quote strong {
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
}

/* ── Typing indicator ────────────────────────────────────────────────────── */
.typing-display {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 10px;
    min-height: 20px;
    font-style: italic;
}

/* ── Reaction bar ────────────────────────────────────────────────────────── */
.react-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    align-items: center;
}

.react-btn-add {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff;
    position: relative;
}

.react-btn-add:hover {
    background: rgba(124, 58, 237, 0.3);
}

.react-picker {
    position: absolute;
    bottom: 30px;
    left: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    gap: 6px;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.react-picker button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background 0.15s;
}

.react-picker button:hover {
    background: var(--bg-hover);
}

.reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.reaction-chip:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
}

.reaction-chip.mine {
    background: rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.6);
}

/* ── Reply button ────────────────────────────────────────────────────────── */
.msg-reply-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #fff;
}

.msg-reply-btn:hover {
    background: rgba(124, 58, 237, 0.4);
}

/* ── Flashcard styles ────────────────────────────────────────────────────── */
.flashcard-generator {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.flashcard-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.flashcard {
    width: 420px;
    height: 240px;
    max-width: 90vw;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.55s ease;
    border-radius: 18px;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
}

.flashcard-front {
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(59,130,246,0.2));
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: var(--text-primary);
}

.flashcard-back {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(6,182,212,0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--text-primary);
    transform: rotateY(180deg);
}

.flashcard-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

/* ── Quiz Me button ──────────────────────────────────────────────────────── */
.quiz-me-btn {
    background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(251,146,60,0.2));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fbbf24;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.quiz-me-btn:hover {
    background: linear-gradient(135deg, rgba(245,158,11,0.4), rgba(251,146,60,0.35));
    transform: scale(1.05);
}

/* ── Live Announcement Banner ────────────────────────────────────────────── */
#liveBanner {
    display: none;
}

#liveBanner.visible {
    display: flex;
    animation: bannerSlideIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#liveBanner.hiding {
    animation: bannerSlideOut 0.35s ease-in forwards;
}

@keyframes bannerSlideIn {
    0%   { transform: translateY(100%); opacity: 0; }
    60%  { opacity: 1; }
    100% { transform: translateY(0);   opacity: 1; }
}

@keyframes bannerSlideOut {
    0%   { transform: translateY(0);   opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

#liveBannerIcon {
    display: inline-block;
    animation: iconPulse 1.8s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    30%      { transform: scale(1.3) rotate(-8deg); }
    60%      { transform: scale(1.1) rotate(5deg); }
}

/* ── Profile modal flex fix ──────────────────────────────────────────────── */
#profileModal.visible,
#dmModal.visible {
    display: flex;
}

/* Compact Mode */
body.compact-mode .message {
    padding: 6px 0;
}

body.compact-mode .message-content p {
    font-size: 13px;
}

body.compact-mode .welcome-card {
    padding: 16px;
}

body.compact-mode .chat-messages {
    padding: 6px;
}

body.compact-mode .nav-btn {
    padding: 8px 12px;
}

/* Hide Timestamps */
body.hide-timestamps .message-time {
    display: none;
}

/* ── Theme Swatches ──────────────────────────────────────────────────────── */
.theme-swatches {
    display: flex;
    gap: 8px;
    align-items: center;
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    outline: none;
}

.theme-swatch:hover {
    transform: scale(1.15);
}

.theme-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* ── Study Streak Badge ──────────────────────────────────────────────────── */
.sidebar-streak {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.3px;
    display: block;
    margin-top: 2px;
}

.sidebar-streak.hidden {
    display: none;
}

/* ── Status input row ────────────────────────────────────────────────────── */
#statusInputRow {
    display: none;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

#statusInputRow.visible {
    display: flex;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.leaderboard-empty {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 16px;
    animation: fadeInUp 0.3s ease;
}

.leaderboard-rank {
    font-size: 20px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.leaderboard-name {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.leaderboard-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 3px 10px;
    border-radius: 20px;
}

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

/* ── Poll Card ───────────────────────────────────────────────────────────── */
.poll-card {
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 4px;
    max-width: 320px;
}

.poll-question {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.poll-option-btn {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 6px;
    text-align: left;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.poll-option-btn:hover {
    background: rgba(124,58,237,0.2);
    border-color: rgba(124,58,237,0.4);
}

.poll-option-btn.voted {
    border-color: rgba(124,58,237,0.6);
}

.poll-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(124,58,237,0.15);
    border-radius: 7px;
    transition: width 0.4s ease;
    z-index: 0;
}

.poll-option-text {
    position: relative;
    z-index: 1;
    flex: 1;
}

.poll-option-pct {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.poll-footer {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.poll-create-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 600;
    align-items: center;
    justify-content: center;
}

.poll-create-modal.visible {
    display: flex;
}

.poll-create-box {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 24px;
    width: 380px;
    max-width: 95vw;
}

.poll-create-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.poll-input {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 10px;
}

.poll-input::placeholder {
    color: var(--text-secondary);
}

/* ── GIF card ────────────────────────────────────────────────────────────── */
.gif-message img {
    max-width: 240px;
    border-radius: 10px;
    display: block;
    margin-top: 4px;
    cursor: pointer;
}

.gif-search-box {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 14px;
    z-index: 400;
    width: 380px;
    max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.gif-search-box.visible {
    display: block;
}

.gif-search-input {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 14px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 10px;
}

.gif-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.gif-result-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--bg-hover);
}

.gif-result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.gif-result-item:hover img {
    opacity: 0.85;
}

/* ── Sticker Tray ────────────────────────────────────────────────────────── */
.sticker-tray {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 10px;
    z-index: 350;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.sticker-tray.visible {
    display: grid;
    grid-template-columns: repeat(5, 40px);
    gap: 4px;
}

.sticker-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}

.sticker-btn:hover {
    background: rgba(124,58,237,0.2);
    transform: scale(1.15);
}

.sticker-message {
    font-size: 48px;
    line-height: 1.1;
    display: block;
}

/* ── Link Preview ────────────────────────────────────────────────────────── */
.link-preview {
    display: flex;
    gap: 12px;
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid var(--accent-purple);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 6px;
    max-width: 320px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.link-preview:hover {
    background: rgba(255,255,255,0.05);
}

.link-preview-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.link-preview-info {
    flex: 1;
    overflow: hidden;
}

.link-preview-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.link-preview-desc {
    font-size: 11px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-domain {
    font-size: 11px;
    color: var(--accent-purple);
    margin-top: 4px;
    font-weight: 600;
}

/* ── Video Call ───────────────────────────────────────────────────────────── */

/* Expanded (fullscreen-like) mode — default on call start */
#videoCallModal.vc-expanded {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    z-index: 900;
    display: flex;
    flex-direction: column;
}

/* PiP (floating window) mode — shrink into corner */
#videoCallModal.vc-pip {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 260px;
    background: #0a0a0a;
    z-index: 900;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
    resize: both;
}

.vc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2;
    flex-shrink: 0;
    cursor: grab;
}
.vc-topbar:active { cursor: grabbing; }
.vc-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vc-connected-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}
.vc-title { font-size: 14px; font-weight: 700; color: #fff; }
.vc-status { font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.vc-topbar-actions { display: flex; gap: 6px; }
.vc-size-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.vc-size-btn:hover { background: rgba(255, 255, 255, 0.18); }

.vc-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
}
.vc-remote {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.vc-self-wrap {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 160px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    z-index: 3;
}
.vc-expanded .vc-self-wrap {
    width: 200px;
    height: 120px;
}
.vc-pip .vc-self-wrap {
    width: 100px;
    height: 64px;
    bottom: 10px;
    right: 10px;
    border-radius: 8px;
}
.vc-local {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vc-name-tag {
    position: absolute;
    bottom: 7px;
    left: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.vc-name-self { left: 7px; bottom: 6px; font-size: 11px; }
.vc-pip .vc-name-tag { display: none; }

/* Controls — Discord-style floating pill */
.vc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}
.vc-expanded .vc-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 28px;
    padding: 10px 24px;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.vc-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vc-btn:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.07); }
/* Muted / camera off — red background like Discord */
.vc-btn-toggle.active {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.6);
}
.vc-btn-end {
    background: #ed4245;
    border-color: #ed4245;
    width: 46px;
    height: 46px;
    font-size: 18px;
}
.vc-btn-end:hover { background: #d63638; border-color: #d63638; }

/* PiP mode — smaller buttons */
.vc-pip .vc-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
}
.vc-pip .vc-btn-end {
    width: 34px;
    height: 34px;
    font-size: 14px;
}
.vc-pip .vc-controls {
    padding: 6px 12px;
    gap: 6px;
}

/* Group Call PiP (minimized) mode */
#groupCallModal.gc-pip {
    inset: auto;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
    resize: both;
}
#groupCallModal.gc-pip #groupCallGrid {
    gap: 4px;
    padding: 4px;
}
#groupCallModal.gc-pip .vc-controls {
    padding: 6px 12px;
    gap: 6px;
}
#groupCallModal.gc-pip .vc-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

/* Incoming call ringing animation */
@keyframes vcRing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
}
#incomingCallBanner {
    animation: vcRing 1.5s ease-in-out infinite;
}

/* ── Confessions Room ────────────────────────────────────────────────────── */
.confession-anon-name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* ── Hype / confetti message ─────────────────────────────────────────────── */
.hype-message {
    text-align: center;
    font-size: 22px;
    padding: 8px 0;
    animation: hypePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes hypePop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Chat input container relative for sticker tray ─────────────────────── */
.chat-input-container {
    position: relative;
}

/* ── Toolbar buttons (sticker, gif, poll) ────────────────────────────────── */
.chat-tool-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.chat-tool-btn:hover {
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.4);
}

/* ── Sidebar status display ──────────────────────────────────────────────── */
.sidebar-user-status {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 3px;
}


/* ── Call History ──────────────────────────────────────────────────────────── */
.call-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 16px;
    transition: background 0.15s;
}
.call-history-item:hover { background: var(--bg-hover); }
.call-history-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    overflow: hidden;
}
.call-history-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.call-history-info { flex: 1; min-width: 0; }
.call-history-name { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.call-history-meta { font-size: 12px; color: var(--text-secondary); }
.call-history-icon { font-size: 22px; flex-shrink: 0; }
.call-history-action {
    background: var(--gradient-purple);
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.call-history-action:hover { opacity: 0.85; }

/* ── Contacts Tab ──────────────────────────────────────────────────────────── */
.contacts-search-row {
    margin-bottom: 20px;
    max-width: 480px;
}
.contacts-search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.contacts-search-input:focus { border-color: var(--accent-purple); }
.contacts-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
}
.contacts-empty {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 0;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 12px 14px;
    transition: background 0.15s;
}
.contact-item:hover { background: var(--bg-hover); }
.contact-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: visible;
}
.contact-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
.contact-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.contact-online-dot.online { background: #4ade80; }
.contact-online-dot.inactive { background: #f59e0b; }
.contact-online-dot.offline { background: #6b7280; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.contact-actions { display: flex; gap: 8px; flex-shrink: 0; }
.contact-action-btn {
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.contact-action-btn:hover { background: var(--accent-purple); border-color: var(--accent-purple); }
.contact-action-btn.primary {
    background: var(--gradient-purple);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ── Admin Panel Tab ────────────────────────────────────────────────────────── */
#banScreen { display: flex; }

.admin-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.admin-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-quick-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 16px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.admin-quick-btn:hover { background: var(--bg-hover); }
.admin-quick-btn.danger { color: #f87171; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.admin-quick-btn.danger:hover { background: rgba(239,68,68,0.18); }

.admin-hint { font-size: 12px; color: var(--text-secondary); margin: -4px 0 12px; max-width: 600px; }
.admin-count-chip {
    display: inline-block;
    background: rgba(239,68,68,0.15);
    color: #f87171;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
}
.admin-filter-row { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-quick-btn.mod-filter { padding: 6px 14px; font-size: 12px; opacity: 0.6; }
.admin-quick-btn.mod-filter.active { opacity: 1; background: var(--bg-hover); border-color: var(--accent-purple); }

.mod-empty { color: var(--text-secondary); font-size: 13px; padding: 16px 0; }

.mod-reports-list { display: grid; gap: 10px; max-width: 700px; margin-bottom: 8px; }
.mod-report {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
}
.mod-report.resolved { opacity: 0.55; }
.mod-report-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 11px; color: var(--text-secondary); }
.mod-report-room { font-weight: 700; color: var(--accent-purple); }
.mod-report-time { margin-left: auto; }
.mod-report-status { text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.mod-report-status.resolved { color: #34d399; }
.mod-report-status.dismissed { color: var(--text-secondary); }
.mod-report-body { font-size: 13px; line-height: 1.6; }
.mod-report-msg { color: var(--text-secondary); font-style: italic; margin-top: 4px; }
.mod-report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mod-report-actions button {
    background: var(--bg-hover);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.mod-report-actions button:hover { background: var(--accent-purple); color: #fff; }

.sched-composer { display: grid; gap: 8px; max-width: 500px; margin-bottom: 16px; }
.sched-textarea {
    width: 100%;
    min-height: 60px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.sched-datetime {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 12px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
}
.sched-list { display: grid; gap: 8px; max-width: 500px; }
.sched-item { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 14px; }
.sched-item-text { font-size: 13px; margin-bottom: 6px; }
.sched-item-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-secondary); }
.sched-item-meta button { background: none; border: none; color: #f87171; cursor: pointer; font-size: 11px; font-family: inherit; }

.audit-log-list { display: grid; gap: 6px; max-width: 700px; }
.audit-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 12px;
}
.audit-action { color: var(--text-primary); }
.audit-meta { color: var(--text-secondary); white-space: nowrap; }

.admin-user-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 16px;
}
.admin-user-card.banned { border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.05); }
.admin-user-card.timedout { border-color: rgba(245,158,11,0.35); background: rgba(245,158,11,0.05); }

.admin-user-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}
.admin-user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.admin-user-name { font-weight: 700; font-size: 14px; }
.admin-user-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.admin-user-status-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.admin-user-status-badge.banned { background: rgba(239,68,68,0.2); color: #f87171; }
.admin-user-status-badge.timedout { background: rgba(245,158,11,0.2); color: #f59e0b; }
.admin-user-status-badge.online { background: rgba(74,222,128,0.15); color: #4ade80; }

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.admin-action-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.admin-action-btn:hover { opacity: 0.8; }
.admin-action-btn.red { background: rgba(239,68,68,0.2); color: #f87171; }
.admin-action-btn.amber { background: rgba(245,158,11,0.2); color: #f59e0b; }
.admin-action-btn.green { background: rgba(74,222,128,0.15); color: #4ade80; }
.admin-action-btn.blue { background: rgba(99,102,241,0.2); color: #818cf8; }

/* ── Group Call Grid ─────────────────────────────────────────────────────── */
.gc-participant {
    position: relative;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.gc-participant video { width:100%;height:100%;object-fit:cover;border-radius:12px; }
.gc-participant-label {
    position: absolute;
    bottom: 8px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}
.gc-participant-avatar { font-size: 44px; }

/* ── Meeting Feature ────────────────────────────────────────────────────────── */

/* Lock nav buttons when meeting is active */
.sidebar.meeting-active .nav-btn:not([data-tab="meeting"]) {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* Dynamic meeting nav button */
.nav-btn.meeting-nav {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(239,68,68,0.15));
    border: 1px solid rgba(245,158,11,0.4);
    animation: meetingPulse 2s ease-in-out infinite;
}
.nav-btn.meeting-nav.active {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    box-shadow: 0 4px 20px rgba(245,158,11,0.4);
    animation: none;
}

@keyframes meetingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* Meeting header */
.meeting-header {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.08));
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    max-width: 1000px;
}
.meeting-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.meeting-header-icon {
    font-size: 48px;
    flex-shrink: 0;
}
.meeting-header-info {
    flex: 1;
    min-width: 200px;
}
.meeting-header-info h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}
.meeting-header-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}
.meeting-header-stats {
    display: flex;
    gap: 20px;
}
.meeting-stat {
    text-align: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 10px 18px;
}
.meeting-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    display: block;
    margin-bottom: 4px;
}
.meeting-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #f59e0b;
    font-variant-numeric: tabular-nums;
}

#meetingAdminBar {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Meeting textarea */
.meeting-textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.meeting-textarea:focus {
    outline: none;
    border-color: rgba(245,158,11,0.5);
}

/* Topic cards */
.meeting-topic-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 16px;
    transition: border-color 0.2s;
}
.meeting-topic-card:hover {
    border-color: rgba(245,158,11,0.3);
}
.meeting-topic-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.meeting-topic-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.meeting-topic-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.meeting-topic-author {
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
}
.meeting-topic-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 4px 0 0;
    color: var(--text-primary);
    white-space: pre-wrap;
}
.meeting-topic-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}
.meeting-topic-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.meeting-reply-toggle {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #f59e0b;
    cursor: pointer;
    transition: background 0.15s;
}
.meeting-reply-toggle:hover {
    background: rgba(245,158,11,0.25);
}

/* Reply thread */
.meeting-replies-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: none;
}
.meeting-replies-section.open {
    display: block;
}
.meeting-replies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}
.meeting-reply {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}
.meeting-reply-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.meeting-reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.meeting-reply-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
}
.meeting-reply-text {
    font-size: 13px;
    color: var(--text-primary);
    margin-top: 2px;
}
.meeting-reply-time {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.meeting-reply-input-row {
    display: flex;
    gap: 8px;
}
.meeting-reply-input-row .chat-input {
    flex: 1;
    font-size: 13px;
    padding: 8px 12px;
}
.meeting-reply-input-row .send-btn {
    padding: 8px 14px;
    font-size: 12px;
}

/* Suggestion cards */
.meeting-suggestion-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.meeting-suggestion-input-row .chat-input {
    flex: 1;
}
.meeting-suggestion-card {
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 10px;
    padding: 10px 14px;
}
.meeting-suggestion-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.meeting-suggestion-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}
.meeting-suggestion-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.meeting-suggestion-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
}
.meeting-suggestion-time {
    font-size: 10px;
    color: var(--text-secondary);
    margin-left: auto;
}
.meeting-suggestion-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}
