/* Item Details Page */
.time-range-btn-detail {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Stat Cards Animation */
.stat-card-detail {
    animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.stat-card-detail:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card-detail:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card-detail:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-range-btn-detail:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.time-range-btn-detail.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Sidebar List Items - ENHANCED */
.sidebar-item {
    padding: 14px 18px;
    margin: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.sidebar-item:hover::before {
    transform: translateX(100%);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.sidebar-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: var(--gold-primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px var(--gold-primary);
}

@media (max-width: 768px) {
    .item-details-layout {
        grid-template-columns: 1fr;
    }

    .item-sidebar {
        height: auto;
        min-height: 300px;
    }
}

.sidebar-item-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.sidebar-item:hover .sidebar-item-img {
    transform: scale(1.1) rotate(5deg);
}

.sidebar-item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.sidebar-item-name {
    font-size: 14px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.sidebar-item.active .sidebar-item-name {
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.sidebar-item-sub {
    font-size: 12px;
    color: #888;
    font-family: var(--font-body);
}

/* Scrollbar refinement for sidebar */
#item-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

#item-sidebar-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#item-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#item-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Item Stats Grid Card Hover Effects */
.item-stats-grid .card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.item-stats-grid .card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), transparent 50%, rgba(212, 175, 55, 0.1));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.item-stats-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
}

.item-stats-grid .card:hover::before {
    opacity: 1;
}