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

:root {
    /* Lab Theme Colors */
    --lab-primary: #2196F3;
    --lab-primary-dark: #1976D2;
    --lab-secondary: #00BCD4;
    --lab-accent: #FF6B6B;
    --lab-success: #4CAF50;
    --lab-bg: #f8f9fa;
    --lab-card: #ffffff;
    --lab-text: #2c3e50;
    --lab-text-light: #607D8B;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--lab-text);
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ナビゲーション */
.navbar {
    background: linear-gradient(135deg, var(--lab-primary) 0%, var(--lab-primary-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    border-bottom: 3px solid var(--lab-secondary);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.8rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    letter-spacing: 1px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-nav-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-nav-register:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5) !important;
    transform: translateY(-3px) !important;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

/* メインコンテンツ */
.main-content {
    min-height: calc(100vh - 150px);
    padding: 2rem 0;
}

/* ヒーローセクション */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.15);
    border: 2px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--lab-primary) 0%, var(--lab-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--lab-text-light);
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* カード */
.card {
    background: var(--lab-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.15);
    transform: translateY(-2px);
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--lab-primary);
    font-weight: 700;
}

.card-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.highlight-card {
    border: 2px solid var(--lab-secondary);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(0, 188, 212, 0.05) 100%);
    position: relative;
}

.highlight-card::before {
    content: '🔬';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.button-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.badge {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* フィーチャーグリッド */
.features {
    margin: 3rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--lab-primary);
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--lab-primary) 0%, var(--lab-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--lab-primary) 0%, var(--lab-primary-dark) 100%);
}

.btn-secondary {
    background: #6c757d;
}

.btn-danger {
    background: #dc3545;
}

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

/* フォーム */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

/* ステータスメッセージ */
.status-message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* データリスト */
.data-list {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-item:last-child {
    border-bottom: none;
}

/* ペルソナグリッド */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .persona-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .persona-grid {
        grid-template-columns: 1fr;
    }
}

.persona-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.persona-card:hover {
    transform: translateY(-5px);
}

.persona-header {
    border-bottom: 2px solid #667eea;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.persona-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.persona-meta {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.persona-section {
    margin: 1rem 0;
}

.persona-section h4 {
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.persona-list {
    list-style: none;
    padding-left: 0;
}

.persona-list li {
    padding: 0.25rem 0;
    color: #555;
}

.persona-list li:before {
    content: "• ";
    color: #667eea;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* インタビューレイアウト */
.interview-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.persona-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.chat-main {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem;
    border-radius: 10px;
    line-height: 1.5;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message.assistant .message-bubble {
    background: #f0f0f0;
    color: #333;
}

.message-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.chat-input-area textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: none;
}

.suggested-questions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.suggested-questions h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

#suggestedQuestions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.suggestion-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

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

/* ワークフロー */
.workflow {
    margin-top: 3rem;
}

.workflow h2 {
    margin-bottom: 2rem;
    color: var(--lab-primary);
    font-weight: 700;
}

.workflow-steps {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.workflow-steps li {
    counter-increment: step-counter;
    padding: 1.5rem;
    background: var(--lab-card);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    padding-left: 5rem;
    border: 1px solid rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.workflow-steps li:hover {
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.15);
    transform: translateY(-2px);
}

.workflow-steps li:before {
    content: counter(step-counter);
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.workflow-steps li strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #667eea;
    font-size: 1.1rem;
}

/* フッター */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* ローディング */
.loading {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* タスクセレクター */
.task-selector-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
}

.task-selector-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.task-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.task-selector-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.task-icon {
    font-size: 1.3rem;
}

.task-selector-current {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.task-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.task-type-badge.blog {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.task-type-badge.sales {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.task-type-badge.service_improvement {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.task-type-badge.research {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
}

.task-type-badge.content_marketing {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.task-type-badge.product_development {
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
}

.task-type-badge.general {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
}

.task-current-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0.5rem 0;
}

.task-current-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0 0 0;
    line-height: 1.5;
}

.task-selector-dropdown {
    margin-top: 1rem;
}

.task-selector-dropdown label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
}

.task-select-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.task-select-modern:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.task-select-modern:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.task-selector-empty,
.task-selector-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: #856404;
}

.task-selector-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.task-selector-empty a,
.task-selector-error a {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ペルソナ生成セクション */
.persona-generation {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.persona-generation .card {
    width: 100%;
}

/* データ収集セクション */
.data-collection-form {
    margin-bottom: 3rem;
}

.data-collection-form .card {
    max-width: 100%;
}

/* 検索データリスト */
.search-data-list {
    margin-top: 3rem;
}

.search-data-list h2 {
    margin-bottom: 1.5rem;
    color: var(--lab-primary);
    font-weight: 700;
}

/* ペルソナリスト */
.persona-list {
    margin-top: 3rem;
}

.persona-list h2 {
    margin-bottom: 1.5rem;
    color: var(--lab-primary);
    font-weight: 700;
}

/* フィーチャーグリッドのバランス調整 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) and (max-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* コンテナ最大幅の調整 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* カード内のフォームグループの余白調整 */
.card .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

/* ボタングループの余白調整 */
.button-group {
    margin-top: 0.5rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .interview-container {
        grid-template-columns: 1fr;
    }

    .persona-sidebar {
        position: static;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .workflow-steps li {
        padding-left: 4rem;
    }

    .workflow-steps li:before {
        left: 1rem;
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}
