/* ============================================
   PLAYGROUND - Live Demo Cluster
   ============================================ */

.playground-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.playground-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
.pg-header {
    padding: 110px 0 20px;
    text-align: center;
}

.pg-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.pg-subtitle {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* --- Cluster Status Bar --- */
.cluster-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.node-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(10, 10, 15, 0.6);
    color: var(--text-muted);
    transition: all 0.3s;
}

.node-badge.alive {
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--text-secondary);
}

.node-badge .node-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #555;
}

.node-badge.alive .node-dot {
    background: #00e676;
    box-shadow: 0 0 6px #00e676;
}

.node-badge .node-granules {
    color: var(--text-muted);
    font-size: 0.6rem;
}

/* --- Tabs --- */
.pg-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.pg-tab {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.pg-tab:hover {
    color: var(--text-secondary);
}

.pg-tab.active {
    color: var(--neon-purple);
    border-bottom-color: var(--neon-purple);
}

/* --- Content Panels --- */
.pg-panel {
    display: none;
    flex: 1;
    min-height: 500px;
}

.pg-panel.active {
    display: flex;
    flex-direction: column;
}

/* --- Terminal Panel --- */
.terminal-wrap {
    flex: 1;
    position: relative;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
    background: #0a0a0f;
    min-height: 450px;
}

.terminal-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border: none;
    background: #0a0a0f;
}

.terminal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    background: rgba(139, 61, 255, 0.06);
    border: 1px solid var(--border-color);
    border-top: none;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.toolbar-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

/* --- WebManager Panel --- */
.webmanager-wrap {
    flex: 1;
    position: relative;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
    min-height: 500px;
}

.webmanager-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
}

/* --- Quick Commands --- */
.quick-cmds {
    padding: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.cmd-btn {
    background: rgba(139, 61, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cmd-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.06);
}

/* --- Cluster Status Panel --- */
.cluster-detail {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: rgba(10, 10, 15, 0.4);
    min-height: 450px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.cluster-detail pre {
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pg-header { padding-top: 90px; }
    .terminal-wrap, .terminal-wrap iframe { min-height: 350px; }
    .webmanager-wrap, .webmanager-wrap iframe { min-height: 350px; }
    .pg-tab { padding: 8px 12px; font-size: 0.65rem; }
}
