/* aroom おすすめメニュー診断 - スタイルシート */

/* カスタムプロパティ（CSS変数） */
:root {
    --primary-color: rgb(136, 30, 79);
    --primary-light: rgba(136, 30, 79, 0.1);
    --primary-medium: rgba(136, 30, 79, 0.8);
    --secondary-color: rgb(255, 192, 203);
    --accent-color: rgb(255, 215, 0);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #888888;
    --background-main: #ffffff;
    --background-light: #fafafa;
    --background-pink: rgba(255, 192, 203, 0.1);
    --border-color: #e0e0e0;
    --shadow-light: rgba(136, 30, 79, 0.1);
    --shadow-medium: rgba(136, 30, 79, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, rgba(136, 30, 79, 0.8) 100%);
    --gradient-secondary: linear-gradient(135deg, #ffeef0 0%, #fff5f7 100%);
}

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #FBF8F5;
    min-height: 100vh;
}

/* アプリケーションコンテナ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.app-header {
    background: #F4E8EE;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 0.5rem;
}

.logo-button:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.logo-button:active {
    transform: scale(0.98);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px; /* テキストベースのロゴに適した高さ */
    width: auto;
}

.logo-text {
    color: #333333;
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    position: relative;
    padding: 2rem 1rem;
}

/* 画面共通スタイル */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease-in-out;
    max-width: 800px;
    margin: 0 auto;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* コンテンツラッパー */
.content-wrapper {
    background: var(--background-main);
    border-radius: 20px;
    box-shadow: 0 8px 40px var(--shadow-light);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* AIメッセージ */
.ai-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--shadow-medium);
    padding: 8px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.message-bubble {
    background: var(--background-pink);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border-top-left-radius: 5px;
    flex: 1;
    position: relative;
    border: 1px solid rgba(136, 30, 79, 0.1);
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--background-pink);
}

.message-bubble p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* 質問セクション */
.question-section {
    text-align: center;
}

.question-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.4;
}

/* オプション */
.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 整形部位選択画面のボタン幅統一 */
#screen-plastic-parts .options .option-button,
#screen-eyes-concerns .options .option-button,
#screen-nose-concerns .options .option-button,
#screen-mouth-concerns .options .option-button,
#screen-face-line-concerns .options .option-button,
#screen-body-concerns .options .option-button {
    width: 100%;
    min-height: 80px;
}

.option-button {
    display: flex;
    align-items: center;
    background: var(--background-main);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.option-button:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.option-button:active {
    transform: translateY(0);
}

.option-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.option-text h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.option-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* 診断結果画面 */
.result-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.result-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.result-title h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    padding: 1rem 2rem;
    background: var(--primary-light);
    border-radius: 10px;
    border: 1px solid rgba(136, 30, 79, 0.2);
}

/* 結果画面内のAIメッセージ */
.ai-result-message {
    margin-bottom: 2rem;
}

.ai-result-message .ai-message {
    margin-bottom: 1rem;
}

/* 施術セクションタイトル */
.treatments-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-light);
}

/* クリニック情報の改善 */
.clinic-info {
    flex: 1;
}

.clinic-item {
    align-items: flex-start;
    padding: 1.2rem 1.5rem;
}

.clinic-name {
    display: block;
    line-height: 1.4;
    font-size: 0.95rem;
}

/* 施術カード */
.treatment-card {
    background: var(--background-main);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.treatment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.treatment-header h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.treatment-section {
    margin-bottom: 1.5rem;
}

.treatment-section:last-child {
    margin-bottom: 0;
}

.treatment-section h5 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.treatment-section p {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.cost {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    background: var(--primary-light);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    display: inline-block;
}

/* クリニックリンク */
.clinic-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.clinic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background-light);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.clinic-name {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.clinic-button {
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--shadow-light);
}

.clinic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

/* 結果アクション */
.result-actions {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.consultation-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.line-consultation-button {
    display: inline-block;
    background: #06C755; /* LINE公式カラー */
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(6, 199, 85, 0.3);
    margin-bottom: 0;
    width: 100%;
    white-space: nowrap;
    text-align: center;
}

.line-consultation-button:hover {
    background: #05B04D; /* ホバー時の濃い緑 */
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6, 199, 85, 0.4);
    text-decoration: none;
    color: white;
}

.line-consultation-button:active {
    transform: translateY(-1px);
}

.retry-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px var(--shadow-light);
    margin-bottom: 0;
    width: 100%;
    white-space: nowrap;
}

.retry-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.retry-button:active {
    transform: translateY(-1px);
}

/* フッター */
.app-footer {
    background: #F4E8EE;
    color: #333333;
    text-align: center;
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.app-footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem 1.5rem;
    }

    .logo-button {
        padding: 0.3rem;
    }

    .logo {
        gap: 0.75rem;
    }

    .logo img {
        height: 48px; /* 40px × 1.2 = 48px */
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .content-wrapper {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .ai-message {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .avatar {
        align-self: center;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        padding: 6px;
    }

    .message-bubble {
        padding: 1.2rem 1.5rem;
        border-radius: 15px;
        border-top-left-radius: 15px;
    }

    .message-bubble::before {
        display: none;
    }

    .question-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .option-button {
        padding: 1.2rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .option-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }

    .option-text h3 {
        font-size: 1.1rem;
    }

    .option-text p {
        font-size: 0.9rem;
    }

    .result-header h2 {
        font-size: 1.6rem;
    }

    .result-header p {
        font-size: 1rem;
    }

    .treatment-card {
        padding: 1.5rem;
    }

    .treatment-header h4 {
        font-size: 1.2rem;
    }

    .clinic-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .clinic-button {
        padding: 0.7rem 2rem;
    }

    .retry-button {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }
    
    .line-consultation-button {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }
    
    .action-buttons-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 1.2rem;
    }

    .option-button {
        padding: 1rem 1.2rem;
    }

    .treatment-card {
        padding: 1.2rem;
    }

    .clinic-button {
        font-size: 0.85rem;
        padding: 0.6rem 1.5rem;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeInUp 0.5s ease-out;
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* フォーカススタイル */
.option-button:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

.retry-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

.clinic-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: var(--background-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-medium);
}