:root {
    --bg: #000000;
    --text: #ffffff;
    --dim-text: #888888;
    --border: #333333;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::selection {
    background: #ffffff;
    color: #000000;
}

/* custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background: #222222;
    border: 1px solid #333333;
}
::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #222222 #000000;
    color-scheme: dark;
}

/* scanlines */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.28) 50%);
    background-size: 100% 4px;
    z-index: 9000;
    pointer-events: none;
    opacity: 0.55;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 22px;
    min-height: 100vh;
    padding: 40px 20px 80px 20px; /* Gives balanced breathing room */
    text-align: center;
    overflow-x: hidden;
    color-scheme: dark;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3.2%2C1.8%20C2.2%2C1.8%201.6%2C2.5%201.6%2C3.5%20L1.6%2C18.2%20C1.6%2C19.4%202.8%2C20.3%203.9%2C19.8%20L4.8%2C19.3%20C6.2%2C18.5%207.5%2C17.6%209%2C16.6%20L14.8%2C14.8%20C15.8%2C14.4%2016.4%2C13.6%2016.4%2C12.6%20C16.4%2C11.8%2015.8%2C11%2015%2C10.2%20L4.5%2C2.2%20C4.1%2C1.9%203.7%2C1.8%203.2%2C1.8%20Z%22%20fill%3D%22%23080808%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") 2 2, default;
}

nav a, button, .back-link, .option-btn, .rss-link, .time-btn, .time-card, a {
    cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M8.5%2C2%20C7.5%2C2%206.8%2C2.8%206.8%2C3.8%20L6.8%2C11.5%20C6.3%2C11.2%205.5%2C11%204.8%2C11.5%20C3.8%2C12.2%203.5%2C13.5%204.2%2C14.5%20L7.5%2C19.5%20C8.8%2C21.5%2010.8%2C22.5%2013.2%2C22.5%20L15.5%2C22.5%20C18.5%2C22.5%2020.2%2C20.5%2020.2%2C17.5%20L20.2%2C11.5%20C20.2%2C10.2%2019.2%2C9.5%2018%2C9.5%20C17.5%2C9.5%2017%2C9.8%2016.5%2C10.2%20C16.2%2C9.2%2015.2%2C8.5%2014.2%2C8.5%20C13.7%2C8.5%2013.2%2C8.7%2012.8%2C9%20C12.5%2C8%2011.5%2C7.5%2010.5%2C7.5%20L10.5%2C3.8%20C10.5%2C2.8%209.5%2C2%208.5%2C2%20Z%22%20fill%3D%22%23080808%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") 8 2, pointer;
}

.secret-hint {
    text-decoration: underline dotted 1px #555555;
    text-underline-offset: 4px;
    cursor: help;
}

.secret-hint:hover {
    text-decoration-color: #ffffff;
}

/* Bottom-Right BGM Control */
.bgm-toggle {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    background: #000000;
    color: #ffffff;
    border: 1px solid #444444;
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    padding: 6px 14px;
    z-index: 9999;
    min-width: 140px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.6s ease, background 0.15s ease, color 0.15s ease;
}

.bgm-toggle:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.bgm-toggle.faded {
    opacity: 0;
    pointer-events: none;
}

/* Header & Navigation */
.nav-wrapper {
    max-width: 1120px;
    margin: 0 auto 45px auto;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px 26px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    line-height: 1;
}

@media (min-width: 820px) {
    nav {
        flex-wrap: nowrap;
    }
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 2.1rem;
    letter-spacing: 2px;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.1;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.6;
}

nav a.active {
    text-decoration: underline;
    text-underline-offset: 6px;
    opacity: 1;
}

/* Navigation Line Divider (Targeted to the wide 1050px length) */
.nav-divider {
    border: none;
    border-top: 1px solid #ffffff;
    max-width: 960px; /* Adjust between 840px and 940px to taste */
    width: 95%;
    margin: 0 auto;
}

