/* みらレポ - メインスタイルシート */

/* ========================================
   基本設定とリセット
======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* ========================================
   レイアウト構造
======================================== */

/* スマホ用タブナビゲーション */
.mobile-tab-navigation {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px;
    position: sticky;
    top: 70px;
    z-index: 90;
}

.mobile-tab-navigation.active {
    display: flex;
    justify-content: space-around;
    gap: 5px;
}

.mobile-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 5px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
}

.mobile-tab-btn svg {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mobile-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mobile-tab-btn.active svg {
    opacity: 1;
}

.mobile-tab-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* スマホ用レイアウト調整 */
@media (max-width: 768px) {
    .mobile-tab-navigation {
        display: flex;
        justify-content: space-around;
        gap: 5px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .input-section,
    .output-section {
        width: 100%;
        max-width: 100%;
    }
    
    /* スマホ時は既存のタブコンテナを非表示 */
    .output-section .tab-container {
        display: none;
    }
    
    /* 報告書セクションのモバイル表示制御 */
    .output-section.mobile-hidden {
        display: none;
    }
}

/* デスクトップでは従来通り */
@media (min-width: 769px) {
    .mobile-tab-navigation {
        display: none !important;
    }
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    display: flex;
    gap: 20px;
}

/* ========================================
   入力セクション
======================================== */
.input-section {
    flex: 1;
    min-width: 0;
}

.chat-container {
    background: transparent;
    border: none;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px 12px 0 0;
}

.secretary-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.secretary-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.secretary-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.secretary-details h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #667eea;
}

.secretary-chat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-bubble {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.secretary-message .message-bubble {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-message {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0; /* ユーザーメッセージにはアイコンがないのでgapを0に */
}

.user-message .message-content {
    display: flex;
    justify-content: flex-end;
    max-width: 80%;
    width: 100%;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
    margin-left: auto;
    max-width: 100%;
    margin-right: 20px; /* 右端に少し余白を追加 */
}

.chat-input-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
}


.input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.date-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.date-btn:hover {
    background: #667eea;
    color: white;
}

.today-btn.active {
    background: #667eea;
    color: white;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

#chatInput, #dateInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatInput:focus, #dateInput:focus {
    border-color: #667eea;
}

.send-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.05);
}

.chat-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.skip-btn, .reset-btn, .back-btn, .reset-chat-btn, .new-report-btn, .finish-btn, .complete-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.skip-btn:hover, .reset-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.new-report-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.new-report-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

.back-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.back-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

.reset-chat-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.reset-chat-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.finish-btn, .complete-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.finish-btn:hover, .complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========================================
   出力セクション
======================================== */
.output-section {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tab-container {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.report-header h3 {
    color: #333;
    font-size: 18px;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.btn-copy, .btn-pdf {
    padding: 8px 16px;
    border: 1px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-copy:hover, .btn-pdf:hover {
    background: #667eea;
    color: white;
}

#internalReport, #customerReport {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    outline: none;
}

#internalReport:focus, #customerReport:focus {
    border-color: #667eea;
}

/* ========================================
   フィードバックセクション
======================================== */
.feedback-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-feedback-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.btn-feedback-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .feedback-floating {
        bottom: 15px;
        right: 15px;
    }
    
    .btn-feedback-floating {
        width: 48px;
        height: 48px;
    }
    
    .btn-feedback-floating svg {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   無料体験情報表示
======================================== */
.trial-info {
    position: fixed;
    top: 15px;
    right: 80px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    color: #667eea;
    z-index: 99;
    backdrop-filter: blur(5px);
}

.trial-info-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trial-icon {
    font-size: 14px;
}

.trial-message {
    font-weight: 600;
}

/* ========================================
   設定モーダル（動的生成）
======================================== */
.settings-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 2000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.settings-modal {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    max-width: 400px !important;
    width: 90% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

.settings-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.settings-modal-header h3 {
    margin: 0 !important;
    color: #333 !important;
}

.settings-close-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 5px !important;
    color: #666 !important;
}

.settings-modal-content {
    padding: 10px !important;
}

.settings-modal-item {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #333 !important;
    transition: background-color 0.2s ease !important;
    text-align: left !important;
}

.settings-modal-item:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

.settings-modal-item svg {
    color: #667eea !important;
}

/* ========================================
   使い方モーダル
======================================== */
.how-to-use-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    padding: 20px !important;
}

.how-to-use-modal:not(.hidden) {
    display: flex !important;
}

#howToUseModal:not(.hidden) {
    display: flex !important;
}

.how-to-use-content {
    background: white !important;
    border-radius: 16px !important;
    max-width: 900px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.how-to-use-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 30px 30px 20px 30px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.how-to-use-header h3 {
    margin: 0 !important;
    color: #333 !important;
    font-size: 24px !important;
}

.how-to-use-header .close-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 5px !important;
    color: #666 !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}

.how-to-use-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

.how-to-use-body {
    padding: 30px !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

/* ステップセクションのスタイリング */
.step-section {
    margin-bottom: 40px !important;
    padding: 25px !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%) !important;
    border-radius: 16px !important;
    border-left: 5px solid #667eea !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.step-section:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2) !important;
}

/* ステップヘッダー */
.step-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 18px !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.step-header h4 {
    margin: 0 !important;
    color: #333 !important;
    font-size: 22px !important;
    font-weight: 600 !important;
}

/* ステップコンテンツ */
.step-content {
    padding-left: 55px !important;
}

.step-content p {
    margin-bottom: 20px !important;
    color: #555 !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
}

/* Tips セクション */
.step-tips {
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    margin-top: 20px !important;
}

.step-tips p {
    margin-bottom: 15px !important;
    color: #667eea !important;
    font-weight: 600 !important;
}

.step-tips ul {
    margin: 0 !important;
    padding-left: 20px !important;
}

.step-tips li {
    margin-bottom: 8px !important;
    color: #555 !important;
    line-height: 1.6 !important;
}

.step-tips li strong {
    color: #333 !important;
}

/* レポートタイプ */
.report-types {
    display: flex !important;
    gap: 20px !important;
    margin: 20px 0 !important;
    flex-wrap: wrap !important;
}

.report-type {
    flex: 1 !important;
    min-width: 200px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    transition: border-color 0.3s ease !important;
}

.report-type:hover {
    border-color: #667eea !important;
}

.report-icon {
    font-size: 32px !important;
    min-width: 40px !important;
}

.report-type strong {
    color: #333 !important;
    font-size: 18px !important;
    display: block !important;
    margin-bottom: 5px !important;
}

.report-type p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 14px !important;
}

/* 設定リスト */
.settings-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

.setting-item {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 15px 20px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    transition: background-color 0.3s ease !important;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 1) !important;
}

