.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100vw;
    align-items: center;
}
body {
    height: 100vh;
    margin: 0;
    color:#112D4E;
    background-color: #F9F7F7;
}
header{
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: #DBE2EF;
    width: 100vw;
    color: #112D4E;
    z-index: 3;
}
main {
    max-width: 800px; /* メインコンテンツの最大幅を設定 */
    width: 100%;
    padding: 0;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}
footer{
    background-color: #3F72AF;
    width: 100vw;
    text-align: center;
    color: #F9F7F7;
    margin-top: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}
section{
    padding: 20px;
    background-color: #DBE2EF;
    margin: 10px;
    border-radius: 10px;
}
span{
    display: inline-block
}
h1{
    text-align: center;
}
h2{
    border-bottom: 2px solid;
    border-color: #3F72AF;
    padding: 0 4px;
    margin-top: 0;
}
a {
    color: #3F72AF;
    cursor: pointer;
    /*text-decoration: none; /* 下線を削除する */
}
.titleText{
    color: #112D4E;
    text-decoration: none; /* 下線を削除する */
}
.loader {
    color: #112D4E;
    /*text-indent: -9999em;*/
    font-size: 20px;
    background-color: #F9F7F7;
    width: 100vw;
    height: 100vh;
    transition: all 1s;
    position: fixed;
    top:0;
    left:0;
    z-index: 2;
    display: flex;
    justify-content: center; /* 水平方向の中央揃え */
    align-items: center; /* 垂直方向の中央揃え */
    font-family: 'M PLUS Rounded 1c', sans-serif;
}
.loaded {
    opacity: 0;
    visibility: hidden;
}

/* エラー表示 */
.error-display {
    color: #ff0000;
    text-align: center;
    margin: 10px 0;
}

/* 入力フォーム */
.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 0 0 30px 0;
}

.input-container label {
    font-size: 16px;
    color: #112D4E;
}

input[type="text"] {
    width: 95%;
    max-width: 400px;
    padding: 10px;
    font-size: 20px;
    border: 2px solid #DBE2EF;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background: #F9F7F7;
    color: #112D4E;
}

input[type="text"]:focus {
    border-color: #3F72AF;
    box-shadow: 0 0 0 3px rgba(63, 114, 175, 0.1);
}

input[type="text"].error-border {
    border-color: #ff0000;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #3F72AF;
    color: #F9F7F7;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2E5A8E;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(63, 114, 175, 0.3);
}

.sync-btn {
    background-color: #4CAF50;
    padding: 2px 8px;
    font-size: 12px;
    width: min-content;
    min-width: 24px;
}

.sync-btn:hover {
    background-color: #45a049;
}

/* キャンバス関連 */
.canvas-section {
    text-align: center;
    margin: 0;
}

.output-display {
    font-size: 20px;
    color: #112D4E;
    margin: 0px;
}

.output-display output {
    font-size: 30px;
    color: #3F72AF;
    word-wrap: break-word;
    word-break: break-all;
}

canvas {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: #5a5a5a;
    max-width: 100%;
}

/* レンジスライダー */
.range-controls {
    margin: 0;
}

.range-item {
    margin: 0;
}

.range-item label {
    display: block;
    color: #112D4E;
}

input[type="range"] {
    appearance: none;
    width: 90%;
    max-width: 300px;
    height: 10px;
    border-radius: 5px;
    background: #F9F7F7;
    outline: none;
    margin: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3F72AF;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(63, 114, 175, 0.5);
} */

/* 設定項目 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 5px 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #DBE2EF;
    border-radius: 5px;
}

.setting-item label {
    color: #112D4E;
    font-weight: 500;
}

select {
    padding: 5px 10px;
    border: 1px solid #DBE2EF;
    border-radius: 5px;
    background: white;
    color: #112D4E;
    cursor: pointer;
    outline: none;
}

select:focus {
    border-color: #3F72AF;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

input[type="color"] {
    width: 40px;
    height: 30px;
    border: 1px solid #DBE2EF;
    border-radius: 5px;
    cursor: pointer;
}

/* 情報表示 */
.info-text {
    color: #112D4E;
    line-height: 1.8;
    margin: 10px 0;
}

