/* ============================================
   Tim Portfolio - Dark/Sleek Dashboard Theme
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Colors */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-elevated: #1f1f23;

    /* Borders */
    --border: #27272a;
    --border-subtle: #1e1e21;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Accent Colors */
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --accent-secondary: #a78bfa;
    --orange: #e78533;

    /* Status Colors */
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100dvh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 0 24px var(--accent-glow);
    flex-shrink: 0;
}

.logo-text {
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    min-height: 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Chat notification badge */
.chat-notification-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }
    50%      { box-shadow: 0 0 14px rgba(248, 113, 113, 0.6); }
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--orange), #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: var(--bg-elevated);
    color: var(--danger);
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.auth-btn.login {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.auth-btn.login:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.auth-btn.register {
    background: var(--accent);
    color: var(--bg-primary);
}

.auth-btn.register:hover {
    background: #06b6d4;
}

/* ============================================
   Mobile Header & Overlay
   ============================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 16px;
    align-items: center;
    gap: 16px;
    z-index: 110;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 111;
}

.mobile-title {
    font-weight: 500;
    font-size: 16px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   Main Content Area
   ============================================ */

.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.header-left p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 200px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 100%;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Content Area
   ============================================ */

.content {
    flex: 1;
    padding: 32px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-muted);
}

.footer a:hover {
    color: var(--accent);
}

/* ============================================
   Cards & Panels
   ============================================ */

.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 14px;
    font-weight: 500;
}

.panel-body {
    padding: 20px;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--border);
}

.card:hover::before {
    opacity: 1;
}

/* ============================================
   Stats Cards (for dashboard pages)
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.cyan { background: rgba(34, 211, 238, 0.15); color: var(--accent); }
.stat-icon.purple { background: rgba(167, 139, 250, 0.15); color: var(--accent-secondary); }
.stat-icon.green { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.stat-icon.orange { background: rgba(231, 133, 51, 0.15); color: var(--orange); }

.stat-value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   Technology Grid (About page)
   ============================================ */

.section-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--orange);
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    line-height: 1.7;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tech-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-2px);
    border-color: var(--border);
}

.tech-card-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s;
}

.tech-item:hover {
    background: var(--bg-tertiary);
}

.tech-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.2s;
}

.tech-item:hover img {
    transform: scale(1.1);
}

.tech-item span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================
   Hero Section (Home page)
   ============================================ */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    padding: 48px 24px;
}

.hero-greeting {
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 400;
}

.hero-title {
    font-size: clamp(36px, 8vw, 64px);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.7;
}

.hero-cta {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #06b6d4;
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Utilities
   ============================================ */

.text-accent { color: var(--accent); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease backwards;
}

.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.1s; }
.fade-in-3 { animation-delay: 0.15s; }
.fade-in-4 { animation-delay: 0.2s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .header {
        padding: 16px 24px;
    }

    .content {
        padding: 24px;
    }

    .footer {
        padding: 16px 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        pointer-events: none;
        top: 56px;
        height: calc(100dvh - 56px);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .sidebar.open {
        transform: translateX(0);
        pointer-events: auto;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .main {
        margin-left: 0;
        padding-top: 56px;
    }

    .header {
        display: none;
    }

    .content {
        padding: 20px 16px;
    }

    .footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .search-box {
        min-width: auto;
        flex: 1;
    }

    .hero {
        min-height: 40vh;
        padding: 32px 16px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
/* ============================================
   Shared Components (Chat, Cards, Buttons)
   ============================================ */

.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-primary); }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 500;
    color: var(--text-primary);
}
.card-body { padding: 20px; }

/*User List*/
.user-list { list-style: none; padding: 0; margin: 0; }
.user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.user-list-item:last-child { border-bottom: none; }

/*Chat*/
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 65%;
}
.chat-message.sent { align-self: flex-end; align-items: flex-end; }
.chat-message.received { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.chat-message.sent .chat-bubble {
    background: var(--accent);
    color: #000;
    border-bottom-right-radius: 4px;
}
.chat-message.received .chat-bubble {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}
.chat-input-area form { display: flex; gap: 10px; }

.chat-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent); }

/* Mobile override: full-width buttons */
@media (max-width: 768px) {
    .btn { width: 100%; justify-content: center; }
    .chat-container { height: calc(100vh - 200px); }
}

