/* ===================================
   CLASSROOM SYSTEM - UNIFIED DESIGN
   Using index-styles.css color palette
   Created: Oct 2025
   =================================== */

/* Import design system from index-styles */
@import url('./index-styles.css');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #06b6d4;
    --info-light: #cffafe;
    --background: #f8fafc;
    --background-alt: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f9fafb;
    --border: #e2e8f0;
    --border-dark: #d1d5db;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-colored: 0 10px 25px -5px rgba(59, 130, 246, 0.15), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 40px;
    --space-5xl: 48px;
    --space-6xl: 64px;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--text-secondary) 100%);
    --gradient-success: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    --gradient-background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --fa-style-family-brands: "Font Awesome 6 Brands";
    --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
    --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
    --fa-style-family-classic: "Font Awesome 6 Free";
    --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
    --text-primary: #1f2937;
    --text-muted: #6b7280;
    --bg-muted: #f3f4f6;
    --border-light: #e5e7eb;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER & NAVIGATION FIXES
   ============================================ */

/* Ensure header has proper background and positioning */
.header {
    background: var(--gradient-primary) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    box-shadow: var(--shadow-lg);
}

/* brand-full removed */

/* Ensure mobile header shows toggle + brand name + page title */
@media (max-width: 768px) {
    #mobileMenuToggle { display: inline-flex !important; }
    .brand-text { display: flex; align-items: baseline; gap: 6px; }
    .brand-text .brand-name, .brand-text .page-title { display: inline-block; }
}

/* Adjust body padding to account for fixed header */
body.classroom-page {
    padding-top: 70px !important;
}

/* Fix for desktop sidebar toggle container */
.desktop-toggle-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    padding: 8px 0;
    margin: 0 !important;
}

/* Remove gray background from main layout */
.main-layout {
    background: transparent !important;
}

/* ============================================
   CLASSROOM-SPECIFIC LAYOUT
   ============================================ */

/* Classroom Page Body */
body.classroom-page {
    background: var(--gradient-background);
    margin: 0;
    padding: 0;
}

/* Main Content Container */
.classroom-main {
    display: flex;
    min-height: calc(100vh - 64px); /* Header height */
    background: transparent;
}

/* Content Area */
.classroom-content {
    flex: 1;
    padding: var(--space-2xl);
    margin-left: 0;
    transition: margin-left var(--transition-base);
    background: transparent;
}

@media (min-width: 1025px) {
    .classroom-content {
        margin-left: 280px; /* Sidebar width */
    }
}

/* ============================================
   CLASS HEADER SECTION
   ============================================ */

.class-header {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-4xl);
    margin-bottom: var(--space-3xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.class-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-primary);
}

.class-info {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.class-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--text-inverse);
    box-shadow: var(--shadow-colored);
    position: relative;
}

.class-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.3;
    filter: blur(6px);
}

.class-details h1 {
    font-size: var(--font-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.2;
}

.class-details .class-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-sm);
    margin-bottom: var(--space-md);
}

.class-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.class-code {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
}

.class-stats {
    display: flex;
    gap: var(--space-2xl);
    margin-top: var(--space-xl);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* ============================================
   NAVIGATION TABS
   ============================================ */

.classroom-nav {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-3xl);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.classroom-nav::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    flex: 1;
    min-width: 120px;
    padding: var(--space-lg) var(--space-xl);
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.nav-tab:hover {
    background: var(--background-alt);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-colored);
}

.nav-tab i {
    font-size: var(--font-sm);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

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

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

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

/* ============================================
   STREAM SECTION
   ============================================ */

.stream-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-3xl);
}

@media (max-width: 1024px) {
    .stream-container {
        grid-template-columns: 1fr;
    }
}

.stream-main {
    space-y: var(--space-2xl);
}

.post-composer {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
}

.composer-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 600;
    font-size: var(--font-sm);
}

.composer-input {
    flex: 1;
    border: none;
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    font-size: var(--font-base);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    transition: all var(--transition-base);
}

.composer-input:focus {
    outline: none;
    background: var(--surface);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
}

.composer-tools {
    display: flex;
    gap: var(--space-sm);
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--background-alt);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.post-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.post-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

/* Stream Posts */
.stream-post {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
    transition: all var(--transition-base);
}

.stream-post:hover {
    box-shadow: var(--shadow-lg);
}

.post-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 600;
}

.post-author-info h4 {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.post-meta {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-top: 2px;
}

.post-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.post-actions {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
}

.post-action {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-sm);
}

.post-action:hover {
    background: var(--background-alt);
    color: var(--text-primary);
}

/* Stream Sidebar */
.stream-sidebar {
    space-y: var(--space-2xl);
}

.sidebar-widget {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
}

.widget-title {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.upcoming-assignments {
    space-y: var(--space-md);
}

.assignment-item {
    padding: var(--space-lg);
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--warning-color);
    transition: all var(--transition-base);
}

.assignment-item:hover {
    background: var(--surface-hover);
    transform: translateX(2px);
}

.assignment-title {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
}

.assignment-due {
    font-size: var(--font-xs);
    color: var(--text-secondary);
}

/* ============================================
   ASSIGNMENTS SECTION
   ============================================ */

.assignments-container {
    display: grid;
    gap: var(--space-3xl);
}

.assignments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.assignments-title {
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.create-assignment-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.create-assignment-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-2xl);
}

/* Modern Assignment Card */
.assignment-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
    margin: 16px 0;
}

.assignment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.assignment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

/* Assignment Card Header */
.assignment-card__head {
    padding: 20px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.assignment-card__head-info {
    flex: 1;
}

.assignment-card__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.assignment-card__deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.assignment-card__deadline i {
    font-size: 16px;
    color: #ffd700;
}

/* Status Badges */
.assignment-card__status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.assignment-card__status--loading {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.assignment-card__status--error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.3);
}

.assignment-card__status--success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

