:root {
    --bg-dark: #0a0d14;
    --panel-bg: #121824;
    --panel-border: #1e293b;
    --accent-blue: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.4);
    --btn-bg: #1a2333;
    --btn-hover: #232f45;
    --btn-active: #00d2ff;
    --danger: #ef4444;
    --text-main: #f1f5f9;
    --text-muted: #64748b;
    --radius: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* WĄSKI PASEK GÓRNY */
.top-header {
    height: 75px;
    min-height: 75px;
    background: #0d121d;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.header-title {
    font-size: 2.05rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #64748b;
}

.header-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* KONTENER GŁÓWNY */
.dashboard-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 18px;
    padding: 18px;
    overflow: hidden;
}

/* PANELE */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* KONTROLKI GŁOŚNOŚCI */
.volume-control-group {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 8px;
    align-items: center;
}

.btn-vol {
    padding: 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #cbd5e1;
}

.btn-vol:active {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-glow);
    transform: scale(0.96);
}

.vol-display-box {
    background: #0d121c;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px 6px;
    text-align: center;
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

/* STYL PRZYCISKÓW GŁÓWNYCH */
.btn {
    background: var(--btn-bg);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: var(--btn-hover);
    border-color: #334155;
    transform: translateY(-2px);
}

.btn-main.active {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 18px var(--accent-glow), inset 0 0 10px rgba(0, 210, 255, 0.2);
}

/* PRAWY PANEL */
.panel-right {
    position: relative;
}

.idle-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 15px;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.active-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--panel-border);
}

.selected-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
}

.selected-label span {
    color: var(--accent-blue);
    font-weight: 700;
    text-transform: uppercase;
}

.btn-back {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 8px 16px;
    font-size: 0.9rem;
    gap: 6px;
}

.btn-back:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
    /* auto-fill pilnuje pustych miejsc, max 220px */
    gap: 14px;
    flex: 1;
    align-content: start;
}

.btn-action {
    height: 80px;
    font-size: 0.95rem;
    text-align: center;
}

.btn-action.active {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 12px var(--accent-glow);
}

.iframe-container {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #090d16;
    border: 1px solid var(--panel-border);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.slider-container {
    background: #0d121c;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.slider-badge {
    background: var(--btn-bg);
    color: var(--accent-blue);
    border: 1px solid var(--panel-border);
    padding: 4px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.1rem;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #1e293b;
    outline: none;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: var(--transition);
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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