@keyframes spin3d {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

@keyframes breatheEffect {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}

.title-wrapper {
    margin: 50px auto 60px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.big-title {
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 86px;
    font-weight: normal;
    letter-spacing: 8px;
    display: inline-block;
    transform-style: preserve-3d;
    animation: spin3d 6s linear infinite;
}

.content-container {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.9;
    font-size: 22px;
    animation: breatheEffect 14s ease-in-out infinite;
}

.content-container p {
    margin-bottom: 2.2rem;
}

.archive-section { margin-top: 5rem; }
.lowered-section { margin-top: 7.5rem; }
.maretu-section { margin-top: 5.5rem; }

.pixel-banner {
    margin: 8.5rem auto 4rem auto;
    display: flex;
    justify-content: center;
}

.pixel-banner img {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    border: 1px solid #333333;
    padding: 6px;
    background: #0a0a0a;
}

.category-title {
    font-size: 32px;
    letter-spacing: 4px;
    margin: 3.5rem 0 1.5rem 0;
    text-decoration: underline;
    text-underline-offset: 6px;
    font-weight: normal;
}

.names-list {
    column-count: 3;
    column-gap: 2.5rem;
    line-height: 2.2;
    margin-bottom: 2rem;
    letter-spacing: 1.5px;
    text-align: center;
}

.and-more {
    margin-top: 3.8rem;
    letter-spacing: 2px;
}

.special-thanks-section {
    margin-top: 8.5rem;
    margin-bottom: 2rem;
}

.special-thanks-title {
    font-size: 32px;
    letter-spacing: 4px;
    margin-bottom: 1.2rem;
    text-decoration: underline;
    text-underline-offset: 6px;
    font-weight: normal;
}

.special-thanks-name {
    font-size: 26px;
    letter-spacing: 2px;
}

.journal-entry {
    margin: 3.5rem auto 5rem auto;
    max-width: 760px;
    width: 100%;
    text-align: left;
    scroll-margin-top: 40px;
}

.journal-header {
    margin-bottom: 1.6rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #444444;
}

.journal-date {
    font-size: 15px;
    color: #888888;
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.journal-title {
    font-size: 30px;
    letter-spacing: 2px;
    font-weight: normal;
    color: #ffffff;
}

.journal-body {
    line-height: 1.9;
    font-size: 22px;
    text-align: left;
}

.journal-body p {
    margin-bottom: 1.6rem;
}

.journal-body a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
    word-break: break-all;
    transition: opacity 0.2s ease;
}

.journal-body a:hover {
    opacity: 0.6;
}

.pasta-entry {
    margin: 4.5rem auto;
    max-width: 860px;
    line-height: 1.9;
}

.pasta-author {
    margin-top: 1.2rem;
    font-size: 16px;
    color: #888888;
    letter-spacing: 2px;
}

.pasta-divider {
    border: none;
    border-top: 1px dashed #333333;
    width: 40%;
    margin: 3.5rem auto;
}

.guestbook-box {
    margin: 3.5rem auto 1rem auto;
    max-width: 800px;
    width: 100%;
    border: none;
    outline: none;
    background: #000000;
    overflow: hidden;
}

.guestbook-box iframe {
    width: 100%;
    height: 1250px;
    border: none;
    outline: none;
    background: #000000;
    display: block;
    overflow: hidden;
}

.back-link {
    display: inline-block;
    margin-top: 3.5rem;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 6px;
    font-size: 22px;
    letter-spacing: 2px;
}

.back-link:hover {
    opacity: 0.6;
}

.rss-link {
    display: block;
    margin-top: 1.4rem;
    font-size: 14px;
    color: #666666;
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.2s;
}

.rss-link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.static-footer {
    max-width: 1020px;
    margin: 9rem auto 0 auto;
    padding-top: 2rem;
    font-size: 14px;
    color: #888888;
    letter-spacing: 1px;
    text-align: center;
}

.notice-text {
    margin-bottom: 0.8rem;
}

.copyright-year {
    letter-spacing: 3px;
    font-size: 13px;
    color: #666666;
}

.quiz-box {
    border: 1px solid #333333;
    background: #050505;
    padding: 35px 30px;
    text-align: left;
    margin: 2rem auto;
    max-width: 780px;
}

.phase-header {
    font-size: 15px;
    color: #888888;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #333333;
    padding-bottom: 0.5rem;
}

.question-text {
    font-size: 24px;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #ffffff;
    letter-spacing: 1px;
    min-height: 70px;
}

.reply-text {
    color: #aaaaaa;
    font-style: italic;
    letter-spacing: 2px;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-btn {
    background: #000000;
    color: #cccccc;
    border: 1px solid #333333;
    padding: 16px 20px;
    text-align: left;
    font-size: 20px;
    font-family: inherit;
    line-height: 1.5;
    letter-spacing: 1px;
    transition: all 0.15s ease;
}

.option-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

#giveup-overlay,
#climax-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

#climax-overlay {
    transition: background-color 4s ease;
}

#climax-overlay.blood-glow {
    background-color: #330000;
}

.giveup-text {
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 30px;
    letter-spacing: 4px;
    line-height: 2.2;
    color: #ffffff;
    min-height: 120px;
}

.climax-phrase {
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 44px;
    font-weight: bold;
    letter-spacing: 6px;
    line-height: 1.6;
    color: #ffffff;
    white-space: pre-line;
}

.red-flash {
    color: #ff2222 !important;
    text-shadow: 0 0 15px rgba(255, 34, 34, 0.8);
    letter-spacing: 10px;
}

/* Time zones page */
.time-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 820px;
    margin: 0 auto 2.5rem auto;
    font-size: 15px;
    letter-spacing: 2px;
}