/* Metrics Section */
.assignment-card__metrics {
    padding: 0 24px 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.assignment-card__metric {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Actions Section */
.assignment-card__actions {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.assignment-card__finish {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.assignment-card__finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.assignment-card__finish i {
    font-size: 16px;
}

/* Note Section */
.assignment-card__note {
    padding: 16px 24px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* ============================================
   POLL RESULTS STYLING
   ============================================ */

/* Poll Question */
.poll-question {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1c1e21;
    line-height: 1.3;
}

/* Poll Options Container */
.poll-options-list {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e4e6ea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Individual Poll Option */
.poll-option-item {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e4e6ea;
    position: relative;
}

.poll-option-item:last-of-type {
    margin-bottom: 16px;
}

.poll-option-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.poll-option-item.voted {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.poll-option-item label {
    display: block;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin: 0;
}

/* Option Text */
.option-text {
    display: block;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #1c1e21;
    position: relative;
    z-index: 2;
    background: transparent;
}

.poll-option-item.voted .option-text {
    color: #1877f2;
}

/* Poll Result Container */
.poll-result {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #f7f8fa;
    min-height: 40px;
}

.poll-option-item.voted .poll-result {
    background: #e7f3ff;
}

/* Poll Bar (Progress Bar) */
.poll-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #42a5f5 0%, #1e88e5 100%);
    border-radius: 0 4px 4px 0;
    transition: width 0.8s ease;
    opacity: 0.8;
}

.poll-option-item.voted .poll-bar {
    background: linear-gradient(90deg, #1877f2 0%, #166fe5 100%);
    opacity: 0.9;
}

/* Poll Percentage */
.poll-percentage {
    font-weight: 700;
    font-size: 14px;
    color: #1c1e21;
    position: relative;
    z-index: 2;
    margin-left: auto;
}

.poll-option-item.voted .poll-percentage {
    color: #1877f2;
}

/* Poll Votes Count */
.poll-votes {
    font-size: 13px;
    color: #65676b;
    font-weight: 500;
    position: relative;
    z-index: 2;
    margin-left: 8px;
}

.poll-votes::before {
    content: '(';
}

.poll-votes::after {
    content: ')';
}

/* Poll Meta Information */
.poll-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #e4e6ea;
    font-size: 13px;
    color: #65676b;
}

.total-votes {
    font-weight: 600;
    color: #1c1e21;
}

.multi-hint {
    font-style: italic;
    color: #8a8d91;
}

/* Responsive Design */
@media (max-width: 768px) {
    .poll-question {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .poll-options-list {
        padding: 12px;
    }
    
    .option-text {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .poll-result {
        padding: 6px 12px;
        min-height: 36px;
    }
    
    .poll-meta {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .post-input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-visibility-selector-inline select {
        width: 100%;
        min-width: auto;
    }
}

/* ============================================
   REPLY INPUT STYLING
   ============================================ */

.reply-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f8fa;
    border-radius: 20px;
    padding: 8px 12px;
    margin: 12px 0;
    border: 1px solid #e4e6ea;
    transition: all 0.2s ease;
}

.reply-input-row:focus-within {
    border-color: #1877f2;
    background: white;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.reply-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #1c1e21;
    padding: 4px 0;
}

.reply-input::placeholder {
    color: #8a8d91;
}

.send-reply-btn {
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-full);
    width: var(--space-3xl);
    height: var(--space-3xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-reply-btn:hover {
    background: #166fe5;
    transform: scale(1.05);
}

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

.send-reply-btn i {
    font-size: 14px;
}

/* ============================================
   TOGGLE BUTTONS STYLING
   ============================================ */

#toggleJoinBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3);
}

#toggleJoinBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.4);
}

#toggleJoinBtn i {
    font-size: 16px;
}

/* Desktop Sidebar Toggle in Header */
.desktop-sidebar-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: var(--space-4xl);
    height: var(--space-4xl);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.desktop-sidebar-toggle:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.desktop-sidebar-toggle.active {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.desktop-sidebar-toggle.active:hover {
    background: #166fe5;
}

/* ============================================
   MODERN SIDEBAR DESIGN
   ============================================ */

/* Sidebar Container */
.sidebar.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1200;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.mobile-sidebar.active {
    left: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.sidebar-dual-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo, .sidebar-classroom-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-logo:hover, .sidebar-classroom-logo:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.sidebar-logo img, .sidebar-classroom-logo img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.logo-fallback {
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.sidebar-separator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.sidebar-brand-text h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-brand-text p {
    font-size: 14px;
    margin: 2px 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.sidebar-close-btn {
    position: absolute;
    top: 24px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Class Quick Info Section */
.sidebar-section {
    padding: 20px;
}

.class-quick-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.class-avatar-sidebar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.class-avatar-sidebar:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

.class-details-sidebar {
    flex: 1;
    color: white;
}

.sidebar-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sidebar-name-wrap h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.sidebar-name-wrap .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-name-wrap .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.class-details-sidebar p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
}

.class-code-sidebar {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.class-code-sidebar:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Navigation Section */
.sidebar-nav {
    padding: 0 20px 20px;
}

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

.sidebar-nav-header {
    margin-bottom: 12px;
}

.sidebar-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.sidebar-nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(4px);
}

.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-item-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.sidebar-nav-item.active .nav-item-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* Màu sắc phân biệt cho từng navigation item */
.sidebar-nav-item.nav-stream {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.1) 100%);
    border-left: 3px solid #4a90e2;
}

.sidebar-nav-item.nav-stream .nav-item-icon {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
}

.sidebar-nav-item.nav-assignments {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2) 0%, rgba(245, 166, 35, 0.1) 100%);
    border-left: 3px solid #f5a623;
}

.sidebar-nav-item.nav-assignments .nav-item-icon {
    background: linear-gradient(135deg, #f5a623, #e67e22);
    color: white;
}

.sidebar-nav-item.nav-materials {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(39, 174, 96, 0.1) 100%);
    border-left: 3px solid #27ae60;
}

.sidebar-nav-item.nav-materials .nav-item-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.sidebar-nav-item.nav-people {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2) 0%, rgba(155, 89, 182, 0.1) 100%);
    border-left: 3px solid #9b59b6;
}

.sidebar-nav-item.nav-people .nav-item-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.sidebar-nav-item.nav-grades {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(231, 76, 60, 0.1) 100%);
    border-left: 3px solid #e74c3c;
}

.sidebar-nav-item.nav-grades .nav-item-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* Enhanced hover effects với màu riêng */
.sidebar-nav-item.nav-stream:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3) 0%, rgba(74, 144, 226, 0.15) 100%);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.sidebar-nav-item.nav-assignments:hover {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.3) 0%, rgba(245, 166, 35, 0.15) 100%);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.3);
}

