/* market.css - 相場分析ページ専用スタイル（デリバティブ分析版） */

/* 市場サマリーセクション */
.market-summary {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.03) 0%, rgba(52, 168, 83, 0.03) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(26, 115, 232, 0.1);
}

.market-summary h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.summary-date {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.summary-icon {
    font-size: 2.5rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 115, 232, 0.08);
    border-radius: 12px;
}

.summary-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.summary-content p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* タブナビゲーション */
.market-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0;
}

.tab-btn {
    padding: 1rem 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(26, 115, 232, 0.08);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
}

/* タブコンテンツ */
.tab-content {
    min-height: 600px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

/* 指数分析グリッド */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.index-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.index-header h4 {
    font-size: 1.375rem;
    color: var(--text-dark);
    margin: 0;
}

.index-badge {
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.index-badge.bullish {
    background: rgba(52, 168, 83, 0.1);
    color: var(--secondary-color);
}

.index-badge.neutral {
    background: rgba(251, 188, 4, 0.1);
    color: var(--accent-color);
}

.index-badge.bearish {
    background: rgba(234, 67, 53, 0.1);
    color: var(--danger-color);
}

/* 指数メトリクス */
.index-metrics {
    margin-bottom: 1.5rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-change.positive {
    color: var(--secondary-color);
}

.metric-change.negative {
    color: var(--danger-color);
}

/* デリバティブ分析セクション */
.derivatives-analysis {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.25rem;
}

.derivatives-analysis h5 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.derivatives-analysis ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.derivatives-analysis li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.derivatives-analysis li:last-child {
    border-bottom: none;
}

/* ボラティリティ分析 */
.volatility-analysis {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.vol-comparison {
    margin-bottom: 3rem;
}

.vol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.vol-item {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.vol-item h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.vol-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vol-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.vol-row:last-child {
    border-bottom: none;
}

.vol-value {
    font-weight: 600;
    color: var(--text-dark);
}

.vol-value.positive {
    color: var(--secondary-color);
}

.vol-structure {
    margin-bottom: 3rem;
}

.term-structure-chart {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.chart-note {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

.smile-analysis {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.smile-analysis p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.smile-analysis p:last-child {
    margin-bottom: 0;
}

/* 先物分析 */
.futures-analysis {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.futures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.futures-section {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

.futures-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.futures-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.futures-table th {
    background: rgba(26, 115, 232, 0.08);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.futures-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.futures-table tr:last-child td {
    border-bottom: none;
}

.futures-table .positive {
    color: var(--secondary-color);
    font-weight: 600;
}

.futures-table .negative {
    color: var(--danger-color);
    font-weight: 600;
}

.basis-analysis {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.basis-analysis h5 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.basis-analysis p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* ロールオーバー状況 */
.rollover-status {
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

.rollover-progress {
    margin-bottom: 1rem;
}

.progress-label {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.progress-bar-container {
    height: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.rollover-note {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 1rem;
}

/* CME分析 */
.cme-analysis {
    margin-top: 2rem;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.cme-analysis h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.cme-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cme-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.cme-item .label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.cme-item .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cme-item .note {
    font-size: 0.75rem;
    color: var(--text-light);
}

.cme-item .change {
    font-size: 0.875rem;
    font-weight: 500;
}

.cme-item .change.positive {
    color: var(--secondary-color);
}

/* オプション分析 */
.options-analysis {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.options-overview {
    margin-bottom: 3rem;
}

.options-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.option-metric-card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.option-metric-card h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.pcr-data,
.max-oi-data,
.gamma-data {
    text-align: center;
}

.pcr-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pcr-trend {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.oi-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.oi-item:last-child {
    border-bottom: none;
}

.strike {
    font-weight: 600;
    color: var(--text-dark);
}

.volume {
    color: var(--primary-color);
    font-weight: 500;
}

.gamma-level {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* グリークス分析 */
.greeks-analysis {
    margin-bottom: 3rem;
}

.greeks-summary {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.greeks-summary p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.greeks-summary p:last-child {
    margin-bottom: 0;
}

/* オプションフロー */
.option-flow {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.flow-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.flow-table th {
    background: rgba(26, 115, 232, 0.08);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.flow-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.flow-table .buy {
    color: var(--secondary-color);
    font-weight: 600;
}

.flow-table .sell {
    color: var(--danger-color);
    font-weight: 600;
}

/* 相関分析 */
.correlation-analysis {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.correlation-matrix {
    margin-bottom: 3rem;
}

.matrix-grid {
    overflow-x: auto;
    margin-top: 1rem;
}

.correlation-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.correlation-table th {
    background: rgba(26, 115, 232, 0.08);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.correlation-table td {
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.corr-cell {
    font-weight: 600;
}

.corr-cell.high {
    background: rgba(52, 168, 83, 0.2);
    color: var(--secondary-color);
}

.corr-cell.medium {
    background: rgba(251, 188, 4, 0.1);
    color: var(--accent-color);
}

.corr-cell.low {
    background: rgba(0, 0, 0, 0.05);
}

.corr-cell.negative {
    background: rgba(234, 67, 53, 0.1);
    color: var(--danger-color);
}

.correlation-note {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

/* リード・ラグ分析 */
.lead-lag-analysis {
    margin-bottom: 3rem;
}

.lead-lag-findings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.finding-item {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.finding-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.finding-item p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* レジーム分析 */
.regime-analysis {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

.regime-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.current-regime,
.regime-probability {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
}

.current-regime h5,
.regime-probability h5 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.regime-type {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.regime-characteristics ul {
    list-style: none;
    padding: 0;
}

.regime-characteristics li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.regime-characteristics li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.75rem;
}

.prob-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.prob-item:last-child {
    border-bottom: none;
}

.regime-name {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.prob-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* 免責事項 */
.analysis-disclaimer {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(234, 67, 53, 0.05);
    border: 1px solid rgba(234, 67, 53, 0.2);
    border-radius: 12px;
}

.analysis-disclaimer p {
    color: var(--text-dark);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .summary-grid,
    .index-grid,
    .vol-grid,
    .futures-grid,
    .options-metrics-grid,
    .lead-lag-findings {
        grid-template-columns: 1fr;
    }
    
    .market-tabs {
        gap: 0.25rem;
        padding: 0 1rem;
        margin: 0 -1rem 2rem -1rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .correlation-table {
        font-size: 0.75rem;
    }
    
    .correlation-table th,
    .correlation-table td {
        padding: 0.5rem;
    }
    
    .cme-data {
        grid-template-columns: 1fr;
    }
}