/* Premium Project Panel - Liquid Glass Redesign */
#projects-panel {
    position: fixed;
    top: 50%;
    left: calc(50% + 254px);
    transform: translateY(-50%) translateX(20px);
    width: 290px; /* Reduced from 320px */
    height: 55vh; /* Reduced from 70vh */
    max-height: 600px; /* Reduced from 800px */
    background: rgba(10, 10, 16, 0.75);
    backdrop-filter: blur(42px) saturate(160%);
    -webkit-backdrop-filter: blur(42px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 
        0 42px 84px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 40px rgba(255, 255, 255, 0.02);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: 
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s,
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#projects-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* Background Mesh-like Gradient Effect */
#projects-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(100, 120, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(255, 100, 150, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.panel-drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin: 12px auto 0;
    flex-shrink: 0;
    opacity: 0.6;
}

.panel-header {
    padding: 6px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: grab;
    user-select: none;
}

.panel-header:active {
    cursor: grabbing;
}

.panel-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.panel-close {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-close:hover {
    color: #fff;
    background: rgba(255, 60, 60, 0.15);
    transform: rotate(90deg);
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.panel-section-title {
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    margin: 16px 8px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
}

/* Repo Card Redesign */
.repo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.repo-card:hover, .repo-card:active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.repo-card:active {
    transform: translateY(0) scale(0.98);
}

.repo-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.repo-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.repo-card:hover .repo-name {
    color: #fff;
}

.repo-lang-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
    opacity: 0.7;
}

.repo-actions {
    display: flex;
    gap: 8px;
    margin-right: 4px;
}

.repo-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.repo-btn:hover, .repo-btn:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.repo-btn.live {
    background: rgba(100, 150, 255, 0.08);
    border-color: rgba(100, 150, 255, 0.15);
    color: rgba(150, 180, 255, 0.6);
}

.repo-btn.live:hover {
    background: rgba(100, 150, 255, 0.15);
    color: #fff;
    box-shadow: 0 0 15px rgba(100, 150, 255, 0.3);
}

/* Featured Repo Badge */
.featured-repo::before {
    content: 'LIVE';
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 0.45rem;
    font-weight: 900;
    padding: 2px 8px;
    border-bottom-left-radius: 8px;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Skeleton Pulse Animation */
.repo-skeleton {
    height: 60px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.02) 25%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 75%
    );
    background-size: 200% 100%;
    border-radius: 16px;
    margin-bottom: 10px;
    animation: skeletonLoading 1.5s infinite linear;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile Styling Overrides */
@media (max-width: 700px) {
    #projects-panel {
        top: auto !important;
        left: 50% !important;
        width: calc(100% - 32px) !important;
        height: 50vh !important;
        max-width: 480px !important;
        bottom: calc(var(--player-h-mob, 190px) + 32px);
        transform: translateX(-50%) translateY(110%) !important;
        transition: transform 0.45s cubic-bezier(0.25, 1.4, 0.5, 1), opacity 0.3s;
    }

    #projects-panel.open {
        transform: translateX(-50%) translateY(0) !important;
    }

    .panel-drag-handle {
        width: 42px;
        height: 5px;
        margin-top: 10px;
    }
}