.utc-clock {
    color: #888888;
    font-family: 'DotGothic16', monospace;
}

.time-btn {
    background: #000000;
    color: #cccccc;
    border: 1px solid #333333;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.15s ease;
}

.time-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 820px;
    margin: 0 auto 3rem auto;
    text-align: left;
}

.time-card {
    background: #050505;
    border: 1px solid #333333;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.time-card:hover {
    border-color: #777777;
    background: #0a0a0a;
}

.time-card.is-night {
    border-color: #222222;
    opacity: 0.82;
}

.time-card.is-night:hover {
    border-color: #555555;
    opacity: 1;
}

.time-card.is-local {
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
}

.time-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed #2a2a2a;
    padding-bottom: 8px;
}

.country-name {
    font-size: 21px;
    letter-spacing: 2px;
    color: #ffffff;
    font-weight: bold;
}

.day-status {
    font-size: 13px;
    letter-spacing: 2px;
    color: #888888;
}

.time-card:not(.is-night) .day-status {
    color: #cccccc;
}

.local-badge {
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 2px;
}

.diff-badge {
    color: #777777;
    letter-spacing: 1px;
}

.copy-feedback {
    color: #ffffff !important;
    font-weight: bold;
    letter-spacing: 2px;
}

.time-digits {
    font-family: 'DotGothic16', monospace, sans-serif;
    font-size: 34px;
    letter-spacing: 3px;
    color: #ffffff;
    padding: 4px 0;
}

@keyframes colonBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.25; }
}

.colon {
    display: inline-block;
    animation: colonBlink 1s steps(1, start) infinite;
}

.time-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888888;
    letter-spacing: 1px;
    border-top: 1px dashed #222222;
    padding-top: 8px;
}

/* media */
@media (prefers-reduced-motion: reduce) {
    .big-title,
    .content-container,
    .colon {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@media (max-width: 768px) {
    body { padding: 30px 15px 70px 15px; }
    body, .content-container { font-size: 18px; }
    .big-title { font-size: 44px; letter-spacing: 4px; }
    nav { gap: 8px 14px; }
    nav a { font-size: 1.25rem; letter-spacing: 2px; }
    .names-list { column-count: 2; column-gap: 1.5rem; }
    .category-title, .special-thanks-title, .journal-title { font-size: 24px; }
    .journal-body { font-size: 18px; }
    .guestbook-box iframe { height: 1400px; }
    .question-text { font-size: 20px; }
    .option-btn { font-size: 17px; }
    .climax-phrase { font-size: 26px; letter-spacing: 3px; }
    .giveup-text { font-size: 22px; }

    .bgm-toggle {
        bottom: max(16px, env(safe-area-inset-bottom));
        font-size: 12px;
        min-width: 120px;
        height: 28px;
        line-height: 26px;
    }

    .time-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .time-digits {
        font-size: 28px;
    }
    .country-name {
        font-size: 18px;
    }
    .time-controls {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 440px) {
    .names-list {
        column-count: 1;
    }
}
