
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top left, #101827 0, #020617 45%, #000 100%);
    color: #e5e7eb;
    min-height: 100vh;
}

.site-header {
    background-color: #7ea253;
}
.site-header .header-inner {
    width: 100%;
    margin: 0 auto;
    padding: 10px 16px;
    min-height: 64px;
    position: relative;
    display: flex;
    align-items: center;
}
.site-header .brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.site-header .logo {
    height: 40px;
    width: auto;
    display: block;
}
.site-header .header-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.2;
}
.site-header .site-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    margin: 0 8px 2px;
}
.site-header .site-link a {
    color: #cce8c1;
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.95;
}
.site-header .site-link a:hover {
    text-decoration: underline;
    opacity: 1;
}

@media (max-width: 720px) {
    .site-header .header-inner {
    flex-direction: column;
    align-items: center;
    padding: 10px 12px;
    min-height: unset;
    }
    .site-header .header-text {
    position: static;
    transform: none;
    margin-top: 6px;
    }
    .site-header .logo { height: 34px; }
    .site-header .site-title { font-size: 1.15rem; }
    .site-header .site-link a { font-size: 0.9rem; }
}

/* ===== Main layout ===== */

.page-main {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 16px 28px;
    box-sizing: border-box;
    width: 100%;
}

.shell {
    width: 100%;
    max-width: 980px;
}

.mixer-card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    padding: 18px 18px 16px;
    backdrop-filter: blur(16px);
}

.mixer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mixer-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e5e7eb;
}

.mixer-subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(22, 163, 74, 0.1);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.4);
    gap: 4px;
    white-space: nowrap;
}
.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.mixer-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7280;
    margin-bottom: 4px;
    margin-top: 10px;
}

.select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.select-label {
    font-size: 0.85rem;
    color: #9ca3af;
}

.select-wrap {
    position: relative;
    min-width: 200px;
    flex: 1;
    max-width: 420px;
}

.select {
    width: 100%;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.select:focus {
    border-color: #7ea253;
    box-shadow: 0 0 0 1px rgba(126, 162, 83, 0.8);
}

.select-wrap::after {
    content: "▾";
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    pointer-events: none;
    color: #9ca3af;
}

.btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 7px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    background: linear-gradient(135deg, #7ea253, #4d7c0f);
    color: #f9fafb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 20px rgba(22, 101, 52, 0.7);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: default;
    box-shadow: none;
}

.btn.secondary {
    background: transparent;
    color: #cbd5f5;
    box-shadow: none;
}

.btn span.icon {
    font-size: 1rem;
    line-height: 1;
}

.status-line {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.status-strong {
    color: #e5e7eb;
    font-weight: 500;
}

/* Mixer list */

.feed-list {
    margin-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, 2fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(15,23,42,0.75));
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.feed-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e5e7eb;
}

.feed-url {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 2px;
    word-break: break-all;
}

.control-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #9ca3af;
}

.control-block .label {
    white-space: nowrap;
}

.control-block input[type="range"] {
    flex: 1;
}

.pan-slider-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.pan-edge {
    font-size: 0.7rem;
    color: #6b7280;
    width: 10px;
    text-align: center;
}

.remove-btn {
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.6);
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    background: transparent;
    color: #fecaca;
    cursor: pointer;
    white-space: nowrap;
}

.remove-btn:hover {
    background: rgba(127, 29, 29, 0.7);
}

/* Activity dot (audio activity indicator) */
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #4b5563;
    box-shadow: none;
    transition: background-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    flex-shrink: 0;
}
.activity-dot.active {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.9);
    transform: scale(1.25);
}

/* Disclaimer */
.disclaimer {
    font-size: 0.78rem;
    color: #9ca3af;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding-top: 6px;
    margin-top: 10px;
}

@media (max-width: 800px) {
    .feed-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .page-main {
    padding: 14px 12px 20px;
    }
    .mixer-card {
    padding: 14px 12px;
    }
}