/* style.css - まるまるチャット */

/* 全要素のボックスサイズ計算を統一（パディングが外側に膨らむのを防止） */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background-color: #2c2c2c;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* 背景画像（部屋） */
#room-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/部屋サンプル.png');
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.7);
    z-index: 0;
    transition: background-image 0.5s ease;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* ================================================ */
/* 右下ステータス                                    */
/* ================================================ */
.overlay-ui-bottom-right {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(233, 30, 99, 0.15);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 100;
    min-width: 320px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay-ui-bottom-right.visible {
    opacity: 1;
    pointer-events: auto;
}

.stat-item {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-item .stat-icon {
    font-size: 1.8rem;
    min-width: 32px;
    text-align: center;
}

.stat-item .label {
    color: #888;
    font-size: 1.2rem;
    margin-right: 6px;
    letter-spacing: 0.03em;
}

.stat-item .stat-value {
    color: #e91e63;
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: none;
}

.stat-divider {
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

.stat-params {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.param-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.param-label {
    font-size: 1.1rem;
    color: #666;
    min-width: 60px;
    text-align: right;
    font-weight: bold;
}

.param-bar {
    flex: 1;
    height: 18px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 9px;
    position: relative;
    overflow: hidden;
}

.param-bar div {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 9px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.param-bar.kindness div {
    background: linear-gradient(90deg, #ff6b81, #ff9a9e);
}

.param-bar.fun div {
    background: linear-gradient(90deg, #f0932b, #f6d365);
}

.param-bar.calm div {
    background: linear-gradient(90deg, #38ada9, #84fab0);
}

/* ================================================ */
/* スクリーン共通                                    */
/* ================================================ */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 20;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

/* 立ち絵（スマホの後ろのレイヤー） */
.tachie {
    position: absolute;
    left: 2%;
    bottom: 0;
    height: 95vh;
    object-fit: contain;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.4));
}

.tachie.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================ */
/* ① タイトル画面                                    */
/*    背景は部屋サンプル(#room-background)が透けて見える */
/*    ロゴ画像を中央に大きく配置                     */
/* ================================================ */
#screen-title {
    background: transparent;
    justify-content: center;
    align-items: center;
}

.title-logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    flex: 1;
}

.title-logo-img {
    max-width: 80%;
    max-height: 70vh;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: logo-breathe 3s ease-in-out infinite;
}

@keyframes logo-breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

.title-btn-area {
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* タイトル画面のキャラクター（右下） */
.title-chara-img {
    position: absolute;
    right: 20px;
    bottom: 0;
    height: 45vh;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.btn-start-real {
    padding: 16px 80px;
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff4081, #e91e63);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.5);
    transition: all 0.25s ease;
}

.btn-start-real:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 14px 40px rgba(233, 30, 99, 0.7);
    filter: brightness(1.1);
}

/* ================================================ */
/* ② キャラ選択画面                                  */
/*    sampleフォルダは一切使用しない                  */
/* ================================================ */
#screen-char-select {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.select-header-text {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.char-name {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}



.char-grid {
    display: flex;
    gap: 50px;
    justify-content: center;
}

.char-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.char-card:hover {
    transform: scale(1.12);
}

.char-card.nazo {
    filter: brightness(0.6) grayscale(0.5);
}

.char-card.nazo:hover {
    transform: scale(1.05); /* 控えめなホバー */
}

.char-icon-frame {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: #f0f0f0;
}

.char-icon-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.bg-selector-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.bg-selector-panel label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #666;
}

.bg-selector-panel select {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #ff9a9e;
    font-size: 1rem;
    cursor: pointer;
}

/* ================================================ */
/* ③ スマホ枠（タイピングフェーズ専用）              */
/* ================================================ */
#phone-mockup {
    /* .screenの全画面 absolute は継承、ここで中央寄せ */
    width: 480px !important;
    left: 50% !important;
    transform: translateX(-50%);
    background-color: #f7f9fa;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.chat-viewport {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-header {
    background-color: #2c3e50;
    color: white;
    padding: 5px 0;
    flex-shrink: 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

#chat-opponent-name {
    font-weight: bold;
    font-size: 1.2rem;
}

#time-gauge-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
}

#time-gauge-bar {
    width: 100%;
    height: 100%;
    background: #ffc107;
    transition: width 0.1s linear, background-color 0.5s;
}

.time-warning #time-gauge-bar {
    background: #f44336;
}

.error-flash {
    background-color: #ffcccc !important;
}

#chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px 80px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
    background-color: #7494c0;
}

.msg-container {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: popIn 0.3s;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.msg-ami {
    align-self: flex-start;
}

.msg-user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-name {
    font-size: 0.75rem;
    color: #e0e0e0;
    margin: 0 5px 4px;
}

.msg-bubble {
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
}

.msg-ami .msg-bubble {
    background-color: #fff;
    color: #333;
    border-top-left-radius: 4px;
}

.msg-user .msg-bubble {
    background-color: #8ce461;
    color: #111;
    border-top-right-radius: 4px;
}

.msg-stamp {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    animation: stampPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

#input-area-fake {
    height: 60px;
    background: #eee;
    border-top: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 0 15px;
    flex-shrink: 0;
}

.fake-input-box {
    flex: 1;
    height: 38px;
    background: #fff;
    border-radius: 19px;
    border: 1px solid #ddd;
    padding: 0 15px;
    color: #ccc;
    display: flex;
    align-items: center;
}

/* ================================================ */
/* タイピングUI（左右フロート選択肢）                */
/* ================================================ */
#typing-overlay {
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    pointer-events: none;
}

