* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: #0a0c19;
    color: #f4f5ff;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    padding: 16px;
}

button,
a {
    font: inherit;
}

button {
    -webkit-appearance: none;
    appearance: none;
}

.controlShell {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.controlHeader {
    padding: 18px;
    border: 2px solid #303861;
    background: #151a33;
}

.eyebrow {
    margin: 0 0 4px;
    color: #8ed8ff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1;
}

.playbackState {
    min-height: 20px;
    margin: 12px 0 0;
    color: #bdc6e7;
    font-size: 15px;
}

.transport {
    display: -webkit-flex;
    display: flex;
    margin: 14px 0;
}

.transport button {
    min-width: 58px;
    min-height: 62px;
    margin-right: 8px;
    border: 2px solid #3b4774;
    border-radius: 0;
    background: #202846;
    color: #fff;
    font-weight: bold;
}

.transport button:last-child {
    margin-right: 0;
}

.transport .modeButton {
    -webkit-flex: 1;
    flex: 1;
}

.transport button:active,
.transport button.is-active {
    border-color: #ffcb66;
    background: #69441b;
    color: #fff4d6;
}

.imageSection {
    padding: 18px;
    border: 2px solid #303861;
    background: #11162b;
}

h2 {
    margin: 0 0 12px;
    color: #c9d2f2;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.imageList {
    margin: 0;
    padding: 0;
    list-style: none;
}

.imageList li {
    margin: 0 0 8px;
}

.imageList li:last-child {
    margin-bottom: 0;
}

.imageButton {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 12px 14px;
    border: 2px solid #2d365c;
    border-radius: 0;
    background: #1a203a;
    color: #f4f5ff;
    text-align: left;
}

.imageNumber {
    display: inline-block;
    width: 34px;
    color: #8ed8ff;
    font-family: Consolas, monospace;
    font-weight: bold;
}

.imageButton.is-current {
    border-color: #ffcb66;
    background: #4e351c;
}

.imageButton.is-current .imageNumber {
    color: #ffcb66;
}

.connectionBar {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    min-height: 46px;
    margin-top: 14px;
    padding: 13px 14px;
    background: #151a33;
    color: #aeb8dc;
    font-size: 13px;
}

.connectionBar a {
    color: #8ed8ff;
}

@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .controlHeader,
    .imageSection {
        padding: 14px;
    }

    .transport button {
        min-width: 50px;
        margin-right: 5px;
        font-size: 14px;
    }
}

