/*
Theme Name: Cocoon Child - Smart Eco Takuro
Theme URI: https://wp-cocoon.com/
Description: 大人気テーマ「Cocoon」をベースにした、スマートエコライフ専用の子テーマ。ショートコード [smart_eco_dashboard] でダッシュボードを表示できます。固定ページや投稿ページはCocoonの標準機能がそのまま使えます。
Author: 山口拓朗
Template: cocoon-master
Version: 1.0.0
*/

/* ==============================================================
   ダッシュボード専用のスタイル
   （Cocoon全体のレイアウトを崩さないよう、コンテナ内に限定しています）
   ============================================================== */
.smart-eco-dashboard-container {
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-blue: #38bdf8;
    --accent-blue: #0ea5e9;
    --accent-yellow: #fbbf24;
    --card-bg: rgba(15, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.15);

    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #064e3b, #020617);
    background-size: 400% 400%;
    animation: ecoGradientBG 15s ease infinite;
    color: var(--text-main);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

@keyframes ecoGradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.smart-eco-dashboard-container .glass-header,
.smart-eco-dashboard-container .glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.smart-eco-dashboard-container .glass-header { text-align: center; margin-bottom: 2rem; padding: 1.5rem; }
.smart-eco-dashboard-container .eco-title { margin: 0 0 0.5rem 0; font-size: 1.8rem; font-weight: bold; color: var(--primary-blue); text-shadow: 0 2px 4px rgba(0,0,0,0.5); border: none; }
.smart-eco-dashboard-container p { margin: 0; color: var(--text-main); }

.smart-eco-dashboard-container .dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.smart-eco-dashboard-container .glass-card { padding: 1.5rem; }
.smart-eco-dashboard-container .card-title {
    margin-top: 0; font-size: 1.2rem; border-bottom: 2px solid var(--accent-blue);
    display: inline-block; padding-bottom: 0.5rem; margin-bottom: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); color: var(--text-main);
}

.smart-eco-dashboard-container .flow-container { position: relative; height: 350px; display: flex; justify-content: center; align-items: center; }
.smart-eco-dashboard-container .node {
    position: absolute; display: flex; flex-direction: column; align-items: center;
    background: rgba(30, 41, 59, 0.8); backdrop-filter: blur(4px); border: 1px solid var(--border-color);
    padding: 10px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.4); z-index: 2; width: 110px; text-align: center; transition: transform 0.3s ease;
}
.smart-eco-dashboard-container .node:hover { transform: scale(1.05); border-color: var(--primary-blue); }
.smart-eco-dashboard-container .node .icon { font-size: 2rem; text-shadow: 0 0 10px rgba(255,255,255,0.3); line-height: 1;}
.smart-eco-dashboard-container .node .label { font-size: 0.75rem; margin-top: 5px; font-weight: bold; color: var(--text-main); line-height: 1.2;}

.smart-eco-dashboard-container .solar { top: 5%; left: 50%; transform: translateX(-50%); }
.smart-eco-dashboard-container .home { top: 45%; left: 50%; transform: translate(-50%, -50%); }
.smart-eco-dashboard-container .battery { top: 45%; left: 5%; transform: translateY(-50%); }
.smart-eco-dashboard-container .ev { top: 45%; right: 5%; transform: translateY(-50%); }
.smart-eco-dashboard-container .ecocute { bottom: 5%; left: 50%; transform: translateX(-50%); }

.smart-eco-dashboard-container .line { position: absolute; background: rgba(56, 189, 248, 0.2); box-shadow: 0 0 8px rgba(56, 189, 248, 0.1); z-index: 1; }
.smart-eco-dashboard-container .particle { width: 12px; height: 12px; background: var(--accent-yellow); border-radius: 50%; box-shadow: 0 0 15px var(--accent-yellow), 0 0 30px var(--accent-yellow); position: absolute; }
.smart-eco-dashboard-container .line-solar-home { width: 4px; height: 110px; top: 15%; left: 50%; transform: translateX(-50%); }
.smart-eco-dashboard-container .line-solar-home .particle { top: 0; left: -4px; animation: flowY 2s infinite linear; }
.smart-eco-dashboard-container .line-solar-battery { width: 140px; height: 4px; top: 10%; left: 20%; transform: rotate(35deg); transform-origin: left top; }
.smart-eco-dashboard-container .line-solar-battery .particle { top: -4px; left: 0; animation: flowX 2s infinite linear; }
.smart-eco-dashboard-container .line-battery-home { width: 120px; height: 4px; top: 45%; left: 18%; }
.smart-eco-dashboard-container .line-battery-home .particle { top: -4px; left: 0; animation: flowX 2s infinite linear; }
.smart-eco-dashboard-container .line-home-ev { width: 120px; height: 4px; top: 45%; right: 18%; }
.smart-eco-dashboard-container .line-home-ev .particle { top: -4px; left: 0; animation: flowX 2s infinite linear; }
.smart-eco-dashboard-container .line-home-ecocute { width: 4px; height: 110px; top: 50%; left: 50%; transform: translateX(-50%); }
.smart-eco-dashboard-container .line-home-ecocute .particle { top: 0; left: -4px; animation: flowY 2s infinite linear; }

@keyframes flowY { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes flowX { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

.smart-eco-dashboard-container .circular-progress { width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--accent-blue) 0deg, #1e293b 0deg); display: flex; align-items: center; justify-content: center; margin: 0 auto; position: relative; box-shadow: 0 0 20px rgba(14, 165, 233, 0.3); }
.smart-eco-dashboard-container .inner-circle { width: 120px; height: 120px; border-radius: 50%; background: #0f172a; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: bold; color: var(--primary-blue); text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); box-shadow: inset 0 4px 10px rgba(0,0,0,0.5); }
.smart-eco-dashboard-container .percent { font-size: 1.2rem; margin-left: 2px; }
.smart-eco-dashboard-container .meter-desc { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; }

@media (max-width: 768px) {
    .smart-eco-dashboard-container .dashboard-grid { grid-template-columns: 1fr; }
    .smart-eco-dashboard-container .flow-container { transform: scale(0.85); }
}
