html, body {
    margin: 0;
    padding: 0;
    background-color: #0b0f1a;
    color: #eef2f8;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    min-height: 100vh;
}

body {
    padding: 0 16px 90px 16px;
    box-sizing: border-box;
    max-width: 520px;
    margin: 0 auto;
}

#commsInfoDiv {
    text-align: center;
    color: #cfd6e4;
    font-size: 13px;
    padding: 12px 0 6px 0;
}

.commsPill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #cfd6e4;
    font-size: 13px;
    letter-spacing: 0.04em;
    line-height: 1;
    vertical-align: middle;
}

.commsPill .statusDot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #6cf;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(102, 204, 255, 0.6);
}

.commsPill #commsInfo {
    color: #cfd6e4;
    vertical-align: middle;
}

.commsPill #commsClientCounts {
    color: #8a93a8;
    text-decoration: none;
    margin-left: 8px;
    vertical-align: middle;
}

.backToAppsButton {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #cfd6e4;
    font-size: 13px;
    letter-spacing: 0.04em;
    line-height: 1;
    vertical-align: middle;
    text-decoration: none;
}

.backToAppsButton:active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.apodHeader {
    text-align: center;
    padding: 14px 0 12px 0;
    border-bottom: 1px solid #1c2336;
}

.apodHeaderTitle {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 4px;
    color: #6cf;
    text-transform: uppercase;
}

.apodHeaderSub {
    font-size: 12px;
    color: #8a93a8;
    letter-spacing: 2px;
    margin-top: 4px;
}

.apodPreviewWrap {
    margin: 14px 0 12px 0;
    background-color: #000;
    border: 1px solid #1c2336;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.apodPreview {
    width: 100%;
    /* 16:9 box via padding-bottom — works on every browser back to IE7. */
    padding-bottom: 56.25%;
    height: 0;
    position: relative;
    background-color: #000;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.apodPreviewPlaceholder {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    margin-top: -10px;
    text-align: center;
    color: #5e6a82;
    font-size: 13px;
    font-style: italic;
}

.apodInfo {
    padding: 4px 4px 12px 4px;
}

.apodTitle {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 8px;
}

.apodMetaRow {
    font-size: 12px;
    color: #8a93a8;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.apodDate {
    color: #6cf;
    margin-right: 12px;
}

.apodCopyright {
    color: #8a93a8;
    text-transform: none;
    letter-spacing: 0;
    font-style: italic;
}

.apodExplanation {
    font-size: 14px;
    line-height: 1.55;
    color: #cfd6e4;
    max-height: 9.5em;
    overflow: hidden;
    position: relative;
    -webkit-transition: max-height 400ms ease;
    transition: max-height 400ms ease;
}

.apodExplanation.expanded {
    max-height: 4000px;
}

.apodExplanation:not(.expanded):after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.4em;
    background-image: -webkit-linear-gradient(top, rgba(11, 15, 26, 0), rgba(11, 15, 26, 1));
    background-image: linear-gradient(to bottom, rgba(11, 15, 26, 0), rgba(11, 15, 26, 1));
    pointer-events: none;
}

.apodControls {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    -webkit-box-pack: justify;
    justify-content: space-between;
    margin: 14px 0 8px 0;
}

.apodControlsRow {
    text-align: center;
    margin-bottom: 6px;
}

.apodBtn {
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 12px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
    -webkit-transition: background-color 100ms, transform 100ms;
    transition: background-color 100ms, transform 100ms;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.apodBtn:active {
    -webkit-transform: translateY(2px);
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.apodBtnPrimary {
    background-color: #2563eb;
    color: #fff;
    width: 36%;
}

.apodBtnPrimary:active {
    background-color: #1d4ed8;
}

.apodBtnSecondary {
    background-color: #1c2336;
    color: #cfd6e4;
    border: 1px solid #2a334d;
    width: 30%;
}

.apodBtnSecondary:active {
    background-color: #2a334d;
}

.apodBtnGhost {
    background-color: transparent;
    color: #6cf;
    border: 1px solid #2a334d;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 400;
    width: 100%;
    box-shadow: none;
}

.apodBtnGhost:active {
    background-color: #1c2336;
}

#status {
    text-align: center;
    color: #ff7676;
    font-size: 12px;
    min-height: 16px;
    margin-top: 6px;
}

/* Modal-ish full-screen reader for the explanation */
.apodReader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0b0f1a;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 90px 18px;
    box-sizing: border-box;
    display: none;
}

.apodReader.open {
    display: block;
}

.apodReaderClose {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background-color: #1c2336;
    color: #cfd6e4;
    border: 1px solid #2a334d;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
}

.apodReader h2 {
    font-size: 22px;
    font-weight: 400;
    color: #ffffff;
    margin: 24px 0 8px 0;
}

.apodReader .apodReaderMeta {
    font-size: 12px;
    color: #8a93a8;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.apodReader .apodReaderText {
    font-size: 16px;
    line-height: 1.6;
    color: #cfd6e4;
}
