/* Sidebar & Header Modern Styles - Light Theme */

:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 72px;
    --header-height: 56px;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-hover: #f3f4f6;
    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --border-color: #e5e7eb;
    --accent-color: #ff0050;
    --accent-hover: #e6004a;
    --accent-secondary: #ff1a66;
}

/* Global Layout */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Remove default link styling on buttons and prevent blue underline */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

a:focus {
    outline: none;
}

/* Ensure buttons inside links don't get link styling */
a .btn,
a.btn {
    text-decoration: none !important;
}

a .btn:hover,
a.btn:hover {
    text-decoration: none !important;
}

#app-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* ====================
   SIDEBAR STYLES
==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease;
    z-index: 1000;
    padding-top: var(--header-height);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.sidebar-content {
    padding: 12px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: #0f0f0f !important;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: #0f0f0f !important;
}

.sidebar-link.active {
    background: var(--bg-secondary);
    font-weight: 500;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-color);
    border-radius: 0 2px 2px 0;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-right: 24px;
    transition: margin 0.3s ease;
    color: #0f0f0f !important;
}

body.sidebar-collapsed .sidebar-icon {
    margin-right: 0;
}

.sidebar-text {
    opacity: 1;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    color: #0f0f0f !important;
}

body.sidebar-collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.sidebar-section-title {
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #606060 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.sidebar-collapsed .sidebar-section-title {
    opacity: 0;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

body.sidebar-mobile-open .sidebar-overlay {
    display: block;
}

/* ====================
   HEADER STYLES
==================== */
.top-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 900;
    transition: left 0.3s ease;
}

body.sidebar-collapsed .top-header {
    left: var(--sidebar-collapsed-width);
}

.header-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    gap: 16px;
}

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

.hamburger-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: var(--bg-hover);
}

.hamburger-btn svg {
    width: 24px;
    height: 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.header-logo img {
    height: 32px;
}

.logo-beta {
    background: var(--border-color);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Search Bar */
.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    overflow: hidden;
}

.search-form:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 0, 80, 0.1);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn,
.voice-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-btn:hover,
.voice-btn:hover {
    color: var(--text-primary);
}

.search-btn svg,
.voice-btn svg {
    width: 20px;
    height: 20px;
}

.voice-btn {
    border-left: 1px solid var(--border-color);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-join {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-join:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.btn-register {
    background: var(--accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(255, 0, 80, 0.2);
}

.btn-register:hover {
    background: var(--accent-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(255, 0, 80, 0.3);
    transform: translateY(-1px);
}

/* User Menu */
.header-user-menu {
    position: relative;
}

.user-avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--bg-hover);
}

.lang-btn svg {
    width: 16px;
    height: 16px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lang-dropdown.show {
    display: block;
}

.lang-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.lang-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.lang-item.active {
    background: rgba(255, 0, 80, 0.1);
    color: var(--accent-color);
    font-weight: 600;
}

/* ====================
   CATEGORIES BAR
==================== */
.categories-bar {
    position: sticky;
    top: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 800;
    padding: 8px 0;
    margin-bottom: 16px;
}

.categories-container {
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.categories-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.category-chip {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #0f0f0f !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-chip:hover {
    background: var(--bg-hover);
    color: #0f0f0f !important;
    border-color: var(--text-secondary);
    text-decoration: none !important;
}

.category-chip.active {
    background: var(--accent-color) !important;
    color: #ffffff !important;
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(255, 0, 80, 0.15);
}

.category-chip.active:hover {
    background: var(--accent-hover) !important;
    color: #ffffff !important;
}

.category-scroll-btn {
    display: none;
}

/* ====================
   MAIN CONTENT
==================== */
.main-content {
    padding-top: var(--header-height);
    padding-left: 16px;
    padding-right: 16px;
    min-height: 100vh;
}

/* ====================
   RESPONSIVE
==================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .top-header {
        left: 0;
    }
}

@media (max-width: 768px) {
    .header-center {
        max-width: 400px;
    }

    .header-logo span {
        display: none;
    }

    .btn-header {
        padding: 6px 12px;
        font-size: 13px;
    }

    .category-chip {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-center {
        display: none;
    }

    .categories-bar {
        padding: 6px 0;
        margin-bottom: 12px;
    }

    .category-chip {
        padding: 6px 12px;
        font-size: 13px;
    }

    .main-content {
        padding-top: var(--header-height);
        padding-left: 12px;
        padding-right: 12px;
    }
}


