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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #09090b;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: #17171a;
    border-right: none;
    display: flex;
    flex-direction: column;
    position: relative;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    transition: width 0.3s ease;
}

.sidebar.collapsed,
html.sidebar-collapsed .sidebar {
    width: 80px;
}

html.preload .sidebar,
html.preload .sidebar * {
    transition: none !important;
}

.sidebar.collapsed .nav-item,
html.sidebar-collapsed .sidebar .nav-item {
    justify-content: center;
    padding: 0.875rem 1rem;
    font-size: 0 !important;
    color: #b0b0b0 !important;
    margin: 0.25rem 0.5rem;
    width: calc(100% - 1rem);
    gap: 0 !important;
}

body:not(.light-theme) .sidebar.collapsed .nav-item:hover,
body:not(.light-theme) .sidebar.collapsed .nav-item.active,
body:not(.light-theme) .sidebar.collapsed .category-header:hover,
body:not(.light-theme) html.sidebar-collapsed .sidebar .nav-item:hover,
body:not(.light-theme) html.sidebar-collapsed .sidebar .nav-item.active,
body:not(.light-theme) html.sidebar-collapsed .sidebar .category-header:hover {
    color: #ffffff !important;
}

.light-theme .sidebar.collapsed .nav-item:hover,
.light-theme .sidebar.collapsed .nav-item.active,
.light-theme .sidebar.collapsed .category-header:hover {
    color: #1a1a1a !important;
}

.sidebar.collapsed .nav-item svg,
.sidebar.collapsed .nav-item .nav-icon,
.sidebar.collapsed .nav-item .sub-icon,
html.sidebar-collapsed .sidebar .nav-item svg,
html.sidebar-collapsed .sidebar .nav-item .nav-icon,
html.sidebar-collapsed .sidebar .nav-item .sub-icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    color: inherit !important;
    fill: none !important;
    stroke: currentColor !important;
    margin: 0 auto !important;
}

.sidebar.collapsed .nav-item:not(.subcategory-item),
html.sidebar-collapsed .sidebar .nav-item:not(.subcategory-item) {
    font-size: 0;
    color: inherit;
}

.sidebar.collapsed .category-header,
html.sidebar-collapsed .sidebar .category-header {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 1.6rem;
}

.sidebar.collapsed .category-header span,
html.sidebar-collapsed .sidebar .category-header span {
    display: none !important;
    visibility: hidden !important;
}

.sidebar.collapsed .sidebar-projects,
.sidebar.collapsed .sidebar-footer,
html.sidebar-collapsed .sidebar .sidebar-projects,
html.sidebar-collapsed .sidebar .sidebar-footer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.sidebar.collapsed .category-arrow,
html.sidebar-collapsed .sidebar .category-arrow {
    display: block;
    margin-left: 0;
    margin-top: 0;
    position: absolute;
    left: 50%;
    bottom: 4px;
    right: auto;
    top: auto;
    transform: translateX(-50%);
}

.sidebar.collapsed .category-arrow.rotated,
html.sidebar-collapsed .sidebar .category-arrow.rotated {
    transform: translateX(-50%) rotate(180deg);
}

.sidebar.collapsed .subcategory-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.sidebar.collapsed .subcategory-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0;
    margin: 0;
}

.sidebar.collapsed .subcategory-menu:not(.expanded) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.sidebar.collapsed .subcategory-menu.expanded {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0;
    margin: 0;
}

.sidebar.collapsed .user-profile-box {
    justify-content: center;
    padding: 0.5rem;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .dropdown-arrow {
    display: none !important;
    visibility: hidden !important;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .dropdown-arrow,
html.sidebar-collapsed .sidebar .user-info,
html.sidebar-collapsed .sidebar .dropdown-arrow {
    display: none !important;
    visibility: hidden !important;
}

.sidebar.collapsed .dropdown-menu {
    width: 260px;
    left: 0;
    right: auto;
}

html.widgets-expanded .sidebar #widgets-submenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
}

html.widgets-collapsed .sidebar #widgets-submenu,
html.overlays-collapsed .sidebar #overlays-submenu {
    display: block !important;
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

html.overlays-expanded .sidebar #overlays-submenu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
}

