:host {
    --bg-0: #0a1016;
    --bg-1: #111c26;
    --bg-2: #1c2d3b;
    --line: rgba(177, 220, 255, 0.2);
    --ink: #e5f5ff;
    --ink-dim: rgba(229, 245, 255, 0.72);
    --accent: #2ec4ff;
    --accent-soft: rgba(46, 196, 255, 0.2);
    --danger: #ff596d;
    display: block;
    min-height: 100vh;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.remote {
    min-height: 100vh;
    padding: 14px;
    display: flex;
    justify-content: center;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 200, 92, 0.18), transparent 35%),
        radial-gradient(circle at 85% 0%, rgba(46, 196, 255, 0.28), transparent 45%),
        linear-gradient(145deg, var(--bg-0), var(--bg-1) 58%, var(--bg-2));
    color: var(--ink);
    font-family: 'Avenir Next', 'Trebuchet MS', 'Segoe UI', sans-serif;
}

.remote__body {
    width: min(100%, 520px);
    display: grid;
    gap: 10px;
    animation: reveal 0.6s ease-out;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 89, 109, 0.7);
}

.status-dot.is-active {
    background: #44e38c;
    box-shadow: 0 0 12px rgba(68, 227, 140, 0.7);
}

.now-card {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(
        155deg,
        rgba(17, 39, 56, 0.92),
        rgba(15, 29, 42, 0.86)
    );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.now-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.now-card__statusline {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--ink-dim);
    white-space: nowrap;
}

.now-card__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--ink-dim);
}

.now-card__channel {
    margin-top: 5px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.now-card__meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-dim);
}

.now-card__program {
    margin-top: 8px;
    font-size: 13px;
    color: #b6d5ea;
}

.cluster {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: rgba(9, 21, 31, 0.72);
}

.cluster__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--ink-dim);
    margin-bottom: 10px;
}

.touchpad__glass {
    width: min(100%, 320px);
    aspect-ratio: 1;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(97, 166, 214, 0.38);
    background:
        radial-gradient(circle at 50% 32%, rgba(46, 196, 255, 0.24), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.01));
}

.touchpad__button {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: 180ms ease;
}

.touchpad__button:active:not(:disabled) {
    background: var(--accent-soft);
}

.touchpad__button:disabled {
    opacity: 0.45;
}

.touchpad__button--up {
    top: 0;
}

.touchpad__button--down {
    bottom: 0;
}

.touchpad__center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(167, 218, 255, 0.35);
    background: rgba(9, 23, 34, 0.9);
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
}

.digit-display {
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px dashed rgba(167, 218, 255, 0.5);
    padding: 10px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 0.16em;
    color: #d5eeff;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.keypad__key {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(167, 218, 255, 0.34);
    background: rgba(15, 38, 55, 0.84);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
}

.keypad__key:active:not(:disabled) {
    transform: translateY(1px);
    background: rgba(29, 67, 94, 0.94);
}

.keypad__key:disabled {
    opacity: 0.45;
}

.keypad__key--alt {
    font-size: 12px;
    letter-spacing: 0.06em;
}

.keypad__key--go {
    background: linear-gradient(140deg, #16a8df, #2ec4ff);
    color: #042130;
}

.volume-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.volume-row__button {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(167, 218, 255, 0.34);
    background: rgba(15, 38, 55, 0.84);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.volume-row__button--mute {
    border-color: rgba(255, 129, 143, 0.45);
}

.volume-row__button:disabled {
    opacity: 0.45;
}

.volume-meter {
    margin-top: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.volume-meter__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1fa8de, #42e8ff);
    transition: width 180ms ease;
}

.volume-caption {
    margin-top: 6px;
    color: var(--ink-dim);
    font-size: 12px;
}

.remote__error {
    border-radius: 12px;
    border: 1px solid rgba(255, 117, 132, 0.5);
    background: rgba(78, 12, 24, 0.65);
    color: #ffd9de;
    font-size: 13px;
    padding: 10px 12px;
}

.remote__footer {
    text-align: center;
    color: rgba(213, 238, 255, 0.72);
    font-size: 12px;
    padding-bottom: 10px;
}

@media (max-width: 640px) {
    .remote {
        padding: 8px;
    }

    .remote__body {
        width: 100%;
        max-width: none;
        gap: 8px;
    }

    .now-card {
        border-radius: 14px;
    }

    .cluster {
        border-radius: 14px;
        padding: 9px;
    }

    .touchpad__glass {
        width: min(100%, 360px);
    }

    .keypad__key {
        height: 44px;
    }

    .volume-row__button {
        min-height: 38px;
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
