/* モダンなUIスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* レイアウト */
.layout {
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.header-left h1 i {
    color: #667eea;
    margin-right: 8px;
}

.header-left p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.header-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.header-nav li {
    margin: 0;
}

.header-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
}

.header-nav a:hover {
    background: #f8f9fa;
    color: #667eea;
}

.header-nav li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.header-nav i {
    width: 16px;
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.user-info i {
    font-size: 1.2rem;
    color: #667eea;
    margin-right: 8px;
}

.user-info span {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.logout-btn i {
    margin-right: 6px;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    padding: 0;
    background: #f5f7fa;
    min-height: calc(100vh - 70px);
}

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

/* モバイルメニュー */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        height: 60px;
    }
    
    .header-left p {
        display: none;
    }
    
    .header-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: none;
        padding: 20px;
    }
    
    .header-nav.active {
        display: block;
    }
    
    .header-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .header-nav a {
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid #e1e8ed;
    }
    
    .header-nav a:last-child {
        border-bottom: none;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .user-info span {
        display: none;
    }
    
    .logout-btn span {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        padding: 15px;
    }
}

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

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-danger:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
}

.table tr:hover {
    background: #f8f9fa;
}

.table tr:last-child td {
    border-bottom: none;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.info-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: #555;
    font-size: 1.1rem;
    word-break: break-all;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.nav-links a {
    text-decoration: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.welcome-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.welcome-message h2 {
    margin-bottom: 10px;
    font-weight: 300;
}

.admin-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.admin-section h2 {
    color: #856404;
    margin-bottom: 15px;
}

/* インサイトカード */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

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

.insight-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.5rem;
}

.insight-content h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.insight-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.insight-change {
    font-size: 0.9rem;
    font-weight: 500;
}

.insight-change.positive {
    color: #27ae60;
}

.insight-change.negative {
    color: #e74c3c;
}

/* チャットスタイル */
.chat-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.chat-messages {
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.user-message .message-avatar {
    background: #95a5a6;
    color: white;
}

.message-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    max-width: 80%;
    flex: 1;
}

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

.message-content p {
    margin: 0 0 10px 0;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #e1e8ed;
    background: #f8f9fa;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
    margin-bottom: 0;
}

.btn-send {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 投稿プレビュー */
.post-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 2px dashed #667eea;
}

.post-preview h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.preview-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.preview-text {
    white-space: pre-line;
    line-height: 1.6;
    color: #333;
}

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

/* 設定ページ */
.settings-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.settings-section h3 i {
    margin-right: 8px;
    color: #667eea;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1rem;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.step-content a {
    color: #667eea;
    text-decoration: none;
}

.step-content a:hover {
    text-decoration: underline;
}

.form-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.test-result {
    margin-top: 15px;
}

/* ダッシュボード拡張スタイル */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.stat-number {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #10b981;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.demographics-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.demographics-section h3 {
    margin: 0 0 20px 0;
    color: #333;
}

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

.demographic-card {
    text-align: center;
}

.demographic-card h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.top-posts-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.top-posts-section h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-info {
    padding: 15px;
}

.post-caption {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.mentions-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.mentions-section h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.mentions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
}

.mention-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.mention-content {
    flex: 1;
}

.mention-content p {
    margin: 0 0 5px 0;
    color: #333;
}

.mention-content small {
    color: #666;
    font-size: 12px;
}

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

/* ハッシュタグ分析ページ */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.hashtag-form {
    max-width: 600px;
    margin: 0 auto;
}

.suggested-hashtags {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.hashtag-tag {
    background: #6366f1;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.hashtag-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.hashtag-stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.hashtag-header h4 {
    margin: 0;
    color: #333;
}

.engagement-rate {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.hashtag-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.posts-hashtag-analysis {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-hashtag-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.post-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.post-details {
    flex: 1;
}

.post-details p {
    margin: 0 0 10px 0;
    color: #333;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.post-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* AIチャットボットページ */
.chatbot-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-history {
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.welcome-message {
    text-align: center;
    padding: 20px;
}

.user-message, .ai-message {
    margin-bottom: 15px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.ai-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.user-message .message-content {
    background: #6366f1;
    color: white;
}

.ai-message .message-content {
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.message-content small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid #eee;
}

.chat-form {
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.clear-chat-form {
    text-align: center;
}

.quick-questions {
    margin-top: 30px;
    text-align: center;
}

.question-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.account-summary {
    margin-top: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.summary-number {
    font-size: 24px;
    font-weight: bold;
    color: #6366f1;
    margin: 0;
}

/* 類似ユーザー分析ページ */
.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.account-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.account-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.account-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.account-name {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.account-bio {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.account-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat {
    text-align: right;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #666;
}

.stat-value {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.account-metrics {
    margin-bottom: 20px;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.account-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.detail-label {
    font-size: 12px;
    color: #666;
}

.detail-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

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

.comparison-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.analysis-results {
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-card h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.result-card p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* レポートページ */
.report-form {
    max-width: 600px;
    margin: 0 auto;
}

.ai-report {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.6;
    color: #333;
}

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

.metrics-summary {
    margin: 30px 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.metric-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.metric-number {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.metric-change {
    font-size: 12px;
    font-weight: 500;
}

.metric-change.positive {
    color: #10b981;
}

.posts-ranking {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ranking-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

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

.post-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.post-details {
    flex: 1;
}

.post-caption {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

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

.hashtag-ranking {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hashtag-ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hashtag-info {
    flex: 1;
}

.hashtag-info h4 {
    margin: 0 0 8px 0;
    color: #333;
}

.hashtag-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.growth-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.growth-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.growth-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.growth-rate {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.growth-rate.positive {
    color: #10b981;
}

.growth-description {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-messages {
        height: 300px;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .setup-steps {
        gap: 15px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid,
    .charts-section,
    .demographics-grid,
    .posts-grid,
    .hashtag-stats-grid,
    .accounts-grid,
    .comparison-charts,
    .results-grid,
    .metrics-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-history {
        height: 300px;
    }
    
    .question-buttons {
        flex-direction: column;
    }
    
    .account-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
    }
    
    .post-hashtag-item {
        flex-direction: column;
        text-align: center;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
    }
    
    .hashtag-ranking-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ローディングアニメーション */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 10px 0;
}
.loading-spinner .spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 