.setting-item span {
    font-size: 24px !important;
    min-width: 30px !important;
}

.setting-item strong {
    color: #333 !important;
    font-size: 16px !important;
    display: block !important;
    margin-bottom: 3px !important;
}

.setting-item p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 14px !important;
}

.how-to-use-footer {
    padding: 20px 30px 30px 30px !important;
    text-align: center !important;
    border-top: 1px solid #e0e0e0 !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%) !important;
}

.how-to-use-footer .start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.how-to-use-footer .start-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

/* ========================================
   設定メニュー
======================================== */
.settings-menu {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 101;
}

.btn-settings {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.btn-settings:hover {
    background: rgba(102, 126, 234, 0.1);
}

.settings-menu .settings-dropdown,
#settingsDropdown {
    position: fixed !important;
    top: 55px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    background: white !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 250px;
    width: auto !important;
    height: auto !important;
    z-index: 1002 !important;
    overflow: hidden;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item svg {
    color: #667eea;
}

/* ========================================
   ユーティリティクラス
======================================== */
.hidden {
    display: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* ========================================
   ログイン画面
======================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.feature-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.feature {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.feature:last-child {
    margin-bottom: 0;
}

.login-form, .signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #667eea;
}

.name-group {
    display: flex;
    gap: 15px;
}

.half-width {
    flex: 1;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.terms-checkbox a {
    color: #667eea;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.forgot-password-link, .signup-link, .login-link {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.forgot-password-link a, .signup-link a, .login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password-link a:hover, .signup-link a:hover, .login-link a:hover {
    text-decoration: underline;
}

/* ========================================
   モーダル
======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

/* ========================================
   アカウント設定モーダル
======================================== */
.account-settings-content {
    padding: 20px 30px 30px 30px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

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

.settings-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.settings-section h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.name-group {
    display: flex;
    gap: 15px;
}

.name-group .input-group.half-width {
    flex: 1;
    margin-bottom: 15px;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.subscription-guide,
.stripe-portal-info {
    background: #f8f9fa !important;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
    border: 1px solid #e9ecef !important;
}

.danger-section {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
}

.danger-section h3 {
    border-bottom-color: #dc3545 !important;
    color: #dc3545 !important;
}

/* ボタンスタイル改善 */
.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.stripe-note {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .account-settings-content {
        padding: 15px 20px 20px 20px;
    }
    
    .settings-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .name-group {
        flex-direction: column;
        gap: 0;
    }
    
    .name-group .input-group.half-width {
        margin-bottom: 15px;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button-group button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .subscription-guide,
    .stripe-portal-info {
        padding: 12px !important;
    }
}

/* ========================================
   キャラクター選択
======================================== */
.character-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.character-select-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.character-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.character-select-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.character-select-header .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.character-select-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.character-icon-selector {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 30px 30px 0 30px;
}

.character-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.character-icon:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.character-icon.selected {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

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

.character-preview-area {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    min-height: 300px;
    padding: 0 30px;
}

.character-large-image {
    width: 200px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.character-large-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
}

.character-details-panel {
    flex: 1;
}

.character-details-panel h4 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.character-role {
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.character-details {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.character-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 0 30px 30px 30px;
}

.character-confirm-btn, .character-cancel-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.character-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.character-cancel-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.character-cancel-btn:hover {
    background: #667eea;
    color: white;
}

/* ========================================
   レスポンシブデザイン
======================================== */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .output-section {
        order: 2;
    }
    
    .input-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 10px 15px;
    }
    
    .app-header h1 {
        font-size: 24px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .chat-container {
        height: calc(100vh - 100px);
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .secretary-avatar {
        width: 50px;
        height: 50px;
    }
    
    .secretary-details h3 {
        font-size: 16px;
    }
    
    .chat-input-area {
        padding: 15px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-btn {
        align-self: flex-end;
    }
    
    .date-selection {
        flex-wrap: wrap;
    }
    
    /* モバイル版のユーザーメッセージ調整 */
    .user-message .message-bubble {
        margin-right: 15px;
    }
    
    /* モバイル版のチャット制御ボタン調整 */
    .chat-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .skip-btn, .back-btn, .reset-chat-btn, .new-report-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .character-preview-area {
        flex-direction: column;
        text-align: center;
    }
    
    .character-large-image {
        width: 150px;
        height: 225px;
        margin: 0 auto;
    }
    
    .character-icon-selector {
        gap: 20px;
    }
    
    .character-icon {
        width: 60px;
        height: 60px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .name-group {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .chat-input-area {
        padding: 10px;
    }
    
    .tab-container {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px 15px;
    }
    
    .report-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .report-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .character-select-content {
        padding: 20px 15px;
    }
    
    .character-icon-selector {
        gap: 15px;
    }
    
    .character-icon {
        width: 50px;
        height: 50px;
    }
    
    .character-action-buttons {
        flex-direction: column;
    }
    
    .character-confirm-btn, .character-cancel-btn {
        width: 100%;
    }
}

/* ========================================
   縦幅が短い画面向けのメディアクエリ
======================================== */
@media (max-height: 700px) {
    .feedback-section {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 300px;
        margin: 0;
        padding: 12px;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .feedback-header h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .feedback-header p {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .btn-feedback {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-height: 600px) {
    .feedback-section {
        width: 250px;
        bottom: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .feedback-header h4 {
        font-size: 13px;
    }
    
    .feedback-header p {
        font-size: 11px;
    }
    
    .btn-feedback {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .chat-container {
        height: calc(100vh - 80px);
    }
}

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

.message {
    animation: fadeIn 0.3s ease-out;
}

.modal {
    animation: fadeIn 0.3s ease-out;
}

.character-select-modal {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   スクロールバーのカスタマイズ
======================================== */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* ========================================
   フィードバックモーダル
======================================== */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.feedback-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feedback-header {
    padding: 30px 30px 20px 30px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.feedback-character {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-character-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.feedback-character h3 {
    color: #333;
    margin: 0;
    font-size: 20px;
}

.feedback-intro {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.feedback-questions {
    padding: 20px 30px;
}

.feedback-question {
    margin-bottom: 30px;
}

.feedback-question h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.rating-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-option input[type="radio"] {
    display: none;
}

.rating-star {
    display: inline-block;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.rating-option input[type="radio"]:checked + .rating-star {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.rating-option:hover .rating-star {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-option input[type="radio"] {
    display: none;
}

.choice-option span {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    transition: all 0.3s ease;
}

.choice-option input[type="radio"]:checked + span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.choice-option:hover span {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.feedback-question textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.feedback-question textarea:focus {
    border-color: #667eea;
}

.feedback-actions {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.feedback-actions .btn-primary,
.feedback-actions .btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feedback-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.feedback-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.feedback-actions .btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.feedback-actions .btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* フィードバックモーダルのレスポンシブ対応 */
@media (max-width: 768px) {
    .feedback-modal {
        padding: 15px;
    }
    
    .feedback-modal-content {
        max-height: 95vh;
    }
    
    .feedback-header {
        padding: 20px 20px 15px 20px;
    }
    
    .feedback-character-image {
        width: 60px;
        height: 60px;
    }
    
    .feedback-character h3 {
        font-size: 18px;
    }
    
    .feedback-questions {
        padding: 15px 20px;
    }
    
    .feedback-actions {
        padding: 15px 20px 20px 20px;
        flex-direction: column;
    }
    
    .feedback-actions .btn-primary,
    .feedback-actions .btn-secondary {
        width: 100%;
    }
    
    .rating-options {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .feedback-header {
        padding: 15px 15px 10px 15px;
    }
    
    .feedback-questions {
        padding: 10px 15px;
    }
    
    .feedback-actions {
        padding: 10px 15px 15px 15px;
    }
    
    .rating-star {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* キャラクター変更確認モーダル */
.character-change-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.character-change-confirm-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.confirm-message {
    margin: 20px 0;
    color: #666;
}

.confirm-message p {
    margin: 10px 0;
    line-height: 1.5;
}

.confirm-reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: #e74c3c;
    color: white;
    transition: all 0.2s;
}

.confirm-reset-btn:hover {
    background: #c0392b;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.confirm-no-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: #95a5a6;
    color: white;
    transition: all 0.2s;
}

.confirm-no-btn:hover {
    background: #7f8c8d;
}

@media (max-width: 600px) {
    .confirm-options {
        flex-direction: column;
    }
}