* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.search-box button {
    padding: 8px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--text-primary);
}

/* Category Navigation */
.category-nav {
    display: flex;
    gap: 16px;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    padding: 0 20px;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.category-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* Flash Messages */
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Home Page */
.home-page {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.sidebar {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 4px;
    height: fit-content;
}

.sidebar-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.sidebar-tab {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s;
}

.sidebar-tab:hover {
    color: var(--text-primary);
}

.sidebar-tab.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: -10px;
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.topic-list {
    list-style: none;
}

.topic-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-list li:last-child {
    border-bottom: none;
}

.topic-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
}

.topic-list a:hover {
    color: var(--accent-color);
}

.entry-count {
    color: var(--text-muted);
    font-size: 12px;
}

.main-column {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 4px;
}

.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topic-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.topic-item h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.topic-item h3 a:hover {
    color: var(--accent-color);
}

.topic-preview {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
    line-height: 1.5;
}

.topic-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.topic-meta a {
    color: var(--text-secondary);
    text-decoration: none;
}

.topic-meta a:hover {
    color: var(--text-primary);
}

/* Topic Page */
.topic-header {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
}

.topic-header h1 {
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.topic-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.topic-stats a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.topic-stats a:hover {
    color: var(--accent-color);
}

.entry {
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.entry-content {
    margin-bottom: 15px;
    line-height: 1.8;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.entry-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.entry-author:hover {
    color: var(--text-primary);
}

.avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.entry-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vote-btn, .favorite-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.vote-btn:hover, .favorite-btn:hover {
    background: var(--bg-tertiary);
}

.vote-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-small {
    padding: 5px 12px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.delete-entry-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 13px;
}

/* New Entry Form */
.new-entry-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.new-entry-form h3 {
    margin-bottom: 15px;
}

#entry-editor {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    color: white !important;
    background: var(--gradient-primary);
}

.btn-primary:active {
    opacity: 0.9;
    transform: translateY(0);
    color: white !important;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-form {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-link a {
    color: var(--accent-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

/* Footer */
.main-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .home-page {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
}


/* WhatsApp Style Chat */
.chat-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 200px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.chat-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}

.conversations-list {
    overflow-y: auto;
    flex: 1;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-secondary);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    position: relative;
}

.conversation-item:hover {
    background: var(--bg-secondary);
}

.conversation-item.active {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-color);
}

.conv-avatar {
    flex-shrink: 0;
}

.conv-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.conv-avatar .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conv-username {
    font-weight: 600;
    font-size: 14px;
}

.conv-time {
    font-size: 12px;
    color: var(--text-muted);
}

.conv-preview {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

.chat-main {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-user-info a {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
}

.chat-user-info a:hover {
    color: var(--accent-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-secondary);
}

.message-bubble {
    max-width: 60%;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.message-bubble.sent {
    margin-left: auto;
    align-items: flex-end;
}

.message-bubble.received {
    margin-right: auto;
    align-items: flex-start;
}

.message-text {
    background: var(--bg-primary);
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    box-shadow: var(--shadow-sm);
}

.message-bubble.sent .message-text {
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble.received .message-text {
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.chat-input form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    font-size: 14px;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.chat-input button {
    flex-shrink: 0;
}

.empty-chat-main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.empty-chat {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
    }
    
    .chat-sidebar {
        display: none;
    }
}


/* Debe & UKDE Pages */
.debe-page, .ukde-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 0;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.page-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.ukde-day-section {
    margin-bottom: 40px;
}

.ukde-day-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-color);
}


/* Profile Page */
.profile-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 4px;
}

.profile-header {
    display: flex;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.profile-info h1 {
    margin-bottom: 10px;
}

.profile-bio {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.profile-entries h2 {
    margin-bottom: 20px;
}

.profile-entries .entry {
    margin-bottom: 20px;
}

.entry-topic {
    font-weight: 600;
    margin-bottom: 10px;
}

.entry-topic a {
    color: var(--accent-color);
    text-decoration: none;
}

/* REMOVED - duplicate entry-date definition */

/* Search Page */
.search-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 4px;
}

/* Edit Profile */
.edit-profile-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 4px;
}

.current-avatar {
    margin-bottom: 10px;
}

/* New Topic Page */
.new-topic-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 4px;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-top: 30px;
}

.login-prompt a {
    color: var(--accent-color);
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Admin Toolbar */
.admin-toolbar {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}


/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.category-list a:hover {
    color: var(--accent-color);
}

.cat-icon {
    font-size: 16px;
}

/* Category Page */
.category-page {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 4px;
}

.category-header {
    padding: 20px;
    padding-left: 20px;
    margin-bottom: 30px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

.category-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.category-icon {
    font-size: 32px;
}

.category-description {
    color: var(--text-secondary);
    font-size: 14px;
}


/* Topic Category Badge */
.topic-category {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    background: var(--bg-secondary);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topic-category a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topic-category a:hover {
    text-decoration: none;
    opacity: 0.8;
}


/* Card Design */
.topic-card {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
}

.topic-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.topic-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.topic-card h3 a:hover {
    color: var(--accent-color);
}

.topic-card .topic-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.topic-card .topic-meta a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.topic-card .topic-meta a:hover {
    color: var(--accent-color);
}

.entry-card {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
}

.entry-card::before {
    display: none;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-dropdown-toggle:hover {
    background: var(--bg-secondary);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-dropdown.active .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown-menu a:hover {
    background: var(--bg-secondary);
}

.user-dropdown-menu a:first-child {
    border-radius: 12px 12px 0 0;
}

.user-dropdown-menu a:last-child {
    border-radius: 0 0 12px 12px;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* New Vote Buttons */
.vote-buttons {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.vote-btn-new {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.vote-btn-new:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.vote-btn-new.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.vote-btn-new.down.active {
    background: var(--gradient-secondary);
}

.vote-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Gradient Buttons */
.btn-gradient {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: inline-block;
}

.btn-gradient:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: white !important;
    background: var(--gradient-primary);
}

.btn-gradient:active {
    opacity: 0.9;
    transform: translateY(0);
    color: white !important;
}

/* Topic Preview with Avatar */
.topic-preview-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.topic-preview-meta .user-avatar-small {
    flex-shrink: 0;
}

/* Favorites Badge */
.favorites-badge {
    background: var(--gradient-success);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Message Badge */
.message-badge {
    background: var(--error);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .topic-card, .entry-card {
        padding: 16px;
        border-radius: 8px;
    }
    
    .vote-btn-new {
        padding: 6px 12px;
        font-size: 13px;
    }
}


/* Messages Page */
.messages-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.messages-tabs .tab {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s;
}

.messages-tabs .tab:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.messages-tabs .tab.active {
    background: var(--gradient-primary);
    color: white;
}

.new-message-form {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.message-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.message-card:hover {
    box-shadow: var(--shadow-md);
}

.message-card.unread {
    border-left-color: var(--accent-color);
    background: linear-gradient(to right, #f0f4ff 0%, var(--bg-primary) 10%);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.message-header a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}

.message-subject {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.message-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.message-date {
    font-size: 13px;
    color: var(--text-muted);
}

/* Favorites Page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

/* Entry Topic Link */
.entry-topic {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.entry-topic a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.entry-topic a:hover {
    text-decoration: underline;
}

/* Vote Disabled */
.vote-disabled {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    margin-right: 8px;
    display: inline-block;
}

/* Form Improvements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Button Improvements - REMOVED (merged above) */

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: inline-block;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}


/* Topic Excerpt */
.topic-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 12px 0;
    font-size: 14px;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.topic-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Entry Content Styling */
.entry-content {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.entry-topic {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-secondary);
}

.entry-topic a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.entry-topic a:hover {
    color: var(--accent-hover);
    transform: translateX(2px);
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--bg-secondary);
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.entry-date {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.entry-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.entry-author:hover {
    color: var(--accent-color);
}

.entry-date {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.entry-edited {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.entry-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}


/* Minimal Vote Buttons */
.vote-btn-minimal {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    font-size: 13px;
    vertical-align: middle;
    line-height: 1;
}

.vote-btn-minimal:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    transform: scale(1.1);
}

.vote-btn-minimal.active {
    color: var(--accent-color);
    font-weight: 600;
}

.vote-btn-minimal.active .vote-arrow {
    border-color: var(--accent-color);
}

.vote-btn-minimal.down.active {
    color: var(--error);
}

.vote-btn-minimal.down.active .vote-arrow {
    border-color: var(--error);
}

.vote-arrow {
    width: 12px;
    height: 12px;
    border: 3px solid currentColor;
    border-left: 0;
    border-bottom: 0;
    transform: rotate(-45deg);
    transition: all 0.2s;
    flex-shrink: 0;
    display: block;
    margin-top: 2px;
}

.vote-btn-minimal.down .vote-arrow {
    transform: rotate(135deg);
    margin-top: 2px;
}

.vote-btn-minimal:hover .vote-arrow {
    border-width: 3.5px;
}

.vote-count {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.vote-disabled-minimal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.vote-disabled-minimal .vote-arrow {
    width: 12px;
    height: 12px;
    border: 3px solid currentColor;
    border-left: 0;
    border-bottom: 0;
    transform: rotate(-45deg);
    flex-shrink: 0;
}

.vote-disabled-minimal:last-child .vote-arrow {
    transform: rotate(135deg);
}

/* Minimal Favorite Button */
.favorite-btn-minimal {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 18px;
}

.favorite-btn-minimal:hover:not(:disabled) {
    background: var(--bg-secondary);
    transform: scale(1.2);
}

.favorite-btn-minimal.active {
    color: #fbbf24;
}

.favorite-btn-minimal:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.btn-edit:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.btn-delete {
    border-color: #fecaca;
}

.btn-delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* JavaScript için eski class'ları da destekle */
.vote-btn, .vote-btn-new {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 13px;
}

.vote-btn:hover, .vote-btn-new:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    transform: scale(1.1);
}

.favorite-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 18px;
}

.favorite-btn:hover {
    background: var(--bg-secondary);
    transform: scale(1.2);
}

.favorite-btn.active {
    color: #fbbf24;
}
