@font-face {
    font-family: 'Rodfat';
    src: url('/public/Rodfat two-Demo.ttf') format('truetype');
}

:root {
    --bg-primary: linear-gradient(135deg, #f8f9fa 0%, #ebeff4 100%);
    --bg-card: #ffffff;
    --bg-card-glass: #f8f9fa4f;
    --text-primary: #141727;
    --text-secondary: #70747c;
    --border-color: transparent;
    --accent-color: #d71254;
    --box-shadow-glass: var(--box-shadow-glass);
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-card: #1a1a1a;
    --bg-card-glass: #1a1a1a4f;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border-color: transparent;
    --accent-color: #d71254;
    --box-shadow-glass: rgb(255 255 255 / 10%) 0px 1px 1px 0px inset, rgb(255 0 0 / 0%) 0px 50px 100px -20px, rgb(0 0 0 / 8%) 0px 30px 60px -30px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    padding-inline: 200px;
    position: relative;
    transition: all 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgb(186 33 255 / 5%) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgb(201 33 253 / 5%) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.content-wrapper {
    display: flex;
    gap: 24px;
}

.main-content {
    flex: 1;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(20, 23, 39, 0.1);
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(20, 23, 39, 0.1);
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(20, 23, 39, 0.15);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(20, 23, 39, 0.15);
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.new-topic-btn {
    background: #d71254;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(230, 13, 46, 0.3);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.new-topic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 13, 46, 0.35);
}

.category-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: var(--bg-card-glass);
    box-shadow: var(--box-shadow-glass);
}

.category-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(215, 18, 84, 0.15);
}

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
    margin-inline: -100%;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgb(255 255 255 / 4%);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -1px 10px 20px rgb(0 0 0 / 4%);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 200px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    position: relative;
    font-family: 'Rodfat', sans-serif;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    color: var(--accent-color);
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateY(-1px);
}

.category-icon {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    flex: 1;
}

.category-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-stats {
    color: var(--text-secondary);
    font-size: 13px;
}

.category-stats i {
    margin-right: 4px;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: var(--bg-card-glass);
    box-shadow: var(--box-shadow-glass);
}

.widget-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--accent-color);
}

.recent-topic {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-topic:last-child {
    border-bottom: none;
}

.recent-topic-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
}

.recent-topic-title:hover {
    color: var(--accent-color);
}

.recent-topic-meta {
    color: var(--text-secondary);
    font-size: 12px;
}

.stat-box {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-box:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1400px) {
    body {
        padding-inline: 20px;
    }
}

@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body { padding: 12px; }
    .container { max-width: 100%; }
    .header { padding: 32px 20px; }
    .category-card { flex-direction: column; text-align: center; }
    .tabs {
        justify-content: flex-start;
        padding: 4px;
        margin: 0 -12px 24px -12px;
    }
    .tab {
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }
}