:root {
    --vh: 1vh;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    background-color: #595959;
}

/* Hide arrows in Webkit browsers (Chrome, Safari, Edge) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide arrows in Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    margin: 0;
    background-color: #595959;
}

a {
    text-decoration: none;
    color: initial;
}

strong {
    font-weight: 500;
}

/* Hover effects ============================= */
/* =========================================== */

.info .username:active a,
.stats:active a,
.like:active,
.comment:active {
    color: rgba(0, 0, 0, 0.5);
}

.buttons:not(input):focus-visible {
    outline: none;
    opacity: 0.7;
    background: #111111;
    color: #ffffff;
}

.pfp,
.post > div,
.info .username div,
.stats div,
.post div > .username,
.like,
.comment,
.comment-pfp,
.posts-comments,
.handle .username div {
    transition: opacity 0.15s ease;
}

.pfp:hover,
.post > div:hover {
    opacity: 0.85;
}

.info .username div:hover,
.stats div:hover,
.post div > .username:hover,
.like:hover,
.comment:hover,
.comment-pfp:hover,
.posts-comments:hover {
    opacity: 0.5;
}

.handle .username div:hover {
    opacity: 0.7;
}

.home:focus-visible {
	outline: none;
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 4px;
}

.navigation .home:focus-visible {
    outline: none;
    opacity: 0.7;
    filter: invert(1);
}

/* Main ====================================================================================================== */
/* =========================================================================================================== */

.background {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('bg/yuihorie_official/2560.png') no-repeat center top;
    background-size: cover;
    opacity: 0;
    filter: brightness(35%);
    transition: opacity 0.1s ease-in-out;
}

.main {
    display: flex;
    width: 100%;
    max-width: 75.6%;
    max-height: 95%;
    aspect-ratio: 1421 / 921;
    justify-content: flex-start;
    align-items: stretch;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    overflow: hidden;
}

/* Media ===================================================================================================== */
/* =========================================================================================================== */

.media {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    background-color: #000000;
}

.media img,
.media video {
    display: none;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Content Isand ============================================================================================= */
/* =========================================================================================================== */

.content-island {
    display: flex;
    flex-direction: column;
    width: 35.19%;
    min-width: 35.18%;
    padding: 10px 12px;
    padding-bottom: 0;
    border-left: 2px solid #efefef;
    box-sizing: border-box;
    background-color: #ffffff;
    z-index: 3;
}

/* Profile =================================================================================================== */
/* =========================================================================================================== */

.profile {
    display: flex;
    border-bottom: 2px solid #efefef;
}

.pfp {
    height: 134px;
    border-radius: 50%;
}

.pfp img {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 1px solid #d4d8d7;
}

.info {
    padding-left: 12px;
    padding-bottom: 16px;
    line-height: 1.5;
}

.username {
    font-weight: 500;
}

.info .username {
    font-size: 20px;
}

.stats {
    display: inline-block;
    margin-right: 24px;
    font-size: 14px;
}

.bio {
    font-size: 12px;
}

/* Home ============================================ */

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 15px;
    margin-top: 8px;
    margin-left: auto;
    transition: opacity 0.15s ease;
}

.home img {
    height: 100%;
    margin-right: 2px;
}

.home:hover {
    opacity: 0.5;
}

.footer .home {
    display: none;
    position: absolute;
    top: 2px;
    right: 0;
    margin-top: unset;
}

.navigation .home {
    display: none;
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(15px * 2 + 8px);
    height: calc(15px + 8px);
    margin-top: unset;
    border-radius: 4px;
    background-color: #ffffff;
    transition: filter 0.3s, opacity 0.3s;
}

.navigation .home > img {
    height: 15px;
}

/* Body ====================================================================================================== */
/* =========================================================================================================== */

.body {
    height: 100%;
    padding-left: 2px;
    margin-left: -2px;
    overflow: hidden;
    overflow-y: scroll;
	scrollbar-width: thin;
}

.post {
    display: flex;
    padding-top: 10px;
}

.post > div:has(img) {
    height: 76px;
    border-radius: 50%;
}

.post img {
    width: 74px;
    height: 74px;
    border: 1px solid #d4d8d7;
    border-radius: 50%;
}

.post .wrapper,
.commenters .wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-left: 12px;
}

.post .username {
    font-size: 18.5px;
}

.post a:has(.username) {
    width: fit-content;
}

.post a:has(.username):hover {
    color: rgba(0, 0, 0, 0.5);
}

.posts-comments {
    height: 15px;
    background-color: #efefef;
    border-radius: 4px;
    margin-bottom: 6px;
    margin-top: 2px;
}

