/* ---------------------- */
/* variables */
/* ---------------------- */

:root {
    /* global */
    --bg: #000000;
    --bg2: #161616;
    --bg3: #242424;
    --bg4: #323232;
    --fg: #c0c0c0;
    --fg2: #a8a8a8;
    --fg3: #6e6e6e;
    --hr: #202020;

    /* tab buttons */
    --tab-bg: #2c2c2c;
    --tab-fg: #c0c0c0;
    --tab-active-bg: #4f4f4f;

    /* text */
    --title: #6ea0a4;
    --subtitle: #776490;
}

@font-face {
    font-family: 'mc';
    src: url('/resources/fonts/minecraft.woff2');
    font-display: swap;
}

/* ---------------------- */
/* global */
/* ---------------------- */

::-moz-selection {
    color: #cbcaca;
    background: #395254;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'mc', serif;
    font-size: 13px;
}

#background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    image-rendering: pixelated;
    opacity: 0;
    transition: opacity 1.5s;
}
#background.ready {
    opacity: 1;
}

#container {
    margin: 40px auto;
    max-width: 600px;
    background: var(--bg2);
}

#content {
    padding: 24px;
}

hr {
    border: 2px solid var(--hr);
    margin: 0 24px 0 24px
}

ul li,
ol li {
    margin-bottom: 0.5em;
}

/* ---------------------- */
/* tabs */
/* ---------------------- */

#tabs {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 6px;
}

.tab {
    flex: 1;
    background-color: var(--tab-bg);
    color: var(--tab-fg);
    text-align: center;
    text-decoration: none;
    padding: 2px;
    user-select: none;
}
.tab:hover {
    background: var(--bg4)
}

.tab.active {
    background-color: var(--tab-active-bg);
    pointer-events: none;
    cursor: default;
}

/* ---------------------- */
/* headers */
/* ---------------------- */

h1 {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 6px;
    color: var(--title);
    font-size: 36px;
    font-style: italic;
    user-select: none;
}

h2 {
    text-align: center;
    margin-top: 2px;
    margin-bottom: 24px;
    color: var(--subtitle);
    font-size: 16px;
    user-select: none
}

h3 {
    text-align: center;
    margin: 0 0 6px;
    font-size: 24px;
}

h4 {
    text-align: center;
    margin: 6px 0 24px;
}

/* ---------------------- */
/* pagination */
/* ---------------------- */

#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 24px 0;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    box-sizing: border-box;
    background: var(--bg3);
    color: var(--fg2);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}
.pagination-nav:hover {
    background: var(--bg4);
}

.pagination-disabled {
    color: var(--fg3);
    pointer-events: none;
}

.pagination-current {
    color: var(--fg);
    background: var(--bg4);
    cursor: default;
}

/* ---------------------- */
/* explore */
/* ---------------------- */

#catalog {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    white-space: none;
    gap: 8px;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    justify-content: flex-end;
    min-height: 128px;
    background: var(--bg3);
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
    user-select: none;
}
.catalog-item:hover {
    background: var(--bg4);
}

.catalog-image {
    max-height: 100%;
    max-width: 100%;
    pointer-events: none;
}

.catalog-title {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--fg);
}

.catalog-caption {
    color: var(--fg2);
}

/* ---------------------- */
/* feed */
/* ---------------------- */

#composer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

#composer textarea {
    min-height: 36px;
    height: 36px;
    padding: 8px;
    box-sizing: border-box;
    resize: vertical;
    background: var(--bg3);
    color: var(--fg);
    border: none;
    outline: none;
    font: inherit;
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.composer-button {
    padding: 6px 12px;
    background: var(--bg3);
    color: var(--fg2);
    border: none;
    font: inherit;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}
.composer-button:hover {
    background: var(--bg4);
}
.composer-button.attached {
    color: var(--title);
}

.composer-error {
    color: #b06a6a;
}

.feed-empty {
    text-align: center;
    color: var(--fg3);
}

#feed {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    white-space: none;
    gap: 8px;
}

.post {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px;
    justify-content: flex-end;
    background: var(--bg3);
    text-decoration: none;
    transition: background-color 0.2s;
}

.post-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

.post-delete button {
    padding: 4px 6px;
    background: none;
    color: var(--fg3);
    border: none;
    font: inherit;
    cursor: pointer;
    transition: color 0.2s;
}
.post-delete button:hover {
    color: #b06a6a;
}

.post-timestamp {
    color: var(--fg3);
    margin-bottom: 10px;
    margin-left: 12px;
    margin-top: 6px;
}

.post-body {
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 8px;
}

.post-image {
    max-height: 100%;
    max-width: 100%;
    margin: 12px;
}

/* ---------------------- */
/* map */
/* ---------------------- */

#map {
    height: 420px;
    background: var(--bg3);
}

.map-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.map-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.map-button {
    padding: 6px 12px;
    background: var(--bg3);
    color: var(--fg2);
    text-decoration: none;
    user-select: none;
    transition: background-color 0.2s;
}
.map-button:hover {
    background: var(--bg4);
}

