body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #ffffff;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* ロゴのデザイン調整 */
#logo-container {
    text-align: center;
    margin-bottom: 0px;
}

#main-logo {
    width: 800px;
    max-width: 100%;
    height: auto;
    margin: auto;
    margin-bottom: 0px;
}

/* スタートボタン（青色） */
.primary-btn {
    background-color: #87CEEB;
    color: #ffffff;
}

.primary-btn:hover {
    background-color: #4682B4;
}

#contact-info {
    margin-top: 20px;
}

#twitter-logo {
    width: 50px;
    height: 50px;
    transition: transform 0.2s;
    vertical-align: middle;   
    margin-bottom: -6px;
    margin-top: 0px;
}

#twitter-logo:hover {
    transform: scale(1.1);
}

/* style.css */
.prep {
    color: #1e90ff;
}

footer a {
    color: #0078D7;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

.character-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.character-button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    outline: none;
}

.character-button img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.2s;
}

.character-button img:hover {
    transform: scale(1.1);
}

#video-player {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 800px;
    height: auto;
    background-color: black;
    border: 2px solid #ccc;
    border-radius: 10px;
}

.choice-btn {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.choice-btn:hover {
    background-color: #0056b3;
}

h2 {
    margin-bottom: 10px;
}

#result-judgement {
    font-size: 1.5em;
    margin-top: 5px;
    margin-bottom: 1px;
    display: inline-block;
    text-align: center;
}

#player-choice,
#correct-answer {
    font-size: 1.2em;
    margin-bottom: 1px;
    line-height: 1;
    font-size: 16px;
    text-align: center;
}

#skill-details table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 90%;
}

#skill-details td {
    padding: 4px;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

#skill-details {
    font-size: 14px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 20px 0;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

#button-container {
    display: flex;
    position: sticky;
    justify-content: center;
    margin-top: 20px;
    padding: 10px;
}

#character-list {
    margin: 20px auto;
    max-width: 800px;
    text-align: left;
}

#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.pagination-btn:hover {
    background-color: #0056b3;
}

.missed-move {
    cursor: pointer;
    text-decoration: none;
    color: black;
    font-size: 16px;
}

.missed-move:hover {
    text-decoration: underline;
}

#info-screen {
    padding: 20px;
    text-align: center;
}

/* アコーディオンのスタイル改良 */
.accordion {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.accordion-item {
    margin-bottom: 10px;
    overflow: hidden;
    border: none !important;
    box-shadow: none !important;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to right, #929292, #ffffff);
    color: #ffffff;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    height: 10px;
    border: none !important;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: none !important;
    outline: none !important;
    background-clip: padding-box;
}

.accordion-header:hover {
    background: linear-gradient(to right, #32bae7, #f0fcff);
    color: #ffffff;
}

.accordion-content {
    display: none;
    padding: 15px 20px;
    background: #e3e3e3;
    font-size: 1em;
    line-height: 1.6;
    color: #333333;
    animation: slideDown 0.3s ease;
    border: none !important;
    box-shadow: none !important;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-icon {
    color:  #9ba7aac0;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.accordion-header:hover .accordion-icon {
    color: #f0f8ff;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thin-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 8px 16px;
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    color: #888;
}

.next-btn {
    background-color: #87CEEB;
    color: #ffffff;
}

.prep {
    color: #32bae7;
    font-weight: bold;
}

li .checked {
    color: #32bae7;
    font-weight: bold;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.checked-icon {
    display: inline-block;
    vertical-align: text-bottom;
    margin-left: 0.3em;
    color: #32bae7;
    font-size: 1.3em;
    font-weight: bold;
    animation: fadeInScale 0.5s ease-out;
}

.quiz-choice-btn {
    background-color: #318ef2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.2s;
    margin: 5px auto;
    display: inline-block;
    width: calc(45% - 10px);
    max-width: 300px;
}

.quiz-choice-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.quiz-choice-btn:active {
    background-color: #003f7f;
    transform: scale(0.95);
}

.quiz-choice-btn:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
}

#update-container {
    display: flex;
    align-items: flex-start;   
    justify-content: left;
    font-size: 6;
    margin-top: 0px;
    padding-top: 0
}


#x-logo {
    width: 30px;
    height: auto;
    margin-right: 8px;
}

#update-info {
    font-size: 16px;
    color: #888888;
}

/* Custom アコーディオンスタイル */
#custom-accordion-recorded {
    margin: 10px auto;
    max-width: 800px;
    text-align: left;
    color: gray;
}
#custom-accordion-tbd {
    margin: 10px auto;
    max-width: 800px;
    color: rgb(34, 34, 34);
    text-align: left;
    font-size: 1em;
}
.custom-accordion-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 5px;
    overflow: hidden;
}
.custom-accordion-header {
    background-color: #dedede;
    padding: 5px;
    cursor: pointer;
    color: #535353;
    text-align: left;
    transition: background-color 0.3s;
}
.custom-accordion-header:hover {
    background-color: #818181;
}
.custom-accordion-content {
    display: none;
    padding: 10px;
    background-color: #ffffff;
    font-size: 0.7em;
    border-top: 1px solid #ddd;
}
.custom-accordion-item.active .custom-accordion-content {
    display: block;
}
#recorded-skills-section h4,
#tbd-section h4 {
    text-align: left;
    color: gray;
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: bold;
}
.screen {
    display: none;
}
.screen.active {
    display: block;
}