.sidebar-nav-item.nav-materials:hover {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.3) 0%, rgba(39, 174, 96, 0.15) 100%);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.sidebar-nav-item.nav-people:hover {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3) 0%, rgba(155, 89, 182, 0.15) 100%);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
}

.sidebar-nav-item.nav-grades:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(231, 76, 60, 0.15) 100%);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

/* Hiệu ứng đặc biệt khi hover icon */
.sidebar-nav-item:hover .nav-item-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sidebar-nav-item.active .nav-item-icon {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* Arrow animation */
.nav-item-arrow {
    opacity: 0;
    transition: all 0.3s ease;
}

.sidebar-nav-item:hover .nav-item-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.sidebar-nav-item.active .nav-item-arrow {
    opacity: 1;
}

.nav-item-content {
    flex: 1;
}

.nav-item-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.nav-item-desc {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.nav-item-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.sidebar-nav-item:hover .nav-item-arrow {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

/* Social Actions */
.sidebar-social-actions {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Ẩn social actions ở desktop */
.mobile-only-social {
    display: none;
}

/* Hiện social actions chỉ trên mobile và tablet */
@media (max-width: 1024px) {
    .mobile-only-social {
        display: flex;
    }
}

/* Desktop sidebar toggle functionality */
@media (min-width: 1025px) {
    .sidebar.mobile-sidebar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    }
    
    .sidebar.mobile-sidebar:not(.active) {
        transform: translateX(-100%) !important;
        opacity: 0;
        pointer-events: none;
    }
    
    .sidebar.mobile-sidebar.active {
        transform: translateX(0) !important;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Tăng z-index cho toast notifications - cao hơn header (1200) */
.classroom-friend-toast,
.toast,
.notification-toast,
div[class*="toast"],
.friend-toast,
.notification-modal,
.mobile-notification-modal,
.notification-dropdown,
[id*="toast"],
[class*="Toast"],
[class*="notification"] {
    z-index: 999999 !important;
    position: fixed !important;
}

/* Đảm bảo tất cả popup/modal có z-index cao */
.modal-overlay,
.popup,
.dropdown,
div[style*="z-index"] {
    z-index: 999999 !important;
}

.social-btn {
    flex: 1;
    min-width: 70px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-btn i {
    font-size: 16px;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Notification Widget - Complete Layout Reset */
.noti-widget-container {
    display: inline-flex !important;
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 4px !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

.noti-widget-container .notification-widget {
    display: inline-flex !important;
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Style the notification bell button inside widget to match action-btn */
.noti-widget-container .noti-bell-btn,
.noti-widget-container #noti-bell,
.noti-widget-container button {
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.noti-widget-container .noti-bell-btn:hover,
.noti-widget-container #noti-bell:hover,
.noti-widget-container button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.noti-widget-container .noti-bell-btn svg,
.noti-widget-container #noti-bell svg,
.noti-widget-container button svg {
    width: 20px !important;
    height: 20px !important;
    color: white !important;
    fill: white !important;
}

/* Override NotificationUI injected styles */
.header-actions .notification-widget,
.header-actions .noti-widget-container .notification-widget {
    display: inline-flex !important;
    position: relative !important;
    background: transparent !important;
    width: 44px !important;
    height: 44px !important;
}

/* Header Action Buttons - Desktop */
.header-actions .action-btn,
.header-actions .noti-bell-btn,
.header-actions #noti-bell,
.header-actions #notiBell,
.header-actions #friendRequestBtn,
.header-actions #messageBtn,
.header-actions #settingsBtn {
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    padding: 0 !important;
    margin: 0 4px !important;
    outline: none !important;
    box-shadow: none !important;
}

.header-actions .action-btn:hover,
.header-actions .noti-bell-btn:hover,
.header-actions #noti-bell:hover,
.header-actions #notiBell:hover,
.header-actions #friendRequestBtn:hover,
.header-actions #messageBtn:hover,
.header-actions #settingsBtn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.header-actions .action-btn i,
.header-actions .noti-bell-btn svg,
.header-actions #noti-bell svg,
.header-actions #notiBell i,
.header-actions #notiBell svg {
    font-size: 1.125rem !important;
    color: white !important;
    width: 20px !important;
    height: 20px !important;
}

/* Notification badge in header */
.header-actions .noti-badge,
.header-actions #noti-badge,
.header-actions #notiBadge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 18px !important;
    height: 18px !important;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 5px !important;
    border: 2px solid #667eea !important;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4) !important;
}

.header-actions .noti-badge:empty,
.header-actions .noti-badge[style*="display: none"],
.header-actions #noti-badge:empty,
.header-actions #noti-badge[style*="display: none"] {
    display: none !important;
}

/* Notification Dropdown - positioned correctly */
.header-actions .noti-dropdown,
.noti-widget-container .noti-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    min-width: 320px !important;
    max-width: 400px !important;
    max-height: 480px !important;
    overflow: hidden !important;
}

/* Friend dropdown (desktop) - positioned in header */
.header-actions .qm-friend-dropdown,
.qm-friend-dropdown {
    position: absolute !important;
    display: none;
    min-width: 280px !important;
    max-width: 360px !important;
    background: var(--surface, #ffffff) !important;
    border: 1px solid var(--border, #e5e7eb) !important;
    border-radius: var(--radius-lg, 12px) !important;
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)) !important;
    z-index: 9999 !important;
    padding: var(--space-sm, 8px) 0 !important;
    color: var(--text-primary, #1f2937) !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
}

.qm-friend-dropdown.show {
    display: block !important;
}

.qm-friend-dropdown .qm-friend-header {
    padding: var(--space-md, 12px) var(--space-lg, 16px);
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.qm-friend-dropdown .qm-friend-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-md, 12px);
    padding: var(--space-md, 12px) var(--space-lg, 16px);
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    color: var(--text-primary, #1f2937);
    text-align: left;
    font-size: var(--font-sm, 0.875rem);
}

.qm-friend-dropdown .qm-friend-item:hover {
    background: var(--surface-hover, #f9fafb);
}

.qm-friend-dropdown .qm-friend-item i {
    width: 20px;
    color: var(--primary-color, #3b82f6);
}

.qm-friend-dropdown .qm-friend-badge {
    margin-left: auto;
    background: var(--warning-color, #f59e0b);
    color: var(--text-inverse, #ffffff);
    border-radius: var(--radius-full, 9999px);
    padding: 2px 6px;
    font-size: var(--font-xs, 12px);
    line-height: 1;
}

/* Header actions container - ensure proper flex layout */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.header-actions.hidden {
    display: none !important;
}

/* ============================================
   DMCA NOTICE STYLING
   ============================================ */

/* Prominent DMCA Notice */
.dmca-notice {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15) 0%, rgba(142, 68, 173, 0.1) 100%);
    border: 2px solid #9b59b6;
    border-left: 4px solid #9b59b6;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 12px 0;
    font-size: 13px;
    color: #7d3c98;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2);
    transition: all 0.3s ease;
}

.dmca-notice {
    border-left: 4px solid #9b59b6;
}

.dmca-notice:hover {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.25) 0%, rgba(142, 68, 173, 0.2) 100%);
    border-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.3);
}

.dmca-notice-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.dmca-notice-text {
    flex: 1;
    line-height: 1.4;
    font-weight: 500;
}

.dmca-notice-link {
    color: #d35400;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px dotted #d35400;
}

.dmca-notice-link:hover {
    color: #a04000;
    border-bottom: 1px solid #a04000;
    text-decoration: none;
}

/* Glassmorphism Footer */
.simple-footer {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1) !important;
    padding: 25px 20px !important;
    text-align: center !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-top: 50px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: both !important;
    position: relative !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
}

.simple-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.1) 100%) !important;
    pointer-events: none;
    z-index: -1;
}

.simple-footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    margin: 0 12px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    font-weight: 500 !important;
}

