* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 2000;
}

.sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1999;
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

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

.sidebar-header h2 {
    font-size: 24px;
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.sidebar-close:hover {
    background-color: #f0f0f0;
}

.sidebar-search {
    margin-bottom: 16px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #667eea;
}

.sidebar-servers {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.sidebar-servers::-webkit-scrollbar {
    width: 6px;
}

.sidebar-servers::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-servers::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar-server-item {
    margin-bottom: 8px;
}

.sidebar-server-item a {
    display: block;
    padding: 12px 14px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.sidebar-server-item a:hover {
    background-color: #f0f0f0;
}

.sidebar-server-item.active a {
    background-color: #667eea;
    color: #fff;
}

.server-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.sidebar-btn {
    padding: 10px 16px;
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    position: relative;
}

.sidebar-btn:hover {
    background-color: #333;
}

.sidebar-btn.has-badge {
    padding-right: 40px;
}

.notification-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Top Menu Bar */
.top-menu {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    line-height: 1;
}

.sidebar-toggle:hover {
    background-color: #f0f0f0;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 48px;
    object-fit: contain;
}

.current-server-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.menu-tabs {
    display: flex;
    gap: 8px;
}

.tab {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab:hover {
    background-color: #f0f0f0;
    color: #333;
}

.tab.active {
    background-color: #000;
    color: #fff;
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.username {
    font-size: 14px;
    color: #666;
}

.btn-logout {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: #e0e0e0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background-color: #fff;
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 32px;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    background-color: #f9f9f9;
    border-color: #667eea;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.radio-option span {
    font-size: 14px;
    color: #333;
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-secondary {
    padding: 12px 24px;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Feed */
.feed-container {
    max-width: 700px;
    margin: 0 auto;
}

.feed-header {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feed-header h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* Post Composer */
.post-composer {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Format Toolbar */
.format-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.format-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.format-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.format-btn:active {
    background-color: #e0e0e0;
}

/* Color Picker */
.color-picker {
    position: absolute;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    margin-top: 4px;
    min-width: 280px;
}

.color-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.color-picker-header span {
    font-weight: 600;
    font-size: 14px;
}

.color-picker-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.color-picker-header button:hover {
    background-color: #f0f0f0;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #333;
}

.custom-color {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.custom-color input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.custom-color button {
    padding: 6px 14px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-color button:hover {
    background-color: #333;
}

.post-composer textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
}

.post-composer textarea:focus {
    outline: none;
    border-color: #667eea;
}

.media-options {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.media-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.media-option input[type="radio"] {
    cursor: pointer;
}

.media-input {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.media-input input[type="file"],
.media-input input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.media-input small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
}

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

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.handle {
    font-weight: 600;
    font-size: 14px;
}

.post-time {
    font-size: 12px;
    color: #999;
}

.post-content {
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.post-content a,
.comment-content a {
    color: #667eea;
    text-decoration: underline;
}

.post-content a:hover,
.comment-content a:hover {
    color: #5568d3;
}

.post-media {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.post-media img {
    max-width: 75%;
    max-height: 1050px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

.post-media iframe {
    max-width: 75%;
    width: 75%;
    max-height: 1050px;
    height: 400px;
    border-radius: 8px;
}

.post-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-actions-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-actions-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.like-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-color: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.like-btn.liked {
    background-color: #ffe0e0;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.like-btn.liked:hover {
    background-color: #ffd0d0;
}

.delete-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-color: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.delete-btn:hover {
    background-color: #ffebee;
    border-color: #d32f2f;
    color: #d32f2f;
}

.delete-btn.delete-confirm {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: #fff;
}

.delete-btn.delete-confirm:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
}

/* Comment delete button */
.comment-delete-btn {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fff;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.comment-delete-btn:hover {
    background-color: #ffebee;
    border-color: #d32f2f;
    color: #d32f2f;
}

.comment-delete-btn.delete-confirm {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: #fff;
}

.comment-delete-btn.delete-confirm:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
}

/* Flash Messages */
.flash-messages {
    max-width: 700px;
    margin: 0 auto 24px auto;
}

.flash-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #a5d6a7;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Profile */
.profile-container {
    max-width: 700px;
    margin: 0 auto;
}

.profile-card {
    background-color: #fff;
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 48px;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.bio {
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
}

.profile-edit-form {
    width: 100%;
}

.copy-profile-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.copy-profile-section h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.copy-profile-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.copy-profile-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.copy-profile-form input:focus {
    outline: none;
    border-color: #667eea;
}

.copy-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.copy-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.copy-message.error {
    background-color: #ffebee;
    color: #d32f2f;
}

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

/* Account Settings */
.account-settings {
    background-color: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.settings-header {
    font-size: 20px;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    user-select: none;
}

.settings-header:hover {
    background-color: #f5f5f5;
}

.toggle-icon {
    font-size: 14px;
    color: #666;
    transition: transform 0.2s;
}

.settings-content {
    margin-top: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.settings-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.settings-card h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
}

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

.settings-form .form-group:last-of-type {
    margin-bottom: 20px;
}

.settings-form button {
    width: 100%;
}

.settings-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.settings-message.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.settings-message.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

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

.profile-posts {
    margin-top: 24px;
}

.profile-posts h3 {
    font-size: 20px;
    margin-bottom: 16px;
    padding: 0 4px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* Empty State */
.empty-state {
    background-color: #fff;
    padding: 48px;
    border-radius: 12px;
    text-align: center;
    color: #999;
}

/* Server Info */
.server-info {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.server-info p {
    margin-bottom: 8px;
}

.join-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 18px;
    background-color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.server-settings-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.server-settings-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.setting-info .help-text {
    margin: 0;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 8px !important;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1;
}

/* Comments */
.comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.comments-list {
    margin-bottom: 12px;
    max-height: 315px;
    overflow-y: auto;
    padding-right: 4px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.comment {
    padding: 12px 14px;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    margin-bottom: 6px;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.comment-content {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #333;
}

/* Formatting Styles */
.spoiler {
    background-color: #333;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.spoiler:hover {
    background-color: #555;
}

.spoiler.revealed {
    background-color: transparent;
    color: inherit;
}

.quote-card {
    background-color: #f5f5f5;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 4px;
}

.comment-time {
    font-size: 11px;
    color: #999;
}

.comment-compose {
    margin-top: 12px;
}

.comment-toolbar {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
    padding: 4px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.format-btn-sm {
    width: 26px;
    height: 26px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.format-btn-sm:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.format-btn-sm:active {
    background-color: #e0e0e0;
}

.comment-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.comment-textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 40px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-comment {
    padding: 8px 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-comment:hover {
    background-color: #333;
}

/* Manager UI */
.members-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
}

.members-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-info strong {
    font-size: 14px;
    color: #333;
}

.member-email {
    font-size: 12px;
    color: #666;
}

.btn-danger {
    padding: 8px 16px;
    background-color: #fff;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: #d32f2f;
    color: #fff;
}

.danger-zone {
    margin-top: 40px;
    padding: 24px;
    background-color: #fff5f5;
    border: 2px solid #ffcdd2;
    border-radius: 8px;
}

.danger-zone h2 {
    font-size: 18px;
    color: #d32f2f;
    margin-bottom: 8px;
}

.danger-zone .help-text {
    color: #666;
    margin-bottom: 16px !important;
}

.btn-danger-large {
    padding: 12px 24px;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger-large:hover {
    background-color: #b71c1c;
}

/* Server Hub */
.server-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.server-hub-header {
    margin-bottom: 32px;
}

.server-hub-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.server-hub-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.server-hub-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.server-hub-card-header {
    margin-bottom: 12px;
}

.server-hub-card-header h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.member-count {
    font-size: 13px;
    color: #666;
}

.server-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.server-description.no-description {
    color: #999;
    font-style: italic;
}

.server-hub-card-footer {
    margin-top: auto;
}

.btn-join {
    width: 100%;
    padding: 10px 16px;
    background-color: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-join:hover {
    background-color: #5568d3;
}

.btn-join:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-joined {
    width: 100%;
    padding: 10px 16px;
    background-color: #f0f0f0;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
}

/* Invite Section */
.invite-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.invite-section h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.invite-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.invite-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.invite-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-invite {
    padding: 10px 20px;
    background-color: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-invite:hover {
    background-color: #5568d3;
}

.invite-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.invite-message.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.invite-message.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Invites Section */
.invites-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.invites-section h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.invites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.invite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.invite-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invite-info strong {
    font-size: 15px;
    color: #333;
}

.invite-code {
    font-size: 12px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.btn-accept {
    padding: 8px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-accept:hover {
    background-color: #45a049;
}

/* Responsive */
@media (max-width: 768px) {
    .top-menu {
        flex-wrap: wrap;
        gap: 12px;
    }

    .menu-left {
        flex-wrap: wrap;
        width: 100%;
    }

    .menu-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .auth-box {
        margin: 16px;
        padding: 32px 24px;
    }
}
