/* tools.css - 分析ツールページ専用スタイル（UI改善版） */

/* ツールカテゴリー */
.tool-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 16px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--text-dark);
}

.category-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 1.25rem;
}

/* ツールグリッド */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ツールカード */
.tool-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.tool-card.premium {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
}

.tool-card.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
}

.tool-card.coming-soon:hover {
    transform: none;
    border-color: transparent;
}

/* PROバッジ */
.pro-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ツールヘッダー */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.tool-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--light-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.tool-icon-wrapper.ai {
    background: linear-gradient(135deg, rgba(251, 188, 4, 0.1), rgba(234, 67, 53, 0.1));
}

.tool-card:hover .tool-icon-wrapper {
    transform: scale(1.1);
}

.tool-icon {
    font-size: 2rem;
}

.tool-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
}

.status-dot.active {
    background: var(--secondary-color);
    animation: pulse 2s infinite;
}

/* ツールボディ */
.tool-body {
    padding: 1.5rem;
    flex: 1;
}

.tool-title {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tool-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ツールフッター */
.tool-footer {
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-users {
    font-size: 0.875rem;
    color: var(--text-light);
}

.tool-arrow {
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.tool-card:hover .tool-arrow {
    transform: translateX(5px);
}

/* ツール統計セクション */
.tools-stats {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 3rem;
}

.tools-stats h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ツール詳細セクション */
.tool-detail {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.tool-detail h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.tool-detail h3 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.tool-demo {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* チャート表示エリア */
.chart-container {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    min-height: 300px;
    position: relative;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: white;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

/* メトリクスカード */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.metric-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ニュースフィード（ツール内） */
.news-feed,
.trump-feed {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.news-feed::-webkit-scrollbar,
.trump-feed::-webkit-scrollbar {
    width: 8px;
}

.news-feed::-webkit-scrollbar-track,
.trump-feed::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 4px;
}

.news-feed::-webkit-scrollbar-thumb,
.trump-feed::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.news-feed::-webkit-scrollbar-thumb:hover,
.trump-feed::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.news-item {
    transition: all 0.3s;
}

.news-item:hover {
    transform: translateX(5px);
}

/* アニメーション */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 168, 83, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 168, 83, 0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-categories {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .category-icon {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-detail {
        padding: 1.5rem;
    }
    
    .tool-demo {
        padding: 1.5rem;
        min-height: 300px;
    }
}

/* ツール詳細画面の共通スタイル */

.tool-detail-section {
    animation: fadeIn 0.3s ease-out;
}

.tool-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.tool-subtitle {
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 1.125rem;
}

.tool-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tool-status-badge.active {
    background: rgba(52, 168, 83, 0.1);
    color: var(--secondary-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* VIアラート専用スタイル */
.vi-dashboard {
    display: grid;
    gap: 2rem;
}

.vi-main-display {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.05), rgba(52, 168, 83, 0.05));
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
}

.vi-main-display h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.vi-current {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.vi-value {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.vi-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.vi-change.positive {
    color: var(--secondary-color);
}

.vi-change.negative {
    color: var(--danger-color);
}

.change-arrow {
    font-size: 1.25rem;
}

.vi-status {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* VIXゲージ */
.vi-gauge {
    max-width: 600px;
    margin: 0 auto;
}

.gauge-container {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #34a853, #fbbc04, #ea4335);
    border-radius: 20px;
    transition: all 0.5s ease-out;
}

.gauge-markers {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

.gauge-markers span {
    position: absolute;
    transform: translateX(-50%);
}

/* VIXレベルカード */
.vi-levels {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.level-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.level-card.low {
    background: rgba(52, 168, 83, 0.1);
    border: 2px solid rgba(52, 168, 83, 0.3);
}

.level-card.medium {
    background: rgba(251, 188, 4, 0.1);
    border: 2px solid rgba(251, 188, 4, 0.3);
}

.level-card.high {
    background: rgba(234, 67, 53, 0.1);
    border: 2px solid rgba(234, 67, 53, 0.3);
}

.level-card.extreme {
    background: rgba(128, 0, 128, 0.1);
    border: 2px solid rgba(128, 0, 128, 0.3);
}

.level-range {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.level-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.level-desc {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* チャートセクション */
.vi-chart-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.vi-chart {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

/* アラート設定 */
.alert-settings {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.alert-config {
    margin-top: 1.5rem;
}

.alert-item {
    margin-bottom: 1.5rem;
}

.alert-item label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
}

.alert-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-input {
    width: 100px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s;
}

.alert-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-unit {
    color: var(--text-light);
}

.alert-methods {
    margin-top: 2rem;
}

.method-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.method-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 関連指標 */
.related-metrics {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.related-metrics .metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.related-metrics .metric-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.metric-name {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-change.positive {
    color: var(--secondary-color);
}

.metric-change.negative {
    color: var(--danger-color);
}