:root {
    --text-color: #dadada;
    --highlight-color: #ff002d;
    --link-hover-color: #3bcb74;
    --background-blur: 6px;
}
*{
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    text-decoration: none;
}
body {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    min-height: 100svh;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: manipulation;
    overscroll-behavior: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.top-tab-bar, .content {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: rgba(0, 0, 0, 0.05) -1px -1px 5px 0, rgba(0, 0, 0, 0.15) 0 20px 25px -5px, rgba(0, 0, 0, 0.04) 0 10px 10px -5px;
    backdrop-filter: blur(5px);
    background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0), hsl(0deg 0% 80% / 20%));
}
.top-tab-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.3rem;
    border-radius: 30px;
    transition: bottom 0.4s ease-out;
}
.top-tab-bar.hidden {
    bottom: -100px;
}
.tab-link {
    color: #ffffff;
    padding: 0.6rem;
    border-radius: 40px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.tab-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.tab-link.active {
    background-color: var(--link-hover-color);
    color: #ffffff;
    cursor: default;
}
.tab-link.active:hover {
    background-color: var(--link-hover-color);
}
.tab-link .icon {
    min-width: 24px;
}
.tab-link span {
    opacity: 1;
    padding-left: 5px;
}


body.loaded {
    opacity: 1;
}

body.no-scroll {
    overflow: hidden;
}

.header {
    margin-top: 10rem;
}

p {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    text-decoration: none;
    line-break: strict;
    word-break: keep-all;
    font-size: 2rem;
    text-align: center;
    font-weight: bold;
    text-shadow: 2px 8px 6px rgba(0, 0, 0, 0.2),
    0 -5px 35px rgba(255, 255, 255, 0.3);
}



/* スクロールバースタイル */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
    display: none;
}

::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #888;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    cursor: pointer;
}

::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0);
}

.scroll {
    margin-top: 5%;
    position: relative;
    text-align: center;
    cursor: pointer;
}

.scroll::before {
    -webkit-animation: scroll 2s infinite;
    animation: scroll 2s infinite;
    border-bottom: 5px solid #ffffff;
    border-left: 5px solid #ffffff;
    content: "";
    height: 20px;
    position: absolute;
    width: 20px;
    left: 0;
    margin: auto;
    right: 0;
    top: 0;
}


@-webkit-keyframes scroll {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translate(0, 0);
    }
    40% {
        opacity: 1;
    }
    80% {
        opacity: 0;
        transform: rotate(-45deg) translate(-20px, 20px);
    }
    100% {
        opacity: 0;
    }
}


@keyframes scroll {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translate(0, 0);
    }
    40% {
        opacity: 1;
    }
    80% {
        opacity: 0;
        transform: rotate(-45deg) translate(-20px, 20px);
    }
    100% {
        opacity: 0;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    p {
        font-size: 1.4rem;
    }

    .header {
        margin-bottom: 5%;
        margin-top: 15%;
    }

    .underline:after {
        width: 50%;
    }

    .scroll {
        margin-top: unset;
        margin-bottom: 25%;
    }
}

mark {
    background: linear-gradient(transparent 0%, red 100%);
    color: #dadada;
}

body{
    background-color: #040a2a;
}
body:after, .decoration {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -10;
    pointer-events: none;
}

body:after {
    background-image: radial-gradient(circle, #333e4f 1.5px, transparent 0);
    opacity: 0.5;
    background-size: 50px 50px;
}
.decoration {
    background-image: radial-gradient(ellipse at 20% 30%, rgba(56, 189, 248, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse at 60% 20%, rgba(236, 72, 153, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(34, 197, 94, 0.2) 0%, transparent 65%);
}
@media (max-width: 768px) {
    .top-tab-bar{
        padding: 0.3rem;
    }
    .tab-link span{
        padding-left: 5px;
        font-size:0.9rem;
    }
}

.end-of-content-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
    display: none;
    pointer-events: none;
    z-index: 9;
}

.gallery {
    margin-top: 2rem;
    columns: 5 200px;
    column-gap:0.5em;
    width: 95vw;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.gallery.visible {
    opacity: 1;
}

@media (max-width: 1024px) {
    .gallery {
        -moz-columns: 4 150px;
        columns: 4 150px;
        margin-top: 1rem;
    }
}

.gallery img {
    display: block;
    margin-bottom: 0.5em;
    max-width: 100%;
    height: auto;
    border-radius: 1em;
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);*/
    cursor: pointer;
    transition: transform 0.5s, box-shadow 0.3s, opacity 0.5s;
    transform: translateY(0);
    will-change: transform, box-shadow;
}


.gallery img:hover {
    transform: scale(1.03);
/*    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);*/
}

.image-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    line-height: 0;
    border-radius:1em;
}

.sensitive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    visibility: visible;
    z-index: 5;
    padding: 1rem;
    box-sizing: border-box;
}

.gallery-verified .sensitive-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sensitive-overlay .warning-text {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.sensitive-overlay .show-button {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sensitive-overlay .show-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.category-navbar {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;

}

.category-tab {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    backdrop-filter: blur(15px);
}

.category-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.category-tab.active {
    background-color: #fff;
    color: #121212;
    border-color: #fff;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(67, 73, 75, 0);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
}

.lightbox.active {
    display: flex;
    background-color: rgba(67, 73, 75, 0.25);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.lightbox img {
    max-width: 98vw;
    max-height: 98vh;
    width: auto;
    height: auto;
    border-radius: 1em;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    opacity: 0;
    will-change: transform, opacity;
    transform-origin: center;
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


.close,
.download,
.prev,
.next {
    position: absolute;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 1));
    cursor: pointer;
    z-index: 9999;
    will-change: opacity, transform;
    color:white;
    transition: opacity 0.2s ease-out;
}


.prev,
.next {
    opacity: 0.5;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 1));
}


.close {
    top: 10px;
    right: 10px;
}

.download {
    top: 10px;
    right: 60px;
    #display: none;
}

.prev {
    left: 15%;
    top: 50%;
    transform: translateY(-50%);
}

.next {
    right: 15%;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .close,
    .download {
        top: 5px;
    }

    .prev {
        left: 0;
    }

    .next {
        right: 0;
    }
}

.loader {
    display: none;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    position: fixed;
    transform: translate(-50%, -50%);
    z-index: 1000;
    will-change: transform;
}

@-webkit-keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