.simple-footer a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.simple-footer a:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3) !important;
}

.simple-footer a:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .simple-footer {
        padding: 20px 15px !important;
        font-size: 12px !important;
        letter-spacing: 0.3px !important;
    }
    
    .simple-footer a {
        margin: 0 8px !important;
        padding: 3px 6px !important;
    }
}

/* Ensure sidebar toggle button is visible and on top on mobile */
@media (max-width: 768px) {
    .header { z-index: 1300 !important; }
    .header-left { display: flex !important; }
    .desktop-sidebar-toggle {
        display: inline-flex !important;
        z-index: 1301 !important; /* above overlays (1100) */
    }
}

/* QAM: enforce full visibility and spacing even if remote styles differ */
.qam-container { overflow: visible !important; }
.qam-sub-buttons { overflow: visible !important; max-height: none !important; }
@media (max-width: 768px) {
    .qam-container.mobile-only .qam-sub-buttons {
        bottom: 100px !important; /* more clearance above main button */
        gap: 20px !important;    /* ensure no visual overlap */
    }
}

/* QAM stacking: avoid visual occlusion due to transform-created stacking contexts */
.qam-sub-btn { position: relative !important; z-index: 1 !important; }
.qam-sub-btn.qam-btn-notification { z-index: 2 !important; }
.qam-sub-btn.qam-btn-friend { z-index: 3 !important; }
.qam-sub-btn.qam-btn-chat { z-index: 4 !important; }

/* DMCA badge inside simple footer */
.simple-footer .dmca-badge {
    position: static !important; /* override any absolute rules */
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 6px !important;
    margin-left: 8px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.simple-footer .dmca-badge:hover {
    transform: translateY(-1px) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.simple-footer .dmca-badge img {
    height: 18px !important;
    width: auto !important;
    display: block !important;
}

/* DMCA Badge (for media) */
.dmca-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
}

.dmca-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}

/* Responsive DMCA */
@media (max-width: 768px) {
    .dmca-notice {
        padding: 12px 16px;
        font-size: 12px;
        margin: 8px 0;
    }
    
    .dmca-notice-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .simple-footer {
        padding: 15px 0;
    }

    .simple-footer .dmca-badge {
        display: inline-flex !important;
        margin-top: 8px !important;
        margin-left: 6px !important;
        padding: 2px 6px !important;
    }
    
    .simple-footer .dmca-badge img {
        height: 16px !important;
    }
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 0 20px 24px;
}

.create-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.create-btn i {
    font-size: 16px;
}