/* ── SignalR connection status ─────────────────────────── */
.connection-status {
    font-size: 11px;
    margin-top: 6px;
    padding-left: 2px;
    transition: opacity 0.3s;
}
.connection-status.connected    { opacity: 0; }
.connection-status.connecting   { color: var(--warning); opacity: 1; }
.connection-status.disconnected { color: var(--danger);  opacity: 1; }



/*Home screen*/
.hero-intro {
    max-width: 600px;
    padding: 3rem 0 2rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    color: #e2e8f0; /* your existing light text color */
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: 'Outfit', sans-serif;
}

.hero-subtitle {
    font-size: 1rem;
    color: #94a3b8; /* muted — not full white */
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.hero-subtitle strong {
    color: #67e8f9; /* your cyan accent */
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-cta {
    padding: 0.6rem 1.4rem;
    background: rgba(103, 232, 249, 0.15);
    border: 1px solid rgba(103, 232, 249, 0.4);
    color: #67e8f9;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-primary-cta:hover {
    background: rgba(103, 232, 249, 0.25);
}

.btn-ghost-cta {
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost-cta:hover {
    border-color: rgba(148, 163, 184, 0.6);
    color: #e2e8f0;
}

/* ============================================
   Forum
   ============================================ */

.forum-table {
    width: 100%;
    border-collapse: collapse;
}

.forum-table thead {
    background: var(--bg-tertiary);
}

.forum-table th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.forum-th-stat,
.forum-td-stat {
    text-align: center;
    width: 80px;
}

.forum-th-activity {
    width: 160px;
}

.forum-row {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.forum-row:hover {
    background: var(--bg-tertiary);
}

.forum-row:last-child {
    border-bottom: none;
}

.forum-row-pinned {
    background: rgba(34, 211, 238, 0.03);
}

.forum-td-topic {
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.forum-td-stat {
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.forum-td-activity {
    padding: 14px 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.forum-activity-user {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.forum-topic-flags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.forum-topic-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.forum-topic-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-topic-title:hover {
    color: var(--accent);
}

.forum-topic-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.forum-topic-meta strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.forum-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forum-badge-pinned {
    font-size: 14px;
    padding: 0;
    background: none;
}

.forum-badge-locked {
    font-size: 14px;
    padding: 0;
    background: none;
}

.forum-badge-op {
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent);
    font-size: 10px;
    margin-top: 4px;
}

.forum-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* Thread Detail */

.forum-thread-header {
    padding: 20px;
}

.forum-thread-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.forum-thread-meta {
    font-size: 13px;
}

/* Posts */

.forum-post-layout {
    display: flex;
    gap: 20px;
}

.forum-post-author {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
}

.forum-post-author-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    word-break: break-all;
}

.forum-post-author-stat {
    font-size: 11px;
}

.forum-post-content {
    flex: 1;
    min-width: 0;
}

.forum-post-meta {
    font-size: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-post-link {
    margin-left: auto;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.forum-post-link:hover {
    opacity: 1;
    color: var(--accent);
}

.forum-post-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.forum-post-op {
    border-left: 2px solid var(--accent);
}

/* Form styling reuse */

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
    .forum-th-stat,
    .forum-td-stat,
    .forum-th-activity,
    .forum-td-activity {
        display: none;
    }

    .forum-th-topic {
        width: 100%;
    }

    .forum-post-layout {
        flex-direction: column;
        gap: 12px;
    }

    .forum-post-author {
        flex-direction: row;
        width: auto;
        gap: 10px;
    }
}

/* Forum Breadcrumbs */
.forum-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
}

.forum-breadcrumb-link {
    color: var(--accent);
    text-decoration: none;
}

.forum-breadcrumb-link:hover {
    color: var(--text-primary);
}

.forum-breadcrumb-sep {
    color: var(--text-muted);
    margin: 0 2px;
}

.forum-breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Forum Board Icon */
.forum-board-icon {
    flex-shrink: 0;
    padding-top: 2px;
}

/* Forum Category Label */
.forum-category-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    color: var(--accent);
}

/* Forum Activity Thread Link */
.forum-activity-thread {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
}

.forum-activity-thread:hover {
    color: var(--accent);
}
