@charset "utf-8";

html {
    touch-action: pan-y;
    height: auto;
}

/* 全体のリセット */
body {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #000000;
}


/* ヘッダーの調整 (2枚目優先) */
.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: 0;
    width: 100%;
    background-color: #090909;
    position: relative;
    box-sizing: border-box;
    z-index: 500;
}

.header-top {
    position: fixed; /* 1枚目の後半を採用、stickyは上書き */
    display: flex;
    justify-content: center; /* 2枚目 */
    align-items: center;
    background-color: #090909;
    width: 100%;
    z-index: 500;
    top: 0;
}

.header h2 {
    margin: 0; /* 2枚目 */
    z-index: 1000;
    line-height: 41px; /* 2枚目 */
}

.header p {
    margin: 20px 0 0 0; /* 1枚目 */
    padding: 40px 0 10px 0; /* 1枚目 */
    color: #ff0;
    font-size: 12px;
}

/* バーガーメニューの調整 (2枚目) */
.extra-menu {
    position: absolute;
    right: 0;
    margin: 6px 12px 0 0;
    z-index: 2000;
}

.extra-checkbox {
    display: none;
}

.extra-icon {
    display: block;
    width: 30px;
    height: 30px;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    border: 2px solid #808080;
    box-sizing: border-box;
}

.extra-icon span {
    position: absolute;
    height: 2px;
    width: 22px;
    background: #808080;
    transition: all 0.3s ease;
    left: 2px;
    top: 50%;
    transform: translateY(-0%);
}

.extra-icon span:nth-child(1) { top: 25%; }
.extra-icon span:nth-child(2) { top: 50%; }
.extra-icon span:nth-child(3) { top: 75%; }

.extra-checkbox:checked + .extra-icon span:nth-child(1) {
    transform: rotate(45deg);
    top: 50%;
}

.extra-checkbox:checked + .extra-icon span:nth-child(2) {
    opacity: 0;
}

.extra-checkbox:checked + .extra-icon span:nth-child(3) {
    transform: rotate(-45deg);
    top: 50%;
}

#reloadButton{
  z-index: 500;
}

nav {
    position: sticky;
    top: 43px;
    width: 100%;
    max-width: 800px;
    background-position: center;
    background-size: cover;
}

.monomaniac-one-regular {
    font-family: "Monomaniac One", serif;
}

h2 {
    color: #ff0;
}

h2 + p {
    color: #ff0;
    font-size: 12px;
}

ul {
    margin: 0;
    padding: 0;
    max-width: auto;
    display: flex;
    text-align: center;
}

ul li {
    flex-direction: row;
    margin: 0;
    padding: auto;
    display: inline-block;
    list-style: none;
    flex-wrap: wrap;
    height: 30px;
    width: 25%;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #888;
    line-height: 2;
    font-size: 15px;
    font-weight: bold;
    background: #afafaf;
}

li:hover {
    color: rgb(255, 255, 0);
    display: block;
    text-decoration: none;
}

li a {
    color: rgb(0, 0, 0);
    display: block;
    text-decoration: none;
}

li a:hover {
    color: rgb(255, 255, 0);
    display: block;
    text-decoration: none;
}

/* メインコンテナ */
.container {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    background-image: -webkit-repeating-linear-gradient(90deg, hsla(0,0%,100%,0) 6%, hsla(0,0%,100%, .1) 7.5%),  
                    linear-gradient(145deg, hsl(0,0%,78%) 0%, hsl(0,0%,90%) 47%, hsl(0,0%,78%) 53%, hsl(0,0%,70%) 100%);
    background-size: cover;
    background-color: #000;
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.digit-output {
    width: 45px;
    height: 38px;
    font-size: 24px;
    text-align: center;
    color: #ff0;
    background-color: #000000;
    border: 3px solid #acacac;
    border-radius: 12px;
    font-family: "Monomaniac One", serif;
}

/* 履歴とリザルト */
.history-and-result {
    max-height: 234px;
    min-height: 33px;
    width: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 1px;
    margin-bottom: 5px;
    background: #080808;
    display: flex;
    flex-direction: column;
}

/* 結果 */
.history-content {
    flex-grow: 1; /* 上に伸びるスペースを確保 */
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.history-content p {
    color: #00c50ae2;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

/* メッセージ */
.result-content {
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    padding: 5px 0;
}

/* その他のスタイル */
.highlight { color: red; }
.highlightbite { color: yellow; }
.highlightzero { color: blue; }
.red { color: red; }
.big { font-size: 1.2em; }

.smoke {
    position: relative;
    animation: slideShadow 1.5s linear forwards;
}

@keyframes slideShadow {
    0% { text-shadow: 0px 0 0 rgba(232, 232, 232, 0.5); }
    100% { text-shadow: 0px 1px 3px #e8e8e8e8; }
}

footer {
    background: #090909;
    text-align: center;
    bottom: 0;
    width: 100%;
}

footer p {
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

.ad-section {
    border-top: 1px solid #ffffff;
    padding: 10px;
    text-align: center;
}

.ad-section p {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}