/* --- 基本スタイル --- */
body {
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans CJK JP', sans-serif; */
    font-family: 'Rounded Mplus 1c', sans-serif;

    background: linear-gradient(180deg, #FFBE7C, #FFA269);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
body.state-active {
    align-items: flex-start;
    padding-top: 1vh;
}

.container {
    /* padding-top: 0px; ← 194px (ロゴの上位置) + 280px (ロゴの高さ) + 67px (指定マージン) */
    /* padding-left: 15px; */
    /* padding-right: 15px; */
    /* padding-bottom: 25px; */
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* ← positionを追加 */
    z-index: 1; 
    /* transition: padding-top 0.3s ease; */
    transition: padding-top 0.3s ease, transform 0.3s ease;
    transform: translateY(-40px); /* ← この行を追加。-40pxで上に40px移動します */
}

h1 {
    color: #ffffff;
    margin-top: 0;
    line-height: 1.2;
}


h1 .wakuwaku { font-size: 36px; transition: font-size 0.3s ease; }
h1 .senko-navi { font-size: 48px; padding-left: 48px; transition: font-size 0.3s ease, padding-left 0.3s ease; }

.title-logo {
    justify-content: center;
    width: 200px; /* ロゴの基本サイズ */
    height: auto; /* 高さは自動で調整 */
    transition: width 0.3s ease, top 0.3s ease, left 0.3s ease;
    margin-bottom: 10px; /* ボタンとの間隔を調整 */
    cursor: pointer;
}

h2 {
    color: #3A3A3A;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 30px;
}
p {
    font-family: 'Rounded Mplus 1c', sans-serif;
    font-weight: bold;
    line-height: 1.7; 
    font-size: 24px; 
    color: #8A3F0D; 
    line-height: 130%;
    padding-top: 12px;
}
.hidden { display: none; }

#start-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    background-color: #FF823C; color: #ffffff; width: 174px; height: 48px;
    border-radius: 30px; padding: 0; display: inline-flex;
    justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- クイズ画面スタイル --- */
.quiz-card {
    background-color: #fff; border-radius: 24px; padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); width: 100%; max-width: 400px;
    margin: 0 auto;
    box-sizing: border-box;
}
.quiz-icon {
    width: 64px; 
    height: 64px; 
    margin: 10px auto 20px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.quiz-icon img { 
    width: 50px; 
    height: auto; 
    object-fit: contain; /* 画像がコンテナに収まるように調整 */
}
button, .answer-btn {
    border: none; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
button:hover, .answer-btn:hover {
    transform: translateY(-2px); 
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); 
}
.btn-group {
    margin-top: 40px; 
    display: flex; 
    flex-direction: row; 
    gap: 15px; 
    justify-content: center; 
}
.answer-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    color: white; 
    padding: 10px 20px; 
    border-radius: 30px;
    flex-grow: 1; 
    max-width: 130px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#no-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    background-color: #79A3FF; 
    border: 2px solid #96C7FF; 
}
#yes-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    background-color: #FF5B49; 
    border: 2px solid #FFAE91; 
}

/* --- 結果画面のスタイル --- */
.result-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 6px;
    margin-top: 0;
    text-shadow:
        2px 2px 0 #DF600F,
        -2px -2px 0 #DF600F,
        2px -2px 0 #DF600F,
        -2px 2px 0 #DF600F,
        2px 0 0 #DF600F,
        -2px 0 0 #DF600F,
        0 2px 0 #DF600F,
        0 -2px 0 #DF600F;

}

.result-card {
    background: #FFFFFF;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    padding: 30px 10px;
    /* width: 100%;
    max-width: 420px; */
    width: 358px;
    box-sizing: border-box;
    text-align: center;
}

#result-major-name {
    font-weight: bold;
    font-size: 24px;
    margin: 0 0 12px 0;
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    /* white-space: nowrap; を必ず削除してください */
}

/* 「専攻」という文字のスタイル */
#result-major-name .senko-suffix {
    font-size: 16px;
    font-weight: bold;
    /* margin-left: 4px; を削除 */
    display: block; /* ← これが改行を強制します */
}

#result-catchphrase {
    font-size: 14px;
    font-weight: bold;
    color: #3A3A3A;
    margin: 0 auto 8px;
    max-width: 300px;
}

.description-box {
    background: #F7F7F7;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 12px;
}

#result-major-description {
    font-size: 14px;
    line-height: 1.8;
    color: #5F5F5F;
    text-align: left;
    margin: 0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
    padding-left: 6px;
}

.tag-pill {
    font-family: 'Rounded Mplus 1c', sans-serif;
    background: linear-gradient(30deg, #FF8174, #FFAF4D);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
    max-width: 420px;
}

#major-link-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    color: #fff;
    padding: 16px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    gap: 6px;
    align-items: center;
}

#restart-btn {
    font-family: 'Rounded Mplus 1c', sans-serif;
    background-color: #fff;
    padding: 16px;
    border-radius: 30px;
    color: #FF8E4A;
    display: flex; /* Flexboxを有効化 */
    align-items: center; /* 上下中央揃え */
    justify-content: center; /* 左右中央揃え */
    gap: 6px; /* テキストとアイコンの間隔 */
}

/* --- 各専攻のテーマカラー --- */
#results-screen.theme-media-innovation #result-major-name { color: #67C5E0; }
#results-screen.theme-media-communication #result-major-name { color: #FFC562; }
#results-screen.theme-music-media #result-major-name { color: #F15FB4; }
#results-screen.theme-media-design #result-major-name { color: #BCDC77; }




.container.result-active h1 { display: none; }

.container.result-active {
    padding-top: 5px;
    transform: translateY(0); /* ← この行を追加 */
}

.container.result-active #results-screen {
    width: 100%;
    max-width: 600px;
    padding: 0 15px;
    box-sizing: border-box;

    /* ↓↓↓ これが今回の重要な修正点です ↓↓↓ */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container.quiz-active .title-logo {
    top: 60px;
    left: 122px;
    width: 150px;
}
.container.quiz-active {
    padding-top: 20px;
    transform: translateY(0); /* ← この行を追加 */
}
.container.result-active {
    padding-top: 0px;
}
/* --- 泡アニメーション --- */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 20px;
    height: 20px;
    /* ↓ 色をより白く（不透明に）変更 */
    background: rgba(255, 255, 255, 0.5); 
    /* ↓ スピードを上げるため、基本の秒数を短く変更 */
    animation: bubble-rise 15s linear infinite; 
    bottom: -150px;
    /* ↓ 完全な円にするため追加 */
    border-radius: 50%; 
}

/* :nth-childを使って、各泡の大きさと動きをランダムに見せる */
.bubbles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.bubbles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 7s; /* ← スピードアップ */
}

.bubbles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.bubbles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 10s; /* ← スピードアップ */
}

.bubbles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.bubbles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.bubbles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.bubbles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 20s; /* ← スピードアップ */
}

.bubbles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 18s; /* ← スピードアップ */
}

.bubbles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 6s; /* ← スピードアップ */
}

/* 泡が昇る動きの定義 (変更なし) */
@keyframes bubble-rise {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh);
        opacity: 0;
    }
}
#major-link-a {
    font-family: 'Rounded Mplus 1c', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: white; /* ← 色を白に統一 */
    text-decoration: none; /* ← 下線を削除 */
    justify-content: center;
    text-align: center;
    text-shadow: 0px 0px 12px #DF600F;
}
#back-btn {
    position: absolute;
    top: 20px;
    left: 10px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10; /* カードより手前に表示 */
}

#back-btn:hover svg path {
    stroke: #5d2500; /* ホバー時に少し濃くする */
}