/* Scrollbar Styling */
.sidebar.mobile-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar.mobile-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Mobile Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar.mobile-sidebar {
        width: 320px;
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .sidebar-section {
        padding: 16px;
    }
    
    .sidebar-nav {
        padding: 0 16px 16px;
    }
    
    .sidebar-social-actions {
        padding: 0 16px 16px;
    }
    
    .sidebar-actions {
        padding: 0 16px 20px;
    }
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.assignment-status {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: var(--success-light);
    color: var(--success-color);
}

.status-draft {
    background: var(--warning-light);
    color: var(--warning-color);
}

.status-closed {
    background: var(--danger-light);
    color: var(--danger-color);
}

.assignment-title {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.3;
}

.assignment-description {
    color: var(--text-secondary);
    font-size: var(--font-sm);
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.assignment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.assignment-actions {
    display: flex;
    gap: var(--space-sm);
}

.action-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-btn:hover {
    background: var(--background-alt);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-color: transparent;
}

.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

/* ============================================
   PEOPLE SECTION
   ============================================ */

.people-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-3xl);
}

@media (max-width: 1024px) {
    .people-container {
        grid-template-columns: 1fr;
    }
}

.people-list {
    display: grid;
    gap: var(--space-lg);
}

.person-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.person-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.person-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 600;
    font-size: var(--font-lg);
    position: relative;
}

.person-info {
    flex: 1;
}

.person-name {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
}

.person-email {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-xs) 0;
}

.person-role {
    display: inline-flex;
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
}

.person-actions {
    display: flex;
    gap: var(--space-sm);
}

.person-action {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--background-alt);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.person-action:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* People Sidebar */
.people-sidebar {
    space-y: var(--space-2xl);
}

.invite-section {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
}

.invite-input {
    width: 100%;
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--font-sm);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
}

.invite-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.invite-btn {
    width: 100%;
    padding: var(--space-lg);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.invite-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

/* ============================================
   MATERIALS SECTION
   ============================================ */

.materials-container {
    display: grid;
    gap: var(--space-3xl);
}

.materials-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-2xl);
}

.materials-view-toggle {
    display: flex;
    background: var(--background-alt);
    border-radius: var(--radius);
    padding: var(--space-xs);
}

.view-toggle-btn {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.view-toggle-btn.active {
    background: var(--surface);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.upload-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-2xl);
}

.material-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.material-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: var(--font-xl);
    margin-bottom: var(--space-lg);
}

.material-name {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.3;
}

