/* ===================================
   3D Playground Section Styles
   =================================== */

.playground-section {
    position: relative;
    padding: var(--space-4xl) var(--container-padding);
    background: var(--color-bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
}

.playground-section .section-header {
    position: relative;
    z-index: 10;
    /* Ensure header is above canvas */
    margin-bottom: var(--space-xl);
}

.playground-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    margin: var(--space-2xl) auto;
    overflow: visible;
    /* Allow canvas to extend beyond container */
}

#playground-canvas {
    width: 100%;
    height: calc(100% + 50px);
    /* Extend only downward */
    display: block;
    border-radius: 0px;
    position: relative;
    z-index: 1;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .playground-section {
        min-height: auto;
        padding: var(--space-2xl) var(--container-padding);
    }

    .playground-container {
        width: 100%;
        position: relative;
        left: auto;
        transform: none;
        height: 50vh;
        min-height: 350px;
        max-height: 500px;
        margin-top: var(--space-lg);
        margin-bottom: var(--space-lg);
        overflow: hidden;
    }

    #playground-canvas {
        width: 100%;
        height: 100%;
        display: block;
        touch-action: pan-y;
    }

    .playground-leaderboard {
        display: none;
        /* Hide on mobile to save space */
    }
}

/* Leaderboard */
.playground-leaderboard {
    position: absolute;
    top: -50px;
    right: 30px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.leaderboard-title {
    color: var(--color-text-secondary);
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.8;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text);
    transition: transform 0.3s ease;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.player-score {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}