:root {
    --bg-top: #f7f4ec;
    --bg-bottom: #dbe6f2;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-strong: #ffffff;
    --surface-soft: #eef3f8;
    --line: rgba(98, 124, 154, 0.18);
    --text-main: #1d2b36;
    --text-muted: #647789;
    --shadow-lg: 0 28px 60px rgba(53, 74, 97, 0.14);
    --shadow-md: 0 16px 32px rgba(53, 74, 97, 0.12);
    --shadow-sm: 0 8px 18px rgba(53, 74, 97, 0.09);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --focus: rgba(33, 150, 243, 0.24);
    --btn-primary-start: #4fa3ff;
    --btn-primary-end: #256fd6;
    --btn-primary-shadow: rgba(37, 111, 214, 0.28);
    --btn-secondary-start: #62b2ff;
    --btn-secondary-end: #317fdf;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 34%),
        linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.48), transparent 18%),
        radial-gradient(circle at 85% 12%, rgba(122, 162, 214, 0.14), transparent 20%),
        radial-gradient(circle at 78% 82%, rgba(255, 203, 119, 0.16), transparent 22%);
    pointer-events: none;
}

.page-shell {
    position: relative;
    padding: 40px 20px 56px;
}

.container {
    position: relative;
    width: min(1280px, 100%);
    margin: 0 auto;
}

.page-intro {
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #7a8ea2;
}

.title {
    margin: 0;
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.subtitle {
    margin: 14px 0 0;
    max-width: 680px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
}

.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 24px;
    align-items: start;
}

.main-column,
.side-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.surface {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
    padding: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 20px;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.section-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6f879d;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.section-note {
    margin: 0;
    max-width: 220px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: right;
}

.controller {
    width: 100%;
}

.controller-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 148px;
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 251, 0.78)),
        linear-gradient(135deg, rgba(244, 248, 252, 0.9), rgba(224, 233, 243, 0.72));
    border: 1px solid rgba(120, 146, 176, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.control-cluster {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 100%;
    padding: 18px;
    border-radius: 24px;
    background: rgba(245, 249, 253, 0.72);
    border: 1px solid rgba(125, 148, 177, 0.12);
}

.control-cluster-center {
    background: linear-gradient(180deg, rgba(250, 247, 242, 0.92), rgba(252, 251, 247, 0.82));
}

.control-cluster-rotate {
    background: linear-gradient(180deg, rgba(242, 247, 250, 0.92), rgba(247, 251, 249, 0.84));
}

.cluster-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6f8498;
}

.dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dpad-row {
    display: flex;
    gap: 12px;
}

.center-controls,
.rotate-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

button {
    font: inherit;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(25, 76, 150, 0.34);
    border-radius: 18px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    background: linear-gradient(160deg, var(--btn-primary-start), var(--btn-primary-end));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 10px 20px var(--btn-primary-shadow);
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.btn span {
    position: relative;
    z-index: 1;
}

.dpad .btn,
.rotate-controls .btn,
.btn-center {
    width: 76px;
    height: 76px;
    min-height: 0;
    padding: 0;
    border-radius: 24px;
    font-size: 24px;
}

.btn-record {
    width: 100%;
    min-height: 58px;
    border-radius: 18px;
}

.btn-playback {
    width: 100%;
    min-height: 58px;
    border-radius: 18px;
}

.btn-center {
    background: linear-gradient(160deg, #dce6ef, #b9c8d7);
    border-color: rgba(120, 139, 159, 0.22);
    box-shadow: inset 0 2px 8px rgba(108, 132, 157, 0.16);
    cursor: default;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 16px 28px rgba(37, 111, 214, 0.32);
    filter: saturate(1.04) brightness(1.02);
}

.btn:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 8px 14px rgba(37, 111, 214, 0.24);
}

.btn-center:hover,
.btn-center:active {
    transform: none;
    box-shadow: inset 0 2px 8px rgba(108, 132, 157, 0.16);
    filter: none;
}

.btn:focus-visible,
input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-main);
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #95a3b1;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: rgba(70, 129, 186, 0.4);
    background: #ffffff;
}

.status-surface {
    padding-top: 20px;
}

.status {
    margin: 0;
    width: 100%;
    min-height: 92px;
    padding: 22px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(245, 248, 251, 0.96), rgba(233, 239, 245, 0.92));
    border: 1px solid rgba(125, 148, 177, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
    display: flex;
    align-items: center;
}

.status p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #526476;
}

@media (max-width: 1080px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .section-note {
        max-width: none;
        text-align: left;
    }
}

@media (max-width: 820px) {
    .page-shell {
        padding: 24px 16px 40px;
    }

    .surface {
        padding: 20px;
        border-radius: 24px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .controller-layout {
        grid-template-columns: 1fr;
    }

    .control-cluster,
    .control-cluster-center,
    .control-cluster-rotate {
        width: 100%;
    }

    .rotate-controls {
        flex-direction: row;
    }
}

@media (max-width: 560px) {
    .title {
        font-size: 30px;
    }

    .subtitle {
        font-size: 15px;
    }

    .surface {
        padding: 16px;
    }

    .controller-layout {
        padding: 14px;
    }

    .control-cluster {
        padding: 14px;
    }

    .dpad-row {
        gap: 8px;
    }

    .dpad .btn,
    .rotate-controls .btn,
    .btn-center {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        font-size: 20px;
    }
}