.material-meta {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.material-actions {
    display: flex;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.material-card:hover .material-actions {
    opacity: 1;
}

.material-action {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background-alt);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-action:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* ============================================
   GRADES SECTION
   ============================================ */

.grades-container {
    display: grid;
    gap: var(--space-3xl);
}

.grades-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.grade-stat {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
}

.grade-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.grade-value {
    font-size: var(--font-4xl);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.grade-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.grades-table {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.table-header {
    background: var(--background-alt);
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border);
}

.table-title {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.table-content {
    overflow-x: auto;
}

.grades-data-table {
    width: 100%;
    border-collapse: collapse;
}

.grades-data-table th,
.grades-data-table td {
    padding: var(--space-lg) var(--space-2xl);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.grades-data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grades-data-table td {
    color: var(--text-primary);
    font-size: var(--font-sm);
}

.grades-data-table tr:hover {
    background: var(--background-alt);
}

.grade-score {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-xs);
}

.grade-excellent {
    background: var(--success-light);
    color: var(--success-color);
}

.grade-good {
    background: var(--info-light);
    color: var(--info-color);
}

.grade-average {
    background: var(--warning-light);
    color: var(--warning-color);
}

.grade-poor {
    background: var(--danger-light);
    color: var(--danger-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .classroom-content {
        padding: var(--space-lg);
        margin-left: 0;
    }
    
    .class-header {
        padding: var(--space-2xl);
    }
    
    .class-info {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }
    
    .class-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .classroom-nav {
        padding: var(--space-xs);
    }
    
    .nav-tab {
        min-width: 100px;
        padding: var(--space-md);
        font-size: var(--font-xs);
    }
    
    .stream-container,
    .people-container {
        grid-template-columns: 1fr;
    }
    
    .assignments-grid,
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .grades-overview {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .assignments-header {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: stretch;
    }
    
    .materials-toolbar {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .classroom-content {
        padding: var(--space-md);
    }
    
    .class-header {
        padding: var(--space-lg);
    }
    
    .class-details h1 {
        font-size: var(--font-2xl);
    }
    
    .class-avatar {
        width: 60px;
        height: 60px;
        font-size: var(--font-xl);
    }
    
    .post-composer,
    .stream-post,
    .assignment-card,
    .material-card,
    .person-card {
        padding: var(--space-lg);
    }
    
    .composer-actions {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .assignment-actions,
    .material-actions {
        flex-wrap: wrap;
    }
}

/* ============================================
   ANIMATIONS & INTERACTIONS
   ============================================ */

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, var(--background-alt) 25%, var(--border-light) 50%, var(--background-alt) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-6 { margin-bottom: var(--space-2xl); }

/* ============================================
   POST CREATOR ENHANCED STYLING
   ============================================ */

.post-creator-enhanced {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #e4e6ea;
    margin-bottom: 16px;
    position: relative;
}

/* Remove decorative border */

/* Simple Facebook-style layout */
.post-creator-enhanced .creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e4e6ea;
    padding-top: 12px;
    margin-top: 12px;
}

/* Post input container with embedded visibility selector */
.post-input-container {
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.textarea-wrapper {
    position: relative;
}

.textarea-wrapper .post-input-enhanced {
    width: 100%;
    margin: 0;
    padding-bottom: 40px; /* Make space for embedded selector */
}

/* Embedded visibility selector inside textarea */
.post-visibility-embedded {
    position: absolute;
    bottom: 8px;
    left: 12px;
    z-index: 2;
}

.post-visibility-embedded select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e4e6ea;
    border-radius: 12px;
    padding: 4px 20px 4px 8px;
    color: #65676b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    backdrop-filter: blur(10px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-visibility-embedded select:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #1877f2;
}

.post-visibility-embedded select:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.post-creator-enhanced .btn-post {
    align-self: flex-end;
    margin-left: auto;
}

.creator-actions {
    display: flex;
}

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

.action-buttons .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #65676b;
    font-weight: 500;
    flex: 1;
    justify-content: center;
}

.action-buttons .action-btn:hover {
    background: #f2f3f5;
    color: #1c1e21;
}

.action-buttons .action-btn.active {
    background: #e7f3ff;
    color: #1877f2;
}

.action-buttons .action-btn i {
    font-size: 20px;
}

/* Labels for action buttons */
.action-buttons .action-btn[data-type="text"]::after {
    content: "Bài viết";
    font-size: 13px;
    font-weight: 500;
}

.action-buttons .action-btn[data-type="poll"]::after {
    content: "Khảo sát";
    font-size: 13px;
    font-weight: 500;
}

.action-buttons .action-btn[data-type="announcement"]::after {
    content: "Thông báo";
    font-size: 13px;
    font-weight: 500;
}

.action-buttons .action-btn[data-type="file"]::after {
    content: "Đính kèm";
    font-size: 13px;
    font-weight: 500;
}

/* Responsive fixes: prevent overflow on mobile */
@media (max-width: 768px) {
    .post-creator-enhanced {
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px;
    }

    .post-creator-enhanced .creator-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .creator-actions { width: 100%; }

    .action-buttons {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 6px; /* keep icons from hitting edge */
    }

    .action-buttons .action-btn {
        flex: 0 0 auto; /* don't stretch causing overflow */
        min-width: 72px; /* readable label width */
    }

    .post-input-container {
        gap: 8px;
    }

    .textarea-wrapper { min-width: 0; }

    .post-creator-enhanced .btn-post {
        width: 100%;
        align-self: stretch;
    }
}

/* Color coding for different action types */
.action-buttons .action-btn[data-type="file"] i {
    color: #41b883;
}

.action-buttons .action-btn[data-type="poll"] i {
    color: #f7b731;
}

.action-buttons .action-btn[data-type="announcement"] i {
    color: #e74c3c;
}

.creator-controls {
    display: flex;
    align-items: center;
}

.post-visibility-selector select {
    background: #f0f2f5;
    border: none;
    border-radius: 6px;
    padding: 6px 24px 6px 8px;
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 12px;
}

.post-visibility-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.post-input-enhanced {
    width: 100%;
    min-height: 40px;
    border: 1px solid #e4e6ea;
    border-radius: 24px;
    padding: 10px 16px;
    background: #f0f2f5;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.33;
    resize: none;
    transition: all 0.2s ease;
    margin: 0;
}

.post-input-enhanced:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 1px #1877f2;
}

.post-input-enhanced::placeholder {
    color: #8a8d91;
    font-style: normal;
}

.btn-post {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 16px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    height: 32px;
}

.btn-post:hover:not(:disabled) {
    background: #166fe5;
}

.btn-post:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e4e6ea;
    color: #bcc0c4;
}

/* ============================================
   EMPTY POSTS FEED STYLING
   ============================================ */

.posts-feed {
    min-height: 300px;
}

.posts-feed:empty::before {
    content: "";
    display: block;
    width: 100%;
    height: 300px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    position: relative;
}

.posts-feed:empty::after {
    content: "👋 Chưa có bài viết nào\A\AFeed của lớp học sẽ hiển thị ở đây khi có bài viết mới";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-base);
    white-space: pre-line;
    line-height: 1.6;
}

/* When there are posts, remove the empty state */
.posts-feed:not(:empty)::before,
.posts-feed:not(:empty)::after {
    display: none;
}

@media (max-width: 768px) {
    .action-buttons {
        justify-content: center;
        gap: var(--space-md);
    }
    
    .action-buttons .action-btn {
        min-width: 85px;
        min-height: 80px;
        padding: var(--space-md);
        flex: 0 0 auto;
    }
    
    .action-buttons .action-btn i {
        font-size: 1.25rem;
    }
    
    .creator-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   TOGGLEABLE SIDEBAR SYSTEM
   ============================================ */

.toggleable-sidebar {
    transform: translateX(100%);
    transition: transform var(--transition-base);
    position: fixed;
    top: 70px; /* Account for header height */
    right: 0;
    width: 380px;
    height: calc(100vh - 70px);
    background: var(--surface);
    border-left: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow-y: auto;
}

.toggleable-sidebar.open {
    transform: translateX(0);
}

.toggleable-sidebar.closing {
    transform: translateX(100%);
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-inverse);
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    font-size: 1.2rem;
}

.sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-colored);
}

.sidebar-toggle-btn.active {
    right: 400px;
    background: var(--accent-color);
}

.sidebar-toggle-btn.active i::before {
    content: "\f00d"; /* times icon */
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Friend panel specific styling */
.friend-panel.toggleable-sidebar {
    padding: 0;
    background: var(--surface);
}

.friend-panel .friend-panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--space-2xl);
}

/* Friend panel header replacement */
.friend-panel .friend-panel-content::before {
    content: "👥 Quản lý bạn bè";
    display: block;
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-light);
    margin-bottom: var(--space-2xl);
    text-align: center;
}

/* Friend content styling */
.friend-panel .friend-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.friend-panel .friend-tab {
    flex: 1;
    padding: var(--space-md);
    background: var(--background-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    font-size: var(--font-sm);
}

.friend-panel .friend-tab.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

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

.friend-panel .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    text-align: center;
}

.friend-panel .empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