.info-text strong {
    color: #3F72AF;
    font-size: 18px;
}

/* アコーディオン */
.accordion {
    margin-top: 20px;
}

.accordion-header {
    padding: 15px 20px;
    background-color: #3F72AF;
    color: #F9F7F7;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    transition: all 1.5s ease;
}

.accordion-header:hover {
    background-color: #2E5A8E;
}

.accordion-item.active .accordion-header {
    border-radius: 10px 10px 0 0;
}

.accordion-icon {
    transition: transform 0.5s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1.5s ease;
    background: #F9F7F7;
    border-radius: 0 0 10px 10px;
}

.accordion-item.active .accordion-content {
    max-height: 800px;
    border: 1px solid #DBE2EF;
    border-top: none;
}

.version-list {
    padding: 20px;
    max-height: 500px; /* 最大高さを設定 */
    overflow-y: auto; /* 縦スクロールを有効化 */
}

.version-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 8px 0;
    border-bottom: 1px solid #DBE2EF;
}

.version-item:last-child {
    border-bottom: none;
}

.version-date {
    color: #3F72AF;
    min-width: 100px;
}

.version-number {
    color: #112D4E;
    font-weight: 500;
    min-width: 60px;
}

.version-description {
    color: #666;
}

/* スクロールバーのスタイル */
.version-list::-webkit-scrollbar {
    width: 8px;
}

.version-list::-webkit-scrollbar-track {
    background: #F9F7F7;
    border-radius: 4px;
}

.version-list::-webkit-scrollbar-thumb {
    background: #3F72AF;
    border-radius: 4px;
}

.version-list::-webkit-scrollbar-thumb:hover {
    background: #2E5A8E;
}

/* 警告表示 */
.low-fps-warning {
    display: none;
    position: relative;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 12px 35px 12px 12px; /* 右側にバツボタン用スペース */
    margin: 10px 0;
    color: #856404;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.low-fps-warning-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #856404;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.low-fps-warning-close-btn:hover {
    background-color: #f5c842;
    color: white;
}

/* フッターリンク */
.back-home-footer{
    color: #F9F7F7;
    text-decoration: none;
    padding: 8px 20px;
    margin: 20px;
    border: 2px solid #F9F7F7;
    border-radius: 5px;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.back-home-footer:hover {
    background-color: #F9F7F7;
    color: #3F72AF;
}

.contact{
    color: #F9F7F7;
    text-decoration: underline;
    transition: transform 0.4s ease; /* ゆっくりアニメーション */
}

.contact:hover{
    font-weight: bold;
    transform: scale(1.05); /* 少し大きく（5%拡大） */
}

.log-div{
    padding: 5px;
    background: #F9F7F7;/*背景色*/
    margin: 0 0 20px 0;
    border-radius: 4px;
    text-align: center;
}
.log-div a{
    color: #3F72AF;
    text-decoration: underline;
    word-wrap: break-word;  /* 長い単語を強制的に折り返し */
    word-break: break-all;  /* すべての文字で折り返し可能 */
    max-width: 380px !important;
    margin: 5px auto;
}
.log{
    opacity: 0;
    max-height: 0;
    transition: all 1.5s;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95%;
    max-width: 400px;
}

/* スクロールバーのスタイル */
.log::-webkit-scrollbar {
    width: 8px;
}

.log::-webkit-scrollbar-track {
    background: #F9F7F7;
    border-radius: 4px;
}

.log::-webkit-scrollbar-thumb {
    background: #3F72AF;
    border-radius: 4px;
}

.log::-webkit-scrollbar-thumb:hover {
    background: #2E5A8E;
}

.input-box{
    display: flex;
    align-items: center;
    justify-content: center;
    width:100%;
}