/* ============================================
   KOODI - PATH SIDEBARS - BIG & BEAUTIFUL
   sidebar-path.css
   ============================================ */

:root {
    --sb-orange: #FF9F00;
    --sb-lime: #C6DF2B;
    --sb-black: #131010;
    --sb-white: #ffffff;
    --sb-gray: #f7f7f7;
    --sb-border: #eeeeee;
    --sb-text: #131010;
    --sb-text-muted: #888888;
}

/* ==================== LAYOUT ==================== */
.path-layout {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: calc(100vh - 100px);
}

/* ==================== SIDEBARS ==================== */
.sidebar-panel {
    position: fixed;
    top: 150px;
    width: 330px;
    max-height: calc(100vh - 10px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
    padding-bottom: 30px;
}

.sidebar-panel::-webkit-scrollbar {
    width: 4px;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.sidebar-left {
    left: 30px;
}

.sidebar-right {
    right: 30px;
}

.sidebar-center {
    flex: 1;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== CARD ==================== */
.sb-card {
    background: var(--sb-white);
    border-radius: 20px;
    border: 2px solid var(--sb-border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.sb-card:hover {
    border-color: #e0e0e0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* ==================== CARD HEADER ==================== */
.sb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.sb-card-header:hover {
    background: var(--sb-gray);
}

.sb-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-card-header-icon {
    font-size: 1.2em;
}

.sb-card-header-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--sb-text);
}

.sb-card-toggle {
    width: 28px;
    height: 28px;
    background: var(--sb-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8em;
    transition: all 0.3s;
}

.sb-card:hover .sb-card-toggle {
    background: #eee;
}

.sb-card.collapsed .sb-card-toggle {
    transform: rotate(180deg);
}

/* ==================== CARD BODY ==================== */
.sb-card-body {
    padding: 5px 16px 16px;
}

.sb-card.collapsed .sb-card-body {
    display: none;
}

/* ==================== PROFILE ==================== */
.sb-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sb-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid var(--sb-lime);
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(198, 223, 43, 0.3);
    background: #f5f5f5;
}

.sb-profile-name {
    font-size: 1em;
    font-weight: 800;
    color: var(--sb-text);
    margin-bottom: 2px;
}

.sb-profile-kd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85em;
    color: var(--sb-text-muted);
    margin-bottom: 10px;
}

.sb-profile-kd .kd-coin {
    color: var(--sb-lime);
    font-weight: 700;
}

/* Streak Button */
.sb-profile-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--sb-lime);
    border-radius: 25px;
    padding: 10px 18px;
    width: 100%;
    margin-bottom: 12px;
    color: var(--sb-text);
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.2s;
}

.sb-profile-streak:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(198, 223, 43, 0.4);
}

.sb-profile-streak-icon {
    font-size: 1.1em;
}

.sb-profile-streak-value {
    font-size: 1.1em;
    font-weight: 900;
}

/* Stats */
.sb-profile-stats {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    width: 100%;
}

.sb-profile-stat {
    flex: 1 1 0;
    min-width: 0;
    background: var(--sb-gray);
    border-radius: 10px;
    padding: 10px 4px;
    text-align: center;
    transition: all 0.2s;
    overflow: hidden;
}

.sb-profile-stat:hover {
    background: #f0f0f0;
}

.sb-profile-stat-value {
    font-size: 0.8em;
    font-weight: 800;
    color: var(--sb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-profile-stat-label {
    font-size: 0.55em;
    color: var(--sb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-top: 3px;
    white-space: nowrap;
}

/* League Badge */
.sb-profile-league {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--sb-gray);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 700;
    color: var(--sb-text);
    margin-bottom: 10px;
    border: 1px solid var(--sb-border);
    width: 100%;
    box-sizing: border-box;
}

.sb-profile-league-icon {
    font-size: 1.1em;
}

/* Profile Button */
.sb-profile-btn {
    display: block;
    width: 100%;
    background: var(--sb-black);
    color: var(--sb-white);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.sb-profile-btn:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Not logged */
.sb-profile-login {
    text-align: center;
    padding: 20px 0;
}

.sb-profile-login-icon {
    font-size: 3.5em;
    color: #ddd;
    margin-bottom: 12px;
}

.sb-profile-login-text {
    font-size: 0.95em;
    color: var(--sb-text-muted);
    margin-bottom: 18px;
}

.sb-profile-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sb-lime);
    color: var(--sb-text);
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.sb-profile-login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(198, 223, 43, 0.4);
}

/* ==================== COURSE - BIG ==================== */
.sb-course {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--sb-gray);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.sb-course:last-child {
    margin-bottom: 0;
}

.sb-course:hover {
    background: #f0f0f0;
    border-color: #e5e5e5;
    transform: translateX(5px);
}

.sb-course-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sb-white);
    border-radius: 12px;
    flex-shrink: 0;
}

.sb-course-icon img {
    width: 28px;
    height: 28px;
}

.sb-course-info {
    flex: 1;
    min-width: 0;
}

.sb-course-name {
    font-size: 1em;
    font-weight: 700;
    color: var(--sb-text);
    margin-bottom: 6px;
}

.sb-course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-course-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.sb-course-fill {
    height: 100%;
    background: var(--sb-lime);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.sb-course-percent {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--sb-text-muted);
    min-width: 36px;
    text-align: right;
}

/* ==================== NEWS / ITEMS ==================== */
.sb-news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sb-border);
}

.sb-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sb-news-icon {
    font-size: 1.2em;
    margin-top: 2px;
}

.sb-news-content {
    flex: 1;
}

.sb-news-title {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--sb-text);
    margin-bottom: 2px;
}

.sb-news-desc {
    font-size: 0.8em;
    color: var(--sb-text-muted);
}

/* Streak Button Orange - BIG */
.sb-btn-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--sb-orange);
    color: var(--sb-white);
    padding: 14px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 700;
    text-decoration: none;
    margin-top: 12px;
    transition: all 0.3s;
}

.sb-btn-streak:hover {
    background: #e88d00;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 159, 0, 0.4);
}

/* ==================== TAGS - BIG ==================== */
.sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sb-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: var(--sb-gray);
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.sb-tag:hover {
    background: #f0f0f0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
    .sidebar-panel {
        width: 280px;
    }
}

@media (max-width: 1300px) {
    .sidebar-panel {
        width: 260px;
    }
}

@media (max-width: 1150px) {
    .sidebar-panel {
        width: 220px;
        top: 160px;
    }

    .sb-card-body {
        padding: 5px 18px 18px;
    }

    .sb-profile-avatar {
        width: 60px;
        height: 60px;
    }

    .sb-profile-streak {
        padding: 12px 20px;
    }
}

@media (max-width: 1000px) {
    .sidebar-panel {
        position: relative;
        top: 0;
        width: 100%;
        max-height: none;
        left: auto !important;
        right: auto !important;
        padding: 0 20px 20px;
    }

    .path-layout {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 20px 0;
    }

    .sidebar-left { order: 1; }
    .sidebar-center { order: 2; max-width: 100%; }
    .sidebar-right { order: 3; }

    .sidebar-panel {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .sidebar-panel .sb-card {
        flex: 1;
        min-width: 300px;
        max-width: 400px;
    }
}

@media (max-width: 700px) {
    .sidebar-panel {
        flex-direction: column;
        padding: 0 15px 15px;
    }

    .sidebar-panel .sb-card {
        min-width: 100%;
        max-width: 100%;
    }
}