/* Friend tab content */
.friend-panel .friend-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.friend-panel .friend-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Search friends styling */
.search-friends {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-input-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.search-input {
    flex: 1;
    padding: var(--space-lg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: all var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-btn {
    padding: var(--space-lg);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 50px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

/* Friend list items */
.friend-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.friend-item:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 600;
    font-size: var(--font-lg);
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.friend-status {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.friend-actions {
    display: flex;
    gap: var(--space-sm);
}

.friend-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius);
    background: var(--background-alt);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-action-btn:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: scale(1.1);
}

/* Responsive behavior */
@media (max-width: 768px) {
    .toggleable-sidebar {
        width: 100%;
        top: 0;
        height: 100vh;
    }
    
    .sidebar-toggle-btn.active {
        right: 20px;
    }
    
    .friend-panel .friend-panel-content {
        padding-top: calc(var(--space-2xl) + 70px); /* Account for header on mobile */
    }
    
    .friend-panel .friend-tabs {
        flex-direction: column;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        min-width: auto;
    }
}

/* ============================================
   POLL CREATOR STYLING
   ============================================ */

.poll-creator-enhanced {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    max-width: 600px;
}

.poll-creator-enhanced.hidden {
    display: none;
}

.poll-creator-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.poll-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.poll-header h3 i {
    color: var(--accent-color);
}

.close-poll-creator {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--danger-light);
    color: var(--danger-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.close-poll-creator:hover {
    background: var(--danger-color);
    color: var(--text-inverse);
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
    font-size: var(--font-base);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.poll-options {
    margin-bottom: 16px;
}

.poll-option {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.poll-option input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--background-alt);
    transition: border-color 0.2s ease;
    font-size: 14px;
}

.poll-option input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--surface);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.remove-option {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--danger-light);
    color: var(--danger-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-option:hover:not(:disabled) {
    background: var(--danger-color);
    color: var(--text-inverse);
    transform: scale(1.1);
}

.remove-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--accent-light);
    color: var(--accent-color);
    border: 1px dashed var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: var(--space-xl);
}

.btn-add-option:hover {
    background: var(--accent-color);
    color: var(--text-inverse);
    border-style: solid;
    transform: translateY(-1px);
}

.poll-settings {
    background: var(--background-alt);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.settings-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.form-check {
    flex: 1;
    position: relative;
}

/* Hide the default checkbox */
.form-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom card-style checkbox */
.form-check label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* Add icon before text */
.form-check label::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Icons for different options */
.form-check label[for="allowMultipleVotes"]::before {
    content: "\f0c5"; /* copy/multiple icon */
    color: var(--info-color);
}

.form-check label[for="anonymousVoting"]::before {
    content: "\f21b"; /* user-secret icon */
    color: var(--accent-color);
}

/* Hover state */
.form-check label:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Active/checked state */
.form-check input[type="checkbox"]:checked + label {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-colored);
    transform: translateY(-1px);
}

.form-check input[type="checkbox"]:checked + label::before {
    color: var(--text-inverse);
    transform: scale(1.1);
}

/* Add checkmark overlay when selected */
.form-check input[type="checkbox"]:checked + label::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xs);
    color: var(--text-inverse);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--background-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-primary {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

/* ============================================
   ENHANCED FRIEND PANEL DESIGN
   ============================================ */

.friend-panel.toggleable-sidebar {
    background: linear-gradient(180deg, var(--surface) 0%, var(--background-alt) 100%);
    border-left: 1px solid var(--border-light);
    box-shadow: var(--shadow-2xl);
}

.friend-panel .friend-panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Enhanced header with gradient */
.friend-panel .friend-panel-content::before {
    content: "👥 Quản lý bạn bè";
    display: block;
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--text-inverse);
    background: var(--gradient-primary);
    padding: var(--space-2xl);
    margin: 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

/* Tab styling */
.friend-panel .friend-tabs {
    display: flex;
    gap: 0;
    margin: var(--space-lg);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xs);
    box-shadow: var(--shadow-sm);
}

.friend-panel .friend-tab {
    flex: 1;
    padding: var(--space-lg) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    font-size: var(--font-sm);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.friend-panel .friend-tab:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.friend-panel .friend-tab.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.friend-panel .friend-tab i {
    font-size: var(--font-base);
}

/* Content area */
.friend-panel .friend-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--space-lg) var(--space-lg);
}

.friend-panel .friend-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Search section */
.search-friends {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-input-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    background: var(--surface);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.search-input {
    flex: 1;
    padding: var(--space-lg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: all var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-btn {
    padding: var(--space-lg);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: var(--shadow-colored);
}

/* Empty states */
.friend-panel .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: var(--space-3xl);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-light);
    margin: var(--space-lg) 0;
}

.friend-panel .empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-xl);
    color: var(--primary-color);
    opacity: 0.6;
}

.friend-panel .empty-state h4 {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.friend-panel .empty-state p {
    color: var(--text-muted);
    font-size: var(--font-sm);
    line-height: 1.5;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .friend-panel .friend-tabs {
        margin: var(--space-md);
    }
    
    .friend-panel .friend-tab {
        padding: var(--space-md) var(--space-sm);
        font-size: var(--font-xs);
    }
    
    .search-input-group {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    /* Poll settings responsive */
    .settings-row {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .form-check label {
        min-height: 70px;
        padding: var(--space-lg);
        font-size: var(--font-sm);
    }
    
    .form-check label::before {
        font-size: 1.25rem;
    }
}

/* ===== POSTS FEED STYLES ===== */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-lg);
}

.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.post-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.post-item.discussion::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* Post Header */
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.post-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.post-author .avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.post-author .avatar:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.author-info h4 {
  margin: 0;
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-primary);
}

.post-time {
  font-size: var(--font-xs);
  color: var(--text-muted);
  opacity: 0.8;
}

/* Post Actions Dropdown */
.post-actions-dropdown {
  position: relative;
}

.post-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.post-menu-btn:hover {
  background: var(--background-alt);
  color: var(--text-primary);
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 120px;
  z-index: 100;
  display: none;
}

.post-menu-dropdown.show {
  display: block;
  animation: dropdownSlide 0.2s ease;
}

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

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-sm);
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: var(--background-alt);
  color: var(--text-primary);
}

.menu-item.danger {
  color: var(--danger-color);
}

.menu-item.danger:hover {
  background: var(--danger-light);
  color: var(--danger-color);
}

