* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --hover: #f1f5f9;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--hover);
    color: var(--text);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.user-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--hover);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.category-icon i {
    font-size: 1.5rem;
    color: white;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.category-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

.page-header h2 {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text);
    font-weight: 700;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text);
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--hover);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body.dark-theme .filter-btn {
    background: var(--card-bg);
    color: var(--text);
}

body.gradient-theme .filter-btn {
    background: rgba(26, 26, 46, 0.6);
    color: var(--text);
    border-color: rgba(59, 130, 246, 0.3);
}

body.gradient-theme .filter-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

body.dark-theme .filter-btn.active {
    background: var(--primary);
    color: white;
}

/* Threads Container */
.threads-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thread-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.thread-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.thread-title {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.thread-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.thread-tag {
    padding: 0.25rem 0.625rem;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.thread-content {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.thread-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.thread-stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.thread-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.thread-modal .modal-content {
    max-width: 800px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.25rem;
}

.close-btn:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--bg);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.code-input {
    font-family: 'Courier New', monospace;
    background: #f8fafc;
    font-size: 0.875rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Code Block */
.code-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .user-actions {
        width: 100%;
    }

    .glitch {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-container {
        padding: 1.5rem;
    }

    .stats-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Search Bar */
.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.2s;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.875rem;
}

/* Profile Page */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.profile-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-size: cover;
    background-position: center;
}

.profile-banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--card-bg));
}

.profile-content {
    position: relative;
    padding: 2rem;
    padding-top: 140px;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-avatar-container {
    position: relative;
    margin-top: -80px;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.profile-avatar-large {
    width: 160px;
    height: 160px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: white;
    background-size: cover;
    background-position: center;
    border: 6px solid var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-music-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s;
    z-index: 10;
}

.profile-music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-music-btn.playing {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text);
}

.profile-bio {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.profile-stat span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.profile-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.profile-tab:hover {
    color: var(--text);
}

.profile-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.profile-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat/Messages Styles */
.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    height: 600px;
    max-height: calc(100vh - 200px);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.chat-sidebar {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.chat-sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h3 {
    font-size: 1.125rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--hover);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
}

.chat-search {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.chat-search .search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.chat-search .search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 0.75rem;
    align-items: start;
}

.conversation-item:hover {
    background: var(--hover);
}

.conversation-item.active {
    background: var(--primary);
    color: white;
}

.conversation-item.active * {
    color: white !important;
}

.conversation-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.conversation-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.conversation-preview {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.unread .conversation-preview {
    font-weight: 600;
    color: var(--text);
}

.unread-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    height: 100%;
    overflow: hidden;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.chat-conversation {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    flex-shrink: 0;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    background-size: cover;
    background-position: center;
}

.chat-user-info h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.chat-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-status.online {
    color: #10b981;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 70%;
}

.message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.message-content {
    flex: 1;
}

.message-bubble {
    background: var(--hover);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text);
    word-wrap: break-word;
    line-height: 1.5;
}

.message.sent .message-bubble {
    background: var(--primary);
    color: white;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0 0.5rem;
}

.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    background: var(--bg);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9375rem;
    resize: none;
    max-height: 120px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input-container .btn {
    padding: 0.75rem 1.25rem;
}

/* Moderation Tools */
.thread-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.action-btn:hover {
    background: var(--hover);
}

.action-btn.danger {
    color: #dc2626;
    border-color: #dc2626;
}

.action-btn.danger:hover {
    background: #fef2f2;
}

.action-btn.warning {
    color: #ea580c;
    border-color: #ea580c;
}

.action-btn.warning:hover {
    background: #fff7ed;
}

.pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 500;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #1e40af;
    font-weight: 500;
    margin-left: 0.5rem;
}

.owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: 1px solid #d97706;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #78350f;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Settings Page */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.settings-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.theme-option {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-option:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-option.active {
    border-color: var(--primary);
    background: var(--hover);
}

.theme-preview {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.light-preview {
    background: #f8fafc;
}

.light-preview .preview-header {
    height: 30px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.light-preview .preview-content {
    height: 90px;
    background: #f8fafc;
    padding: 10px;
}

.dark-preview {
    background: #0f172a;
}

.dark-preview .preview-header {
    height: 30px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.dark-preview .preview-content {
    height: 90px;
    background: #0f172a;
}

.gradient-preview {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.gradient-preview .preview-header {
    height: 30px;
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.gradient-preview .preview-content {
    height: 90px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.theme-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.theme-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Dark Theme */
body.dark-theme {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --border: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --hover: #334155;
}

/* Gradient Theme */
body.gradient-theme {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg: #0f0f1e;
    --card-bg: #1a1a2e;
    --border: #2d2d44;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --hover: #252538;
}

body.gradient-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
}

body.gradient-theme .navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

body.gradient-theme .stat-card,
body.gradient-theme .category-card,
body.gradient-theme .thread-card,
body.gradient-theme .modal-content,
body.gradient-theme .settings-section,
body.gradient-theme .profile-header,
body.gradient-theme .form-input,
body.gradient-theme .form-textarea {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--text);
}

body.gradient-theme .form-input::placeholder,
body.gradient-theme .form-textarea::placeholder {
    color: var(--text-muted);
}

body.gradient-theme .page-header h2,
body.gradient-theme .hero h1,
body.gradient-theme .hero p {
    color: var(--text);
}

body.gradient-theme .theme-option {
    background: rgba(26, 26, 46, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
}

body.gradient-theme .theme-option.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.2);
}

body.dark-theme .page-header h2,
body.dark-theme .hero h1,
body.dark-theme .hero p {
    color: var(--text);
}

body.dark-theme .theme-option {
    background: var(--card-bg);
}

body.dark-theme .modal-content {
    background: var(--card-bg);
}

body.dark-theme .form-input,
body.dark-theme .form-textarea {
    background: var(--hover);
    color: var(--text);
    border-color: var(--border);
}

body.dark-theme .form-input::placeholder,
body.dark-theme .form-textarea::placeholder {
    color: var(--text-muted);
}

body.gradient-theme .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

body.gradient-theme .btn-secondary {
    background: rgba(59, 130, 246, 0.2);
    color: var(--text);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark-theme .btn-secondary {
    background: var(--hover);
    color: var(--text);
}

body.gradient-theme .nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

body.gradient-theme .search-input {
    background: rgba(26, 26, 46, 0.6);
    color: var(--text);
    border-color: rgba(59, 130, 246, 0.3);
}

body.gradient-theme .search-input::placeholder {
    color: var(--text-muted);
}

body.gradient-theme .profile-header::before {
    background: rgba(0, 0, 0, 0.5);
}

body.dark-theme .profile-header::before {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-theme .search-input {
    background: var(--card-bg);
    color: var(--text);
}

body.dark-theme .search-input::placeholder {
    color: var(--text-muted);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
