/* アテナ様ステータスグラフ - 女神転生スタイル */

/* 既存のベーススタイル継承 */
#athena-status-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.status-container,
#athena-status-container {
    width: 650px !important;  /* 枠を650pxに拡大 */
    max-width: 98%;  /* レスポンシブ対応 */
    padding: 25px 40px;  /* 左右のパディングを増やす */
    background: rgba(0, 0, 20, 0.08) !important;  /* ほぼ透明 */
    backdrop-filter: blur(3px);  /* ブラー効果をさらに弱める */
    -webkit-backdrop-filter: blur(3px);
    border-radius: 24px;
    border: 1px solid rgba(100, 150, 255, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(100, 150, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.status-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 150, 255, 0.5),
        transparent);
}

.status-header {
    background: rgba(0, 0, 30, 0.08);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.status-title {
    color: rgba(255, 255, 255, 1);
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-align: center;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(100, 200, 255, 0.4);
}

.status-info {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.status-footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
}

.total-score {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 100, 200, 0.2);
    border-radius: 20px;
    color: rgba(100, 200, 255, 0.9);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    border: 1px solid rgba(100, 200, 255, 0.3);
    transition: all 0.3s ease;
}

.total-score.buffed {
    background: rgba(255, 215, 0, 0.2);
    color: rgba(255, 255, 100, 0.9);
    border-color: rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
}

.total-score.debuffed {
    background: rgba(255, 0, 0, 0.2);
    color: rgba(255, 100, 100, 0.9);
    border-color: rgba(255, 0, 0, 0.5);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.status-comment {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-style: italic;
}

/* イベント通知 */
.event-notification {
    background: linear-gradient(135deg, rgba(0,0,50,0.9), rgba(50,0,100,0.9));
    border: 1px solid rgba(200,200,255,0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: event-glow 2s ease-in-out infinite;
}

.event-notification.holiday {
    background: linear-gradient(135deg, rgba(100,80,0,0.9), rgba(200,150,0,0.9));
    border-color: rgba(255,215,0,0.5);
}

.event-notification.special {
    background: linear-gradient(135deg,
        rgba(100,50,0,0.9),
        rgba(200,150,0,0.9));
    border-color: rgba(255,200,100,0.7);
    animation: special-sparkle 2s ease-in-out infinite;
}

.event-notification.curse {
    background: linear-gradient(135deg, rgba(50,0,0,0.9), rgba(100,0,50,0.9));
    border-color: rgba(255,100,100,0.5);
}

.event-icon {
    font-size: 20px;
}

.event-name {
    flex: 1;
    color: rgba(255,255,255,0.9);
    font-weight: bold;
}

.event-effect {
    color: rgba(0,255,255,0.9);
    font-weight: bold;
    font-size: 16px;
}

@keyframes event-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0,200,255,0.3); }
    50% { box-shadow: 0 0 20px rgba(0,255,255,0.5); }
}

@keyframes special-sparkle {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255,200,0,0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255,255,0,0.8),
                    inset 0 0 10px rgba(255,255,200,0.3);
    }
}

/* 女神転生風ステータスバー */
.megaten-status-bars {
    padding: 20px 30px;  /* 内側のパディングも増やす */
    background: rgba(0, 0, 20, 0.05) !important;  /* ほぼ透明 */
    border-radius: 8px;
    font-family: 'Courier New', 'Consolas', monospace;
    margin: 0 auto;  /* 中央配置 */
    max-width: 600px;  /* 内部コンテンツの最大幅 */
    width: 100%;
}

.status-row {
    display: grid;
    grid-template-columns: 100px 50px 350px 40px 50px !important;  /* グラフは350pxのまま */
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;  /* 行間を少し広げる */
    height: 24px;
    justify-content: center;  /* 中央寄せ */
}

.status-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: pre; /* スペースを保持 */
}

.status-value {
    color: rgba(100, 255, 255, 1) !important;  /* より明るいシアン */
    font-size: 15px;  /* 少し大きく */
    font-weight: bold;
    text-align: right;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 5px rgba(0, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.status-value.buffed {
    color: rgba(255, 255, 100, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.7);
}

.status-value.debuffed {
    color: rgba(255, 100, 100, 0.9);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

.status-bar-container {
    position: relative;
    width: 350px !important;  /* グラフは350pxのまま（変更なし） */
    height: 18px;
    background: rgba(0, 0, 30, 0.15) !important;  /* さらに透明 */
    border: 1px solid rgba(0, 100, 200, 0.25);
    border-radius: 2px;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 100%表示の目盛り線 */
.status-bar-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.status-bar-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    /* 25%刻みの目盛り（女神転生風） */
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent calc(25% - 1px),
            rgba(100, 150, 200, 0.1) calc(25% - 1px),
            rgba(100, 150, 200, 0.1) 25%
        );
}

/* 50%位置にやや濃い線 */
.status-bar-container .halfway-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 1;
}

/* ベースステータスバー */
.status-bar-base {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(0, 180, 255, 0.6),
        rgba(0, 220, 255, 0.95)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 12px rgba(0, 200, 255, 0.4);
    /* border-radiusを削除（右端が丸いと短く見える） */
    transition: width 1.5s ease-out;
    left: 0 !important;  /* 確実に左端から開始 */
    top: 0 !important;
}

/* ボーナス/ペナルティバー（装備効果風） */
.status-bar-bonus {
    position: absolute;
    height: 100%;
    transition: width 1.5s ease-out 0.3s;
}

.status-bar-bonus.positive {
    background: linear-gradient(90deg,
        rgba(255,200,0,0.5),
        rgba(255,255,0,0.9));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        0 0 10px rgba(255,255,0,0.6);
    animation: bonus-pulse 1.5s ease-in-out infinite;
}

.status-bar-bonus.negative {
    background: linear-gradient(90deg,
        rgba(100,0,0,0.7),
        rgba(200,0,0,0.9));
    box-shadow:
        inset 0 -1px 0 rgba(0,0,0,0.5),
        0 0 10px rgba(255,0,0,0.4);
    animation: penalty-pulse 1.5s ease-in-out infinite;
}

@keyframes bonus-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes penalty-pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.6; }
}