/* Post Content */
.post-content {
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.post-content p {
  margin: 0 0 var(--space-md) 0;
  color: var(--text-secondary);
  font-size: var(--font-md);
}

.post-content p:last-child {
  margin-bottom: 0;
}

/* Post Attachments */
.post-attachments {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--background-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.attachment-item:hover {
  background: var(--surface);
}

.attachment-item i {
  color: var(--danger-color);
  font-size: var(--font-lg);
}

.attachment-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-sm);
}

.attachment-item a:hover {
  text-decoration: underline;
}

/* Post Actions */
.post-actions {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.action-btn-post {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  transition: all 0.2s ease;
  font-weight: 500;
}

.action-btn-post:hover {
  background: var(--background-alt);
  color: var(--text-primary);
}

.action-btn-post.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.action-btn-post i {
  font-size: var(--font-md);
}

.reaction-count,
.action-btn-post span {
  font-size: var(--font-sm);
  font-weight: 600;
}

/* Reaction Icons */
.reaction-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.reaction-icon {
  display: inline-flex;
  align-items: center;
}

.reaction-icon .icon {
  font-size: var(--font-sm);
}

/* No Reactions State */
.no-reactions .reaction-count {
  color: var(--text-muted);
}

/* Post Comments */
.post-comments {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  background: var(--background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.comments-list {
  margin-bottom: var(--space-lg);
}

.comment-input-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.comment-input-container .avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1px solid var(--border);
}

.comment-input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--font-sm);
  outline: none;
  transition: all 0.2s ease;
}

.comment-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-comment-btn {
  background: var(--primary-color);
  border: none;
  color: var(--text-inverse);
  padding: var(--space-sm);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-comment-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* ===== COMMENT SYSTEM STYLES ===== */
.comment-item {
  margin-bottom: var(--space-lg);
  position: relative;
}

.comment-content {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  transition: all 0.2s ease;
}

.comment-content:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Comment Author */
.comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.comment-author .avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  transition: all 0.2s ease;
}

.comment-author .avatar:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.comment-author strong {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-sm);
}

.comment-time {
  font-size: var(--font-xs);
  color: var(--text-muted);
  opacity: 0.8;
  margin-left: auto;
}

/* Comment Text */
.comment-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

/* Comment Actions */
.comment-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.comment-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  transition: all 0.2s ease;
  font-weight: 500;
}

.comment-action-btn:hover {
  background: var(--background-alt);
  color: var(--text-primary);
}

.comment-action-btn.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.comment-action-btn i {
  font-size: var(--font-xs);
}

.comment-reaction-count {
  font-size: var(--font-xs);
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.comment-react-btn.active {
  color: var(--primary-color);
}

.comment-reply-btn span {
  font-size: var(--font-xs);
}

/* Comment Replies */
.comment-replies {
  margin-top: var(--space-md);
  margin-left: var(--space-xl);
  padding-left: var(--space-lg);
  border-left: 3px solid var(--border-light);
  position: relative;
}

.comment-replies::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, 
    var(--primary-color) 0%, 
    var(--accent-color) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.comment-replies:hover::before {
  opacity: 1;
}

.comment-replies .comment-item {
  margin-bottom: var(--space-md);
}

.comment-replies .comment-content {
  background: var(--background-alt);
  border-color: var(--border);
  padding: var(--space-md);
}

.comment-replies .comment-author .avatar {
  width: 32px;
  height: 32px;
}

/* Nested replies styling */
.comment-replies .comment-replies {
  margin-left: var(--space-lg);
  padding-left: var(--space-md);
  border-left-width: 2px;
}

.comment-replies .comment-replies .comment-content {
  background: var(--surface);
  padding: var(--space-sm) var(--space-md);
}

.comment-replies .comment-replies .comment-author .avatar {
  width: 28px;
  height: 28px;
}

/* Comment Input Enhancement */
.comment-input-container {
  position: relative;
}

.comment-input-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, 
    var(--primary-color) 0%, 
    var(--accent-color) 100%
  );
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.comment-input-container:focus-within::before {
  opacity: 1;
}

.comment-input-container:focus-within .comment-input {
  border-color: transparent;
  background: var(--surface);
}

/* Loading states for comments */
.comment-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.comment-action-btn.loading i {
  animation: spin 1s linear infinite;
}

/* Empty comments state */
.comments-list:empty::before {
  content: 'No comments yet. Be the first to comment!';
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-xl);
  background: var(--background-alt);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

/* Comment animations */
.comment-item {
  animation: slideInComment 0.3s ease;
}

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

/* Posts & Comments Responsive Design */
@media (max-width: 768px) {
  .posts-feed {
    padding: var(--space-md);
    gap: var(--space-lg);
  }
  
  .post-item {
    padding: var(--space-lg);
  }
  
  .post-author .avatar {
    width: 40px;
    height: 40px;
  }
  
  .post-actions {
    gap: var(--space-md);
  }
  
  .action-btn-post {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-xs);
  }
  
  .comment-replies {
    margin-left: var(--space-lg);
    padding-left: var(--space-md);
  }
  
  .comment-content {
    padding: var(--space-md);
  }
  
  .comment-author .avatar {
    width: 32px;
    height: 32px;
  }
  
  .comment-replies .comment-author .avatar {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  
  .post-actions-dropdown {
    align-self: flex-end;
  }
  
  .comment-input-container {
    gap: var(--space-sm);
  }
  
  .comment-input-container .avatar {
    width: 28px;
    height: 28px;
  }
  
  .comment-replies {
    margin-left: var(--space-md);
    padding-left: var(--space-sm);
  }
  
  .comment-content {
    padding: var(--space-sm) var(--space-md);
  }
  
  .comment-actions {
    gap: var(--space-sm);
  }
  
  .comment-action-btn {
    padding: var(--space-xs);
    font-size: 0.7rem;
  }
  
  .comment-time {
    font-size: 0.65rem;
  }
}