.floating-choice {
    position: absolute;
    width: 420px;
    max-width: 38vw;
    left: 50%;
    background: rgba(255, 255, 255, 0.85);
    /* 半透明化 */
    backdrop-filter: blur(4px);
    /* すりガラス効果 */
    border: 5px solid #ff9a9e;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
}

/* 左右に配置（スマホに少し重なる程度） */
.floating-choice.choice-left {
    transform: translateX(calc(-100% - 80px)) translateY(0) scale(1);
}

.floating-choice.choice-right {
    transform: translateX(80px) translateY(0) scale(1);
}


/* 選ばれた方が中央へ移動 */
.floating-choice.selected-center {
    transform: translateX(-50%) translateY(-30px) scale(1.15);
    border-color: #e83e8c;
    z-index: 151;
    box-shadow: 0 15px 50px rgba(232, 62, 140, 0.3);
}

/* 選ばれなかった方は粉砕 */
.shattered {
    animation: shatter-anim 0.6s forwards ease-in;
    pointer-events: none;
}

@keyframes shatter-anim {
    0% {
        transform: scale(1);
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }

    25% {
        transform: scale(1.1) rotate(3deg);
        clip-path: polygon(0% 0%, 50% 20%, 100% 0%, 80% 50%, 100% 100%, 50% 80%, 0% 100%, 20% 50%);
        opacity: 1;
    }

    100% {
        transform: scale(0) rotate(90deg) translateY(300px);
        opacity: 0;
        clip-path: polygon(0% 0%, 50% 20%, 100% 0%, 80% 50%, 100% 100%, 50% 80%, 0% 100%, 20% 50%);
    }
}

/* ミスタイプ時の揺れ */
.shake {
    animation: shake-anim 0.2s 2;
}

@keyframes shake-anim {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-12px);
    }

    75% {
        transform: translateX(12px);
    }
}

.choice-text {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #111;
}