.status-max {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-align: right;
    width: 35px; /* 固定幅 */
}

/* ステータス修正値表示 */
.status-modifier {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: bold;
    width: 50px; /* 固定幅 */
    text-align: center;
}

.status-modifier.positive {
    color: rgba(255, 255, 100, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.status-modifier.negative {
    color: rgba(255, 100, 100, 0.9);
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* アニメーション適用クラス */
.status-bar-base.animated,
.status-bar-bonus.animated {
    animation: bar-slide-in 1.5s ease-out forwards;
}

@keyframes bar-slide-in {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* レーダーチャート用イベントバッジ */
.radar-event-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(0,0,50,0.9), rgba(50,0,100,0.9));
    border: 1px solid rgba(200,200,255,0.5);
    border-radius: 20px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    z-index: 10;
    animation: badge-float 3s ease-in-out infinite;
}

.radar-event-badge.holiday {
    background: linear-gradient(135deg, rgba(100,80,0,0.9), rgba(200,150,0,0.9));
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.radar-event-badge.special {
    background: linear-gradient(135deg, rgba(100,50,0,0.9), rgba(200,100,0,0.9));
    border-color: rgba(255,200,100,0.5);
    box-shadow: 0 0 15px rgba(255,200,0,0.3);
}

.radar-event-badge.curse {
    background: linear-gradient(135deg, rgba(50,0,0,0.9), rgba(100,0,50,0.9));
    border-color: rgba(255,100,100,0.5);
    box-shadow: 0 0 15px rgba(255,0,0,0.3);
}

.radar-event-badge .event-icon {
    font-size: 14px;
}

.radar-event-badge .event-name {
    color: rgba(255,255,255,0.9);
    font-weight: bold;
}

.radar-event-badge .event-bonus {
    color: rgba(255,255,100,0.9);
    font-weight: bold;
}

.radar-event-badge.curse .event-bonus {
    color: rgba(255,100,100,0.9);
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* チャートラッパーの調整 */
.chart-wrapper {
    position: relative;
    background: rgba(0, 0, 20, 0.05) !important;  /* ほぼ透明 */
    border: 1px solid rgba(100, 150, 255, 0.08);
    box-shadow: none;
    border-radius: 16px;
    padding: 25px 35px;  /* ゆったりとした内部スペース */
    margin: 15px 0;
    min-height: 240px;
}

#status-chart {
    max-width: 100%;
    height: 240px !important;
}

/* キャンバスに特別な日のエフェクト */
.chart-wrapper.has-bonus {
    box-shadow:
        inset 0 0 30px rgba(255,215,0,0.1),
        0 0 20px rgba(255,215,0,0.2);
}

.chart-wrapper.has-penalty {
    box-shadow:
        inset 0 0 30px rgba(255,0,0,0.1),
        0 0 20px rgba(255,0,0,0.2);
}

/* パルスアニメーション（特別な日） */
@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

.status-container:hover {
    animation: gentle-pulse 3s ease-in-out infinite;
}

/* レスポンシブ対応（スマホ・タブレット） */
@media (max-width: 768px) {
    .status-container,
    #athena-status-container {
        width: 95% !important;  /* 画面幅に合わせる */
        padding: 15px !important;
    }

    .status-row {
        grid-template-columns: 80px 40px 1fr 30px 45px !important;  /* 可変幅に */
    }

    .status-bar-container {
        width: 100% !important;  /* 親要素に合わせる */
    }
}

/* タブレット */
@media (min-width: 768px) and (max-width: 1024px) {
    .status-container,
    #athena-status-container {
        width: 600px !important;
        padding: 20px 30px;
    }
}

/* 大画面対応（デスクトップ） */
@media (min-width: 1400px) {
    .status-container,
    #athena-status-container {
        width: 700px !important;  /* さらに広い枠 */
        padding: 30px 50px;
    }

    .status-row {
        grid-template-columns: 100px 50px 350px 40px 50px !important;
    }

    .status-bar-container {
        width: 350px !important;  /* グラフは変更なし */
    }
}

/* 暗めの背景との相性向上 */
body {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1e);
}