/* 選択肢のカードスタイル */
.answer-item {
    background: #e5e5e5;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.answer-header {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 3px;
    color: gray;
    text-align: left;
}
.frame-section span {
    font-size: 12px;
    color: #555;
}
.answer-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.frame-input {
    width: 30px;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.choice-input {
    flex: 1;
    padding: 4px;
    width: 50px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.frame-section {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
/* ========================================================================== */
/* Review Page 専用スタイル */
/* ========================================================================== */
#review-screen {
    padding-bottom: 60px;
}
#review-screen #current-session-section h3 {
    font-size: 1.em;
    font-weight: bold;
    color: #666666;
    padding-bottom: 1px;
    margin-bottom: 1px;
}
#review-screen #saved-moves-section h3 {
    font-size: 1.1em;
    color: #666666;
    padding-bottom: 0px;
    margin-bottom: 0px;
}
#review-screen #current-missed-container ul {
    margin: 0;
    padding: 0;
    color: #4a4a4a;
    list-style: none;
}
#review-screen #current-missed-container li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px;
}
#review-screen #current-missed-container li > div {
    margin-left: auto;
}
#review-screen #saved-moves-container h3.saved-moves-header {
    position: relative;
    padding-left: 20px;
    font-weight: bold;
    margin: 8px 0 4px;
}
#review-screen #saved-moves-container h3.saved-moves-header::before {
    content: "► ";
    position: absolute;
    left: 0;
    color: #6d6e6e;
}
#review-screen #saved-moves-container ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #595959;
}
#review-screen #saved-moves-container li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}
#review-screen #saved-moves-container li > div {
    margin-left: auto;
}
#del-all-checked {
    white-space: nowrap;
}
#review-screen #saved-moves-container ul {
    background-color: #eeeeee;
    padding: 0px 10px;
    border-radius: 0 0 5px 5px;
    margin: -2px 0 10px 0;
    list-style: none;
}
.clickable-text {
    text-decoration: none;
    cursor: pointer;
}
.clickable-text:hover {
    text-decoration: underline;
}
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}
#current-missed-container li,
#saved-moves-container li {
  display: flex;
  align-items: center;
  font-size: 14px;
  justify-content: space-between;
  padding: 4px 0;
}
#current-missed-container li > div,
#saved-moves-container li > div {
  margin: 0;
}
button.save-move-btn,
button.delete-move-btn {
  margin: 0;
  padding: 4px 8px;
}
#current-missed-container{
    margin: 8px 0 4px;
    text-align: left;
}
.saved-moves-header {
    text-align: left;
    font-size: 14px;
    margin: 8px 0 4px;
}
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.common-btn {
  background: #f3f3f3;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 12px 15px;
  font-size: 1.12em;
  font-weight: normal;
  box-shadow: none;
  transition: background 0.14s, color 0.13s;
  cursor: pointer;
  min-width: 80px;
  margin: 5px 5px 0 5px;
  margin-bottom: 0px;
}
.common-btn:hover,
.common-btn:focus,
.common-btn:active {
  background: #7dc7e4;
  color: #ffffff;
}
.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  margin-top: 15px;
  margin-bottom: 0px; 
  flex-wrap: nowrap;
}
@media (max-width: 500px) {
  .button-group {
    flex-wrap: wrap;   /* 画面が400px以下なら折り返し許可 */
    gap: 2px;          /* モバイル時は間隔を小さくすると綺麗 */
    margin-bottom: 0 
  }
  .common-btn {
    min-width: 90px;   /* 必要なら最小幅も調整 */
    font-size: 1em;
    padding: 10px 8px;
    margin: 3px 3px 0 3px;
  }
}
.save-footer {
  margin-bottom: 12px !important;
}

#update-container {
  display: flex;
  flex-direction: row;
  align-items: center;      /* 縦方向の中央揃え */
  justify-content: center;  /* 横方向の中央揃え */
  margin: 28px 0 16px 0;
  gap: 18px;
}

#twitter-logo {
  width: 48px;    /* お好みで */
  height: 48px;
  display: block;
}

#update-info {
  color: #757575;
  font-size: 1.08em;
  text-align: left;
  margin: 0;
  padding: 0;
}
/* =========================================================
 * Edit Screen: ボタン行の並びを Back｜Save｜Reset に固定（スコープ限定）
 * 既存の .button-group ルールは変更せず、#edit-screen 配下だけ上書き
 * ========================================================= */
#edit-screen .button-group{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;     /* デスクトップでは折り返さない */
}

/* 表示順の固定（HTML順=Save,Reset,Back でも見た目は Back→Save→Reset） */
#edit-screen #back-to-main-btn{ order: -1; }
#edit-screen #save-button{ order: 0; }
#edit-screen #reset-button{ order: 1; }

/* 狭幅では折り返しを許可（順序は order で維持） */
@media (max-width: 520px){
  #edit-screen .button-group{ flex-wrap: wrap; }
}

/* 安全策：Edit中はフロートナビをCSSでも封印（JSと二重ロック） */
body[data-mode="edit"] #float-nav{
  display: none !important;
}