.romaji-nav {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

.romaji-typed {
    color: #e83e8c;
    font-weight: bold;
    font-size: 1.5rem;
}

.romaji-untyped {
    color: #bbb;
}

/* パルスアニメーション（汎用） */
.pulse {
    animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* 結果を見るボタン（エンディング後に右下に出現） */
.btn-view-result {
    position: absolute;
    bottom: 80px;
    right: 20px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #ff4081, #e91e63);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
    z-index: 160;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease;
    pointer-events: none;
}

.btn-view-result.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.btn-view-result:hover {
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.7);
    filter: brightness(1.1);
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ================================================ */
/* トランジション演出                               */
/* ================================================ */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 300;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#transition-overlay.visible {
    opacity: 1;
}

#transition-overlay .transition-text {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    line-height: 2;
    animation: fadeInText 0.8s ease;
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* カウントダウン */
#countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 250;
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#countdown-overlay .countdown-num {
    font-size: 10rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 40px rgba(232, 62, 140, 0.8), 0 0 80px rgba(232, 62, 140, 0.4);
    animation: countPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes countPop {
    0% {
        transform: scale(3);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

@keyframes oshimaiPop {
    0% {
        transform: scale(3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ================================================ */
/* 報酬ゲット・アルバム関連のスタイル                */
/* ================================================ */
.btn-album-real {
    padding: 12px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    background: #4caf50;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transition: all 0.2s;
}

.btn-album-real:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

/* 報酬ゲット画面 */
#screen-reward {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.reward-container {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 4px solid #ff9a9e;
    max-width: 500px;
    width: 90%;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reward-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
}

.reward-voice-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.reward-voice-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.reward-voice-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.btn-play-voice {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: #00bcd4;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
    transition: all 0.2s;
}

.btn-play-voice:hover {
    background: #00acc1;
    transform: scale(1.05);
}

.reward-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-download {
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    background: #eee;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #e0e0e0;
}

.btn-to-album {
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: #ff4081;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
    transition: all 0.2s;
}

.btn-to-album:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.5);
}

/* ボイスアルバム画面 */
#screen-album {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(40, 30, 40, 0.95) 100%);
    backdrop-filter: blur(15px);
    justify-content: flex-start;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.album-container {
    background: transparent;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: none;
}

.album-header {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    flex-shrink: 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.album-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 10px 5px 20px;
    align-content: start;
    grid-auto-rows: min-content;
    transition: opacity 0.25s ease;
}

/* レスポンシブ：画面幅に応じてグリッド列数を調整 */
@media (max-width: 1200px) {
    .album-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .album-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* スクロールバーのカスタマイズ (Webkit系) */
.album-grid::-webkit-scrollbar {
    width: 10px;
}
.album-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}
.album-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}
.album-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- ページネーションUI --- */
.album-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    flex-shrink: 0;
}

.btn-page-nav {
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.btn-page-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-page-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.page-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-dot:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.page-dot.active {
    background: linear-gradient(135deg, #ff4081, #e91e63);
    border-color: #e91e63;
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.5);
    transform: scale(1.1);
}

/* --- Coming Soon 枠 --- */
.album-item.coming-soon {
    cursor: default;
    background: rgba(15, 15, 20, 0.6);
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.album-item.coming-soon:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.coming-soon-jacket {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 40, 0.8) !important;
}

.coming-soon-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 900;
}

/* --- アルバムカード共通 --- */
.album-item {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(30, 30, 40, 0.85);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.album-item:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* サムネイル画像（正方形を強制） */
.album-item-jacket {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #111;
    transition: filter 0.3s;
}

/* カード内レイアウトの整理 */
.album-item-info {
    padding: 12px 10px;
    text-align: center;
    background: transparent;
}

.album-item-title {
    font-weight: bold;
    font-size: 1rem;
    color: #f0f0f0;
    line-height: 1.4;
    word-break: break-all;
}

/* --- 取得済みボイス --- */
.album-item.unlocked {
    background: rgba(40, 40, 50, 0.9);
}

/* --- 未取得（ロック中）ボイス --- */
.album-item.locked {
    cursor: default;
    background: rgba(20, 20, 25, 0.7);
}

.album-item.locked:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.album-item.locked .album-item-jacket {
    filter: blur(6px) grayscale(100%) brightness(0.4);
}

.album-item.locked .album-item-title {
    color: #666;
}

.album-item.locked .album-item-title::before {
    content: "🔒 ";
}

.album-notice {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 243, 205, 0.9);
    color: #856404;
    border-left: 4px solid #ffeeba;
    font-size: 0.9rem;
    border-radius: 4px;
    line-height: 1.5;
    flex-shrink: 0;
}

.album-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-album-back {
    padding: 14px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.btn-album-back:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ================================================ */
/* 結果表示画面                                      */
/* ================================================ */
#screen-result {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

/* 結果カード（中央〜右寄り） */
.result-card {
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 50px 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(233, 30, 99, 0.2);
    min-width: 420px;
    max-width: 550px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-card-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #e91e63;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.result-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-stat-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.result-stat-row .stat-icon {
    font-size: 2rem;
    min-width: 36px;
    text-align: center;
}

.result-stat-row .label {
    font-size: 1.3rem;
    color: #666;
    min-width: 80px;
}

.result-stat-row .stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #e91e63;
}

.result-divider {
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    margin: 8px 0;
}

.result-params {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.result-param-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.result-param-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    min-width: 70px;
    text-align: right;
}

.result-param-bar {
    flex: 1;
    height: 22px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 11px;
    position: relative;
    overflow: hidden;
}

.result-param-bar div {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 11px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.result-param-bar.kindness div {
    background: linear-gradient(90deg, #ff6b81, #ff9a9e);
}

.result-param-bar.fun div {
    background: linear-gradient(90deg, #f0932b, #f6d365);
}

.result-param-bar.calm div {
    background: linear-gradient(90deg, #38ada9, #84fab0);
}

.result-param-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #e91e63;
    min-width: 36px;
    text-align: right;
}

/* ボイスゲットカード（右下） */
.result-voice-card {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 24px 30px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(233, 30, 99, 0.15);
    text-align: center;
    min-width: 260px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s both;
}

.result-voice-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 10px;
}

.result-voice-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.result-voice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-voice-buttons button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-result-play {
    color: #fff;
    background: #00bcd4;
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

.btn-result-play:hover {
    background: #00acc1;
    transform: scale(1.03);
}

.btn-result-download {
    color: #555;
    background: #eee;
}

.btn-result-download:hover {
    background: #e0e0e0;
}

.btn-result-album {
    color: #fff;
    background: linear-gradient(135deg, #ff4081, #e91e63);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
    font-size: 1.1rem;
    padding: 14px 30px;
}

.btn-result-album:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.5);
}

/* ================================================ */
/* ボイス詳細画面                                    */
/* ================================================ */
#screen-voice-detail {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.voice-detail-container {
    width: 80%;
    max-width: 900px;
    height: 60vh;
    background: #fff;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.voice-detail-left {
    flex: 1;
    max-width: 50%;
    background: #000;
}

.voice-detail-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-detail-right {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.voice-detail-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.voice-detail-count {
    font-size: 1.3rem;
    font-weight: bold;
    color: #888;
    margin-bottom: 40px;
}

.btn-detail-play {
    padding: 18px 60px;
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #00bcd4, #00acc1);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.4);
    margin-bottom: 30px;
    transition: all 0.25s;
}

.btn-detail-play:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 188, 212, 0.6);
}

.btn-detail-back {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: #999;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detail-back:hover {
    background: #777;
    transform: scale(1.05);
}

/* ================================================ */
/* トースト通知                                      */
/* ================================================ */
.toast-container {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: toast-fade 3s forwards ease-in-out;
}

@keyframes toast-fade {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}
