/* css/cardNew.css */
/* 暗記カードページ用のスタイル */


/* --- 暗記カードページ用にヒーローセクションの配色などを変更 --- */
html,
body {
    background-image: linear-gradient(to bottom, #fff 15.7%, #fced47 15.7%, #fced47 70%, #111 100%);
    background-color: #111; /* グラデーションより下の背景色 */
}
.hero-section {
    background-color: #171502;/* カード全体の背景色 */
	background-image: linear-gradient(to bottom, rgba(18, 16, 1, 0.5) 0%, #171502 12%);
}

.hero-section::before {
    background-image: 
        url(../images/swipeIcon_Left.svg),
        linear-gradient(to right, rgba(18, 16, 1, 0.5), transparent);
}

.hero-section::after {
    right: 0;
    background-image: 
        url(../images/swipeIcon_Right.svg),
        linear-gradient(to left, rgba(18, 16, 1, 0.5), transparent);
}

.hero-character {
    background: url(../images/hero-sectionVispo_cardPage-new.svg) no-repeat bottom;
	background-size: contain;
}

.btn-nav.prev {
	background-image: url(../images/btn_arrowL.svg), linear-gradient(to bottom, #fced47, #fced47);
}

.btn-nav.next {
	background-image: url(../images/btn_arrowR.svg), linear-gradient(to bottom, #fced47, #fced47);
}

.hero-title-logo {
    background-image: url(../images/hero-sectionTitleLogo_cardPage.svg);
}
.hero-phrase-container::before {
    background: url(../images/hero-section_phrase_cardPage.svg) no-repeat center;
}
/* --- ヒーローセクション 円グラフのグラデーション色定義 --- */
.list-progress-chart-container .grad-start {
    stop-color: #faea41; /* グラデーションの開始色 */
}
.list-progress-chart-container .grad-end {
    stop-color: #f0dd13; /* グラデーションの終了色 */
}
.hero-wrapper > .nav-button-group
 {
    margin-top: 25px;
    background: #262626;
    box-shadow: 0 3px 0px rgba(0, 0, 0, 0.35) inset;
}
/* next-stepの単元一覧アイコンのスタイル */
.button-icon.chapter-icon {
    background-color: #fced47;
}
.next-step-area {
	border-top:1px solid #ccc;
	padding-top:50px;
    margin: 70px 20px 80px; /* 上下の余白を調整 */
    text-align: center;
}

/* --- 共有エリアの変更 --- */
.share-wrapper {
    margin-top: -70px;
}
#share-actions-container-inner  {
	border:none;
}
/* ヒントボタン */
.info-btn {
    color: #fff;
    background-color: #111;
    border: 1px solid #444;
    box-shadow: 0 4px 0px #222;
}
.info-btn::before {
    background-image: url(../images/menuPage_icon_question_yellow.svg);
}

/* --- 共有エリアの変更 --- */
#share-actions-container-inner.is-closed
 {
    border: 4px solid #e6d519;
    box-shadow: 0 5px 0px #000;
    background: #000;
}
.share-trigger-icon {
    background: url(../images/iconShareArea_shareNew-W.svg) no-repeat center;
    background-size: 75px;
}
#share-actions-container-inner.is-expanded {
    border: 6px solid #e6d519;
}
#share-actions-container-inner {
    background: #222;
}
.share-expanded-content::before {
    background: url(../images/share_phrase-W.svg) no-repeat center;
    background-size: contain;
}
.share-expanded-content::after {
    color: #888;
}



/* --- 全体レイアウト --- */
.intentionArea {
    padding: 45px 20px 0;
}

.intentionWrap {
    max-width: 500px;
    margin: 0 auto 140px;
    padding-bottom: 70px;
    border-bottom: 1px solid #444;	
}

/* ===============================================
 * ▼▼▼ スタートボタン（グラデーションボーダー版） ▼▼▼
 * ===============================================
 */

.button-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto 0;
}

.start-btn {
    padding: 8px 25px 10px 100px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
    min-height: 100px;
    box-shadow: 0 5px 0px rgba(0, 0, 0, 0.2);
    opacity: 0;
    z-index: 1;
    margin: 6px; 
    border-radius: 66px; 
}
@media (min-width: 420px) {
    .start-btn { padding-left: 120px; }
}
.start-btn > * {
    position: relative;
    z-index: 1;
}