/* Case for when there's no post content on the inputted */
/* Display set to block via JS ========================= */

.noContent {
    display: none;
}

.noContent div {
    height: 16px;
    background-color: #efefef;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
}

.noContent div:nth-child(1) {
    width: 245px;
    margin-top: 6px;
}

.noContent div:nth-child(2) {
    width: 48px;
}

.noContent div:nth-child(3) {
    width: 96px;
}

/* ===================================================== */

.content {
    font-size: 14px;
}

.content span {
    display: none;
    word-break: break-all;
}

.commenters {
    display: flex;
    margin-left: 36px;
}

.comment-pfp {
    width: 48px;
    min-width: 48px;
    height: 48px;
    background-color: #efefef;
    border-radius: 50%;
}

/* Footer ==================================================================================================== */
/* =========================================================================================================== */

.footer {
    width: 100%;
    padding-top: 10px;
    border-top: 2px solid #efefef;
}

.like,
.comment {
    display: flex;
    width: fit-content;
    gap: 5px;
    font-size: 14px;
    /* font-weight: 500; */
}

.timestamp {
    color: #737373;
    font-size: 12px;
}

.timestamp span {
    margin-top: 2px;
    margin-bottom: 10px;
}

.like > span,
.comment > span {
    font-weight: 500;
}

.like span,
.comment span,
.timestamp span {
    display: none;
}

/* Case for when there's no like/comment data */
/* Display set to block via JS ============== */

.like .wrapper div,
.comment .wrapper div {
    display: none;
    width: 34px;
    height: 15px;
    background-color: #efefef;
    border-radius: 4px;
}


.like .wrapper,
.comment .wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.comment .wrapper {
    margin-right: calc(34px + 12px);
}

.comment .wrapper div {
    width: 16px;
}

/* ========================================== */

/* Navigation Buttons ======================================================================================== */
/* =========================================================================================================== */

.navigation {
    z-index: 2;
}

.navigation > div > div {
    position: fixed;
}

div:has(> #beginning) {
    bottom: 0;
    left: 0;
    margin-bottom: 16px;
    margin-left: 12px;
}

div:has(> #end) {
    bottom: 0;
    right: 0;
    margin-bottom: 16px;
    margin-right: 12px;
}

div:has(> #random) {
    top: 0;
    right: 0;
    margin-top: 16px;
    margin-right: 12px;
}

div:has(> div > .index) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    top: 0;
    left: 0;
    margin-left: 12px;
    margin-top: 16px;
}

div:has(> .index) {
    display: flex;
    gap: 9px;
    cursor: unset;
    white-space: nowrap;
}

.current-index {
    border-radius: 5px;
    text-align: center;
    font-size: 10px;
    font-style: italic;
    font-weight: 500;
    background-color: #ffffff;

}

.index.buttons {
    width: 43px;
    height: 29px;
    padding: 0 8px;
    border: 1.5px solid #000000;
    box-shadow: 0 0 0 1px #ffffff;
    cursor: unset;
}

.index.buttons:hover {
    opacity: unset;
}

.index.buttons:focus-visible {
    outline-color: #f91880;
}

/* Used to hide the mobile elements on desktop */

.main-nav .buttons div {
    display: none;
}

/* =========================================== */

.main-nav {
    top: 50%;
    transform: translateY(-50%);
}

.main-nav:has(> #previous) {
    left: 0;
    margin-left: 12px;
}

.main-nav:has(> #next) {
    right: 0;
    margin-right: 12px;
}

.main-nav .buttons {
    width: 32px;
    padding: 0;
    border-radius: 50%;
    line-height: 0;
}

.buttons {
    height: 32px;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background-color: #ffffff;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}

.buttons:hover {
    opacity: 0.7;
}

.navigation button:active,
.navigation .home:active {
    opacity: 0.5;
    transition: opacity 0.1s;
}

.sidebar {
    display: none;
    width: 24px;
    z-index: 2;
}

.sidebar button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50%;
    background-color: #111111;
    border: none;
    cursor: pointer;
    color: #eeeeee;
    font-size: 24px;
    transition: background-color 0.3s;
}

.sidebar #previous {
    border-top-left-radius: 5px;
}


.sidebar #next {
    border-bottom-left-radius: 5px;
}


.sidebar button:nth-child(1) {
    border-bottom: 2px solid #dbdbdb;
}

.sidebar button:hover,
.sidebar button:focus-visible {
    outline: none;
    background-color: #eeeeee;
    color: #111111;
}
