/* Modern Sidebar Styles - Nova Chess Theme */

/* Override base sidebar from styles.css */
.sidebar {
    width: 200px !important;
    height: 100vh;
    background: rgba(20, 20, 20, 0.85) !important;
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden !important;
    overflow-y: auto;
    z-index: 100;
    box-shadow: none !important;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Logo Section */
.logo-section {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Logo link styling */
.logo-link {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-link:hover .logo-text .nova {
    color: #7c7ff3;
}

.logo-link:hover .logo-text .chess {
    color: #b9a0ff;
}

/* Hide old logo */
.logo {
    display: none !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

/* Chess Board Logo - Reduced by 25% */
.chess-board {
    width: 34px;
    height: 34px;
    position: relative;
    transform: perspective(200px) rotateX(25deg) rotateY(-20deg);
    flex-shrink: 0;
}

.chess-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, #a78bfa 25%, transparent 25%), 
        linear-gradient(-45deg, #a78bfa 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #a78bfa 75%), 
        linear-gradient(-45deg, transparent 75%, #a78bfa 75%);
    background-size: 8.5px 8.5px;
    background-position: 0 0, 0 4.25px, 4.25px -4.25px, -4.25px 0px;
    border-radius: 3px;
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.4),
        0 0 25px rgba(167, 139, 250, 0.3),
        inset 0 0 15px rgba(167, 139, 250, 0.2);
}

.logo-text {
    font-size: 18px;
    letter-spacing: -0.3px;
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
}

.logo-text .nova {
    color: #6366f1;
    font-weight: 600;
}

.logo-text .chess {
    color: #a78bfa;
    font-weight: 400;
}

/* Navigation Section */
.nav-section {
    flex: 1;
    padding: 4px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Add margin to ensure nav items don't overlap with collapse button */
.nav-tabs {
    list-style: none;
    padding: 0 !important;
    margin: 0;
    width: 100%;
}

.nav-section::-webkit-scrollbar {
    width: 4px;
}

.nav-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.nav-section::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 2px;
}

/* Navigation Items */
.nav-tabs {
    list-style: none;
    padding: 0 !important;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.nav-item {
    position: relative;
    margin: 4px 8px !important;
    box-sizing: border-box;
}

.nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(167, 139, 250, 0.1) 20%, 
        rgba(167, 139, 250, 0.1) 80%, 
        transparent 100%);
}

/* Hide old icons */
.nav-tabs li a i {
    display: none !important;
}

.nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 14px 20px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
    background: transparent !important;
    border-left: none !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-item.active .nav-link,
.nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(167, 139, 250, 0.15) 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.3);
}

.nav-item.active .nav-link::after,
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #6366f1 0%, #a78bfa 100%);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.nav-text {
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

/* Social Section */
.social-section {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.social-header {
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

.social-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.social-link:hover {
    background: rgba(167, 139, 250, 0.08);
    color: rgba(167, 139, 250, 0.9);
    transform: translateX(2px);
}

.social-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.social-handle {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
    transition: all 0.2s ease;
}

/* Reddit specific color */
.social-link:hover .fa-reddit {
    color: #FF4500;
}

/* Twitter specific color */
.social-link:hover .fa-twitter {
    color: #1DA1F2;
}

/* YouTube specific color */
.social-link:hover .fa-youtube {
    color: #FF0000;
}

/* Collapsed state for social section */
.sidebar.collapsed .social-header {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .social-links {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
}

.sidebar.collapsed .social-link {
    padding: 8px;
    background: transparent;
}

.sidebar.collapsed .social-handle {
    display: none;
}

.sidebar.collapsed .social-section {
    padding: 12px 8px;
}

/* User Section */
.sidebar-footer {
    padding: 0 !important;
    border-top: none !important;
    background: transparent !important;
}

.user-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.user-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0 !important;
    width: 160px;
    height: 50px;
    position: relative;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Credit tooltip */
.credit-tooltip {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #666666;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.user-info:hover .credit-tooltip {
    opacity: 1;
    visibility: visible;
}

.avatar {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    margin-right: 0 !important;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
}

.username {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

/* Collapse Toggle - Positioned at top right */
.collapse-toggle {
    position: absolute;
    top: 520px;  /* Moved 30px higher */
    right: 4px;  /* Moved 8px to the right */
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;  /* Better font for centering */
    font-size: 24px;  /* Larger chevron */
    font-weight: 1000;  /* Maximum thickness */
    color: rgba(167, 139, 250, 0.6);
    z-index: 10;
    line-height: 0;  /* Helps with vertical centering */
}

.collapse-toggle:hover {
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.4);
    color: rgba(167, 139, 250, 0.9);
}

.collapse-toggle::before {
    content: '‹';  /* Single chevron */
    display: block;
    transform: translateY(-1px);  /* Fine-tune vertical centering */
    transition: all 0.2s ease;
}

.sidebar.collapsed .collapse-toggle::before {
    content: '›';  /* Single chevron pointing right when collapsed */
}

/* Collapsed State */
.sidebar.collapsed {
    width: 60px !important;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-details,
.sidebar.collapsed .username,
.sidebar.collapsed .username-input-container {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 14px !important;
}

.sidebar.collapsed .user-info {
    justify-content: center;
    padding: 12px 8px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #2a2a2a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.sidebar.collapsed .nav-item:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Remove content margin overrides - let original styles.css handle this */