/* --------------------------------------
 * グラデーションボーダーと内側背景の構築
 * -------------------------------------- */

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ▼▼ ボーダーのグラデーションアニメーション用疑似要素 ▼▼ */
.start-btn::before {
    content: '';
    position: absolute;
    z-index: -2;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 66px;
    background-size: 200% auto;
    animation: moveGradient 4s linear infinite;
    box-shadow: 0 0 15px var(--glow-color);
    transition: box-shadow 0.3s ease, filter 0.3s ease;
}

/* 右矢印と内側背景 (::after) */
.start-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 60px;
    background: url('../images/startBtn_arrowR-new.svg') no-repeat calc(100% - 15px) center / 24px 24px,
                var(--inner-bg-color); 
    pointer-events: none;
}

/* --------------------------------------
 * ボタンのテキスト・アイコン・配色
 * -------------------------------------- */

/* テキスト（グラデーション） */
.start-btn b {
    font-size: 36px;
    font-weight: 900;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 200% auto;
    animation: moveGradient 4s linear infinite;
    display: inline-block; 
    vertical-align: bottom;
    margin-top: 0;
}

.start-btn b .small-play {
    font-size: 0.6em;
}

.btn-difficult-practice b { background-image: linear-gradient(90deg, #c93636, #ff4d4d, #ff8080, #ff4d4d, #c93636); }
.btn-sequential b { background-image: linear-gradient(90deg, #7dc3e3, #3bbcf0, #a4d5eb, #3bbcf0, #7dc3e3); }
.btn-random b { background-image: linear-gradient(90deg, #f5e96c, #ffd700, #ffaa00, #ffd700, #f5e96c); }

/* モード用ラベル（カード順に表示 など） */
.start-btn .btn-mode-label {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    display: block;
    margin-top: 2px;
}

/* サブテキスト */
.btn-sub-text {
    display: block;
    font-size: 12px;
    color: #999;
    font-weight: bold;
    margin-top: 3px;
    line-height: 1.4;
}

/* アイコン */
.start-btn .btn-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border-radius: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ▼▼ 各ボタンの固有のグラデーションボーダーと配色設定 ▼▼ */

/* 苦手のみ */
.btn-difficult-practice {
    --glow-color: rgba(201, 54, 54, 0.8);
    --inner-bg-color: #000;
    order: 1;
}
.btn-difficult-practice::before { background-image: linear-gradient(90deg, #c93636, #ff4d4d, #ff8080, #ff4d4d, #c93636); }
.btn-difficult-practice .btn-icon { background-image: url('../images/cardPageBtn_weak-new.svg'); }

/* 順番 */
.btn-sequential {
    --glow-color: rgba(125, 195, 227, 0.8);
    --inner-bg-color: #000;
    order: 2;
}
.btn-sequential::before { background-image: linear-gradient(90deg, #7dc3e3, #3bbcf0, #a4d5eb, #3bbcf0, #7dc3e3); }
.btn-sequential .btn-icon { background-image: url('../images/cardPageBtn_sequence-new.svg'); }

/* シャッフル */
.btn-random {
    --glow-color: rgba(245, 233, 108, 0.8);
    --inner-bg-color: #000;
    order: 2;
}
.btn-random::before { background-image: linear-gradient(90deg, #f5e96c, #ffd700, #ffaa00, #ffd700, #f5e96c); }
.btn-random .btn-icon { background-image: url('../images/cardPageBtn_shuffle-new.svg'); }


/* --------------------------------------
 * アニメーション・ホバー・キャラクター
 * -------------------------------------- */

/* ホバー時の動き */
.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.start-btn:hover::before {
    box-shadow: 0 0 25px var(--glow-color);
    filter: brightness(1.2);
}
.start-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 表示時のスタンプアニメーション */
@keyframes stampIn {
    0% { transform: scale(1.15); opacity: 0; }
    50% { transform: scale(0.98); opacity: 1; }
    80% { transform: scale(1.01); }
    100% { transform: scale(1.0); opacity: 1; }
}

.button-container.is-visible .start-btn {
    animation: stampIn 0.5s cubic-bezier(0.39, 0.575, 0.565, 1) forwards;
}
.button-container.is-visible .btn-difficult-practice { animation-delay: 0.1s; }
.button-container.is-visible .btn-sequential,
.button-container.is-visible .btn-random { animation-delay: 0.2s; }


/* オススメ状態の光彩揺らぎ（index.html同様） */
@keyframes primary-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 15px var(--glow-color);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 35px var(--glow-color);
        filter: brightness(1.2);
    }
}

.start-btn.is-primary-action::before {
    animation: moveGradient 4s linear infinite, primary-glow-pulse 1.5s ease-in-out infinite;
}

/* キャラクター配置 */
.start-btn .recommend-character {
    position: absolute !important;
    bottom: calc(100% - 0px);
    left: 40px;
    width: 90px;
    height: 85px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    z-index: 10;
    pointer-events: none;
}
.start-btn .recommend-character.character-happy {
    background-image: url('../images/adviceComment_tako-kiai.svg');
}
.start-btn .recommend-character.character-normal {
    background-image: url('../images/adviceComment_tako-kirakira.svg');
}

/* キャラクターが配置されるボタンにはスペースを空ける */
.start-btn.has-character {
    margin-top: 10px; 
}


/* ===============================================
 * ▼▼▼ スタートを促すテキストのスタイル ▼▼▼
 * ===============================================
 */
.prompt-start-container {
    margin: 40px 0 -10px; /* button-containerの上部に配置するための調整 */
    text-align: center;
    position: relative;
    z-index: 1;
}

.prompt-start-text {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: #999;
    text-shadow: 0 1px 1px rgba(230, 213, 57,0.5);
    letter-spacing: 0em;
    animation: blink 1.8s ease-in-out infinite;
}

/* テキストの点滅アニメーション */
@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1);
    }
}

/* ===============================================
 * ▼▼▼ 設定用トグルボタン（シャッフル・音声）のスタイル ▼▼▼
 * ===============================================
 */
.setting-toggles-container {
    max-width: 500px;
    margin: 0 auto 5px; /* button-containerに少し被るように配置 */
    padding: 0 0px;
    display: flex;
    justify-content: flex-end; /* 右寄せ */
    gap: 10px; /* ボタン同士の間隔 */
    position: relative;
    z-index: 10;
}

.toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* ボタンとラベルの隙間 */
}

/* 共通のラベルスタイル */
.toggle-label {
    font-size: 9px;
    color: #666; /* OFF時の暗い色 */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-weight: bold;
    letter-spacing: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

/* ON時の明るい色（黄色系） */
.toggle-label[data-state="random"],
.toggle-label[data-state="sound-on"] {
    color: #fff;
}


/* 共通の丸型ボタンスタイル */
.circle-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    background-color: #000;
    border: 3px solid #444;
    box-shadow: 0 4px 0px rgba(0, 0, 0, 1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* タップ時に少し拡大する心地よいアニメーション */
.circle-toggle-btn:active {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

.circle-toggle-btn .icon {
    width: 28px;
    height: 28px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease, background-image 0.3s ease;
}

/* --- シャッフルボタン専用スタイル --- */

/* OFF状態（順番に学習） */
.shuffle-toggle-btn[data-state="sequential"] .icon {
    background-image: url('../images/iconToggle-cardPage_shuffle_gray.svg');
    opacity: 0.7;
}

/* ON状態（シャッフル） */
.shuffle-toggle-btn[data-state="random"] {
    background-color: #000;
    border: 4px solid #e6d519; /* 黄色系 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.shuffle-toggle-btn[data-state="random"]:active {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.shuffle-toggle-btn[data-state="random"] .icon {
    background-image: url('../images/iconToggle-cardPage_shuffle.svg');
    opacity: 1;
}

/* --- 音声ボタン専用スタイル --- */

/* OFF状態 */
.sound-toggle-btn[data-state="sound-off"] .icon {
    background-image: url('../images/iconToggle-cardPage_soundOFF_yellow.svg');
    opacity: 0.7;
}

/* ON状態 */
.sound-toggle-btn[data-state="sound-on"] {
    background-color: #000;
    border: 4px solid #e6d519; /* 黄色系 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.sound-toggle-btn[data-state="sound-on"]:active {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.sound-toggle-btn[data-state="sound-on"] .icon {
    background-image: url('../images/iconToggle-cardPage_soundON-yellow.svg');
    opacity: 1;
}


/* --- 光る波紋（パルス）エフェクト共通 --- */
.circle-toggle-btn::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    opacity: 0;
    pointer-events: none;
}
.circle-toggle-btn.is-animating::after {
    animation: togglePulse 0.5s ease-out;
}
@keyframes togglePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
        opacity: 0;
    }
}