/* Pixel console theme. Kept dependency-free for older RCWeb phone clients. */
html,
body {
    min-height: 100vh;
    background-color: #070815;
    background-image: linear-gradient(rgba(91, 105, 180, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 105, 180, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
    color: #f7f7ff;
    font-family: Consolas, "Courier New", monospace;
}

body {
    padding: 14px 14px 34px;
}

button,
a {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

button:focus,
a:focus {
    outline: 3px solid #ffd166;
    outline-offset: 2px;
}

[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
}

.controlShell {
    max-width: 500px;
}

.topNav {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    min-height: 46px;
    margin-bottom: 12px;
}

.backToAppsButton,
.connectionChip {
    display: inline-block;
    min-height: 38px;
    border: 2px solid #333b68;
    background: #11152a;
    color: #c8d1ff;
    font-size: 12px;
    font-weight: bold;
    line-height: 34px;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
}

.backToAppsButton {
    padding: 0 12px;
    box-shadow: 3px 3px 0 #02030b;
}

.backToAppsButton span {
    margin-right: 5px;
    color: #ff6aad;
}

.backToAppsButton:active {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #02030b;
}

.connectionChip {
    min-width: 126px;
    padding: 0 10px;
    color: #aeb7d9;
    text-align: center;
}

.statusPixel {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    background: #ffd166;
    box-shadow: 2px 2px 0 #704e18;
    vertical-align: 1px;
}

.connectionChip.is-connected .statusPixel {
    background: #5df2c2;
    box-shadow: 2px 2px 0 #176d57;
}

.controlHeader {
    position: relative;
    margin-bottom: 14px;
    padding: 22px 20px 20px;
    overflow: hidden;
    border: 2px solid #58639a;
    background: #151a35;
    box-shadow: 6px 6px 0 #02030b, inset 0 0 0 2px #242b52;
}

.controlHeader:after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 5px;
    background: repeating-linear-gradient(90deg, #5df2c2 0, #5df2c2 14px, #ff6aad 14px, #ff6aad 28px, #ffd166 28px, #ffd166 42px, #7787ff 42px, #7787ff 56px);
    content: "";
}

.titleRow {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.pixelMark {
    position: relative;
    display: block;
    -webkit-flex: 0 0 40px;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-right: 14px;
}

.pixelMark:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #5df2c2;
    box-shadow: 8px 0 #5df2c2, 16px 0 #ff6aad, 24px 0 #ff6aad,
        0 8px #5df2c2, 8px 8px #ffd166, 16px 8px #ffd166, 24px 8px #ff6aad,
        0 16px #7787ff, 8px 16px #ffd166, 16px 16px #ffd166, 24px 16px #5df2c2,
        0 24px #7787ff, 8px 24px #7787ff, 16px 24px #5df2c2, 24px 24px #5df2c2;
    content: "";
}

.eyebrow {
    margin-bottom: 5px;
    color: #83e9cd;
    font-size: 10px;
    letter-spacing: 2px;
}

h1 {
    color: #fff;
    font-size: 38px;
    line-height: 0.9;
    letter-spacing: -3px;
    text-shadow: 3px 3px 0 #303d7b;
    text-transform: uppercase;
}

h1 span {
    color: #ff78b7;
}

.statePanel {
    margin-top: 18px;
    padding: 10px 12px;
    border-left: 5px solid #ffd166;
    background: #090b19;
}

.stateLabel {
    display: block;
    margin-bottom: 4px;
    color: #747fae;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.playbackState {
    min-height: 18px;
    margin: 0;
    color: #eef0ff;
    font-size: 13px;
    font-weight: bold;
    line-height: 18px;
}

.transport {
    padding: 12px;
    border: 2px solid #333b68;
    background: #0e1226;
    box-shadow: 5px 5px 0 #02030b;
}

.transport button {
    min-width: 58px;
    min-height: 72px;
    margin-right: 7px;
    padding: 8px 5px;
    border: 2px solid #536096;
    background: #1c2345;
    box-shadow: inset 0 -5px 0 #10142b;
    color: #e5e9ff;
    cursor: pointer;
    text-transform: uppercase;
    -webkit-transition: background-color 100ms, border-color 100ms, -webkit-transform 100ms;
    transition: background-color 100ms, border-color 100ms, transform 100ms;
}

.transport button:active {
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
    box-shadow: inset 0 -2px 0 #10142b;
}

.transport button.is-active {
    border-color: #5df2c2;
    background: #173f42;
    box-shadow: inset 0 -5px 0 #0b2528, 0 0 0 2px #173f42;
    color: #b7ffe9;
}

.transport button:disabled {
    border-color: #2b3154;
    background: #14182d;
    box-shadow: none;
    color: #59617f;
    cursor: default;
    opacity: 0.62;
}

.transportIcon,
.transportLabel {
    display: block;
}

.transportIcon {
    min-height: 25px;
    color: #ff78b7;
    font-size: 20px;
    line-height: 25px;
}

.is-active .transportIcon {
    color: #5df2c2;
}

.transportLabel {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 0.5px;
}

.imageSection {
    margin-top: 14px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #333b68;
    background: #0e1226;
    box-shadow: 5px 5px 0 #02030b;
}

.gallerySection {
    margin: 14px 0;
    overflow: hidden;
    border: 2px solid #333b68;
    background: #0e1226;
    box-shadow: 5px 5px 0 #02030b;
}

.galleryList {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 12px 12px 2px;
}

.galleryButton {
    width: calc(50% - 5px);
    min-height: 58px;
    margin: 0 0 10px;
    padding: 9px 11px;
    border: 2px solid #343e70;
    background: #171d39;
    box-shadow: 3px 3px 0 #050610;
    color: #e6e9ff;
    cursor: pointer;
    text-align: left;
    -webkit-transition: background-color 100ms, border-color 100ms, -webkit-transform 100ms;
    transition: background-color 100ms, border-color 100ms, transform 100ms;
}

.galleryButton:nth-child(odd) {
    margin-right: 10px;
}

.galleryButton:active {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #050610;
}

.galleryButton.is-current {
    border-color: #5df2c2;
    background: #173f42;
    box-shadow: 3px 3px 0 #071817, inset 5px 0 0 #5df2c2;
}

.galleryName,
.galleryCount {
    display: block;
}

.galleryName {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.galleryCount {
    margin-top: 5px;
    color: #7883ad;
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.galleryButton.is-current .galleryCount {
    color: #91e8d0;
}

.sectionHeader {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 14px;
    border-bottom: 2px solid #333b68;
    background: #181e3a;
}

.sectionHeader h2 {
    margin: 0;
    color: #fff;
    font-size: 13px;
    letter-spacing: 1.5px;
}

.sectionHeader span {
    color: #7782ad;
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.imageList {
    padding: 12px;
}

.imageList:empty {
    display: none;
}

.emptyGalleryMessage {
    margin: 0;
    padding: 24px 16px 26px;
    color: #858fb8;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.8px;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

.emptyGalleryMessage:before {
    display: block;
    margin-bottom: 9px;
    color: #ff6aad;
    content: "[ EMPTY ]";
}

.emptyGalleryMessage[hidden] {
    display: none;
}

.imageList li {
    margin-bottom: 9px;
}

.imageButton {
    position: relative;
    min-height: 60px;
    padding: 13px 14px;
    overflow: hidden;
    border: 2px solid #343e70;
    background: #171d39;
    box-shadow: 4px 4px 0 #050610;
    color: #e6e9ff;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.2px;
    -webkit-transition: background-color 100ms, border-color 100ms, -webkit-transform 100ms;
    transition: background-color 100ms, border-color 100ms, transform 100ms;
}

.imageButton:after {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    background: #252e59;
    content: "";
}

.imageButton:active {
    -webkit-transform: translate(2px, 2px);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #050610;
}

.imageNumber {
    width: 40px;
    color: #7586e8;
    font-size: 12px;
}

.imageButton.is-current {
    border-color: #ff6aad;
    background: #402039;
    box-shadow: 4px 4px 0 #140811, inset 6px 0 0 #ff6aad;
    color: #fff;
}

.imageButton.is-current:after {
    background: #ffd166;
}

.imageButton.is-current .imageNumber {
    color: #ffd166;
}

.connectionBar {
    min-height: 46px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 2px solid #252d55;
    background: #0d1123;
    color: #818bb4;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.connectionBar a {
    color: #83e9cd;
    font-weight: bold;
    text-decoration: none;
}

.footerLabel:before {
    color: #ff6aad;
    content: "// ";
}

@media (max-width: 360px) {
    body {
        padding: 10px 10px 28px;
    }

    .backToAppsButton,
    .connectionChip {
        font-size: 10px;
    }

    .connectionChip {
        min-width: 112px;
    }

    .controlHeader {
        padding: 18px 15px;
    }

    h1 {
        font-size: 33px;
    }

    .transport {
        padding: 8px;
    }

    .transport button {
        min-width: 49px;
        min-height: 66px;
        margin-right: 5px;
        font-size: 12px;
    }

    .transportLabel {
        font-size: 8px;
    }

    .galleryList {
        padding: 9px 9px 0;
    }

    .galleryButton {
        width: calc(50% - 4px);
        min-height: 52px;
        margin-bottom: 8px;
        padding: 8px 9px;
    }

    .galleryButton:nth-child(odd) {
        margin-right: 8px;
    }

    .sectionHeader span {
        display: none;
    }
}