html.widgets-expanded .sidebar .nav-category:last-of-type .category-arrow {
    transform: translateX(-50%) rotate(180deg);
}

html.overlays-expanded .sidebar .nav-category:first-of-type .category-arrow {
    transform: translateX(-50%) rotate(180deg);
}

.sidebar:not(.collapsed) .category-arrow {
    transform: translateX(-50%);
}



.sidebar:not(.collapsed) .subcategory-menu.expanded .nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar:not(.collapsed) .subcategory-menu.expanded .nav-item span {
    display: inline;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #4a4a4a;
    margin-top: auto;
}

.disclaimer-text {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    text-align: center;
}

.copyright-text {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.sidebar-projects {
    padding: 1rem 1.5rem;
}

.projects-title {
    font-size: 0.85rem;
    color: #888;
    text-align: left;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-box {
    display: block;
    background: #262626;
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #5a5a5a;
}

.project-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.project-name {
    background: url('https://cdn.7tv.app/paint/01HBXZS5680009NC1Q0NCNE82C/layer/01JAMR2BPQYF8Y2KQZF5Q6BDXR/4x.avif');
    background-size: cover;
    background-position: center;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 0.95rem;
}

.external-link-icon {
    width: 16px;
    height: 16px;
    color: #888;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.project-box:hover .external-link-icon {
    opacity: 1;
}

.user-profile {
    padding: 1rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.user-profile-box {
    background: #262626;
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    height: 56px;
}

.user-paint-indicator {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #262626;
    background: #333;
    z-index: 1;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2a2a2a;
    object-fit: cover;
    border: none;
}

.user-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #888;
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #262626;
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #4a4a4a;
}

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

.dropdown-item:hover {
    background: #4a4a4a;
}

.dropdown-item.selected {
    background: #4a4a4a;
}

.dropdown-item.admin-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin: 0.5rem;
    border-radius: 8px;
}

.dropdown-item.admin-warning:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.dropdown-item.admin-warning span {
    color: #ef4444;
    font-weight: 600;
}

.dropdown-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2a2a2a;
    object-fit: cover;
}

.dropdown-item-info {
    flex: 1;
}

.dropdown-item-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.dropdown-item-info p {
    font-size: 0.8rem;
    color: #888;
}

.checkmark {
    color: #6b7280;
    font-size: 1.2rem;
}

.logout-icon {
    width: 18px;
    height: 18px;
    color: #888;
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0.25rem 1rem;
    border-radius: 8px;
}

.nav-item:hover {
    background: #3a3a3a;
    color: #ffffff;
}

.nav-item.active {
    background: #3a3a3a;
    color: #ffffff;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-category {
    margin: 0.25rem 0rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-header:hover {
    background: #3a3a3a;
    color: #ffffff;
}

.category-header:active {
    background: #4a4a4a;
    transform: translateY(1px);
}

.category-header span {
    flex: 1;
}

.category-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #888;
}

.category-arrow.rotated {
    transform: rotate(180deg);
}


.subcategory-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: block;
}

.subcategory-menu.expanded {
    max-height: 500px;
}

.subcategory-item {
    padding: 0.875rem 1.5rem 0.875rem 3.5rem;
    margin: 0.25rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.subcategory-item:hover {
    background: #3a3a3a;
    color: #ffffff;
}

.sub-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    background: #0f0f10;
}

.content-header {
    padding: 1rem;
    border-bottom: none;
    background: #17171a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: -1px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
}

.content-header::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    width: 16px;
    height: 100%;
    background: #2a2a2a;
    border-top-left-radius: 16px;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-left-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-btn {
    width: auto;
    min-width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 26, 0.8);
    color: #b0b0b0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

.header-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(0);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}


.page-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: #666;
    margin-right: 0.5rem;
}

.sidebar-toggle-icon {
    color: #b0b0b0;
}

.sidebar-toggle-icon:hover {
    color: #ffffff;
}

.current-page {
    font-size: 1.2rem;
    font-weight: 600;
    color: #b0b0b0;
}

.header-logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: url('https://cdn.7tv.app/paint/01J6M387YG0000HJTPW7AY3FZX/layer/01JAMR3EW9Q3R9765PKXM7M4S8/4x.avif');
    background-size: cover;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-position: center;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0;
}

.content-body {
    padding: 2rem;
}

.footer-credit {
    padding: 1rem 1.5rem;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #4a4a4a;
}

.footer-credit a {
    color: #888;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: #9ca3af;
}

.twitch-icon-small, .link-icon-small {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f9fafb;
}

.page-header p {
    color: #888;
    font-size: 1rem;
}

.content-placeholder {
    background: rgba(74, 74, 74, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: #888;
    font-size: 1.1rem;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

.light-theme {
    background: #ffffff;
    color: #1a1a1a;
}

.light-theme .sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.light-theme .main-content {
    background: #ffffff;
}

.light-theme .content-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.light-theme .content-header::before {
    background: #e9ecef;
}

.light-theme .user-profile-box {
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.light-theme .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.light-theme .dropdown-item:hover {
    background: #f8f9fa;
}

.light-theme .dropdown-item.selected {
    background: #f8f9fa;
}

.light-theme .nav-item:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

.light-theme .nav-item.active {
    background: #e9ecef;
    color: #1a1a1a;
}

.light-theme .category-header:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

.light-theme .category-header:active {
    background: #dee2e6;
}

.light-theme .project-box {
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.light-theme .project-box:hover {
    border-color: #dee2e6;
}

.light-theme .header-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #6c757d;
}

.light-theme .header-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
}

.light-theme .header-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme .header-logo {
    -webkit-text-stroke: 1px black;
    text-stroke: 1px black;
}


.light-theme .page-separator {
    color: #adb5bd;
}

.light-theme .sidebar-toggle-icon {
    color: #6c757d;
}

.light-theme .sidebar-toggle-icon:hover {
    color: #1a1a1a;
}

.light-theme .current-page {
    color: #6c757d;
}

.light-theme .sidebar-footer {
    border-top: 1px solid #e9ecef;
}

.light-theme .sidebar-projects {
    border-top: 1px solid #e9ecef;
}

.light-theme .sidebar.collapsed {
    width: 80px;
}

.light-theme .sidebar.collapsed .nav-item span,
.light-theme .sidebar.collapsed .user-info h3,
.light-theme .sidebar.collapsed .projects-title,
.light-theme .sidebar.collapsed .sidebar-projects,
.light-theme .sidebar.collapsed .sidebar-footer,
.light-theme .sidebar.collapsed .category-header span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.light-theme .sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.875rem 1rem;
}

.light-theme .sidebar.collapsed .category-header {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    padding-bottom: 1.6rem;
}

.light-theme .sidebar.collapsed .sidebar-projects,
.light-theme .sidebar.collapsed .sidebar-footer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.light-theme .sidebar.collapsed .category-arrow {
    display: block;
    margin-left: 0;
    margin-top: 0;
    position: absolute;
    left: 50%;
    bottom: 4px;
    right: auto;
    top: auto;
    transform: translateX(-50%);
}

.light-theme .sidebar.collapsed .category-arrow.rotated {
    transform: translateX(-50%) rotate(180deg);
}

.light-theme .sidebar.collapsed .subcategory-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.light-theme .sidebar.collapsed .subcategory-menu.expanded {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 500px !important;
    overflow: visible !important;
    flex-direction: column;
    position: absolute;
    left: 80px;
    top: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.light-theme .sidebar:not(.collapsed) .subcategory-menu.expanded .nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.light-theme .sidebar:not(.collapsed) .subcategory-menu.expanded .nav-item span {
    display: inline;
}

.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.light-theme ::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.05);
}

.light-theme * {
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}
