/* realtime-groq.css — Groq リアルタイムページ スタイル Part 1: テーマ・レイアウト・マイク */

:root {
  --bg: #0f0f23; --card: #1a1a2e; --card2: #16213e; --border: #2a2d4e;
  --groq: #f55036; --groq-dim: rgba(245,80,54,0.15); --groq-border: rgba(245,80,54,0.4);
  --blue: #3b82f6; --green: #22c55e; --yellow: #eab308; --red: #ef4444;
}
html, body { height: 100%; }
.header { background: linear-gradient(135deg,#1a1a2e 0%,#16213e 100%); justify-content: flex-start; gap: 12px; height: 60px; padding: 0 20px; }
.header h1 { font-size: 17px; font-weight: 700; color: var(--text); }
.header h1 span { color: var(--groq); }
.tab-nav { background: var(--card); border-bottom: 2px solid var(--border); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-link { padding: 12px 18px; color: var(--text-muted); font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; flex-shrink: 0; transition: color 0.2s, border-color 0.2s; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--groq); border-bottom-color: var(--groq); }
.tab-icon { font-size: 15px; }
.main { padding: 20px 16px; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.mic-section { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 20px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.mic-btn { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--groq-border); background: var(--card2); color: var(--groq); font-size: 32px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; outline: none; position: relative; min-height: 80px; min-width: 80px; }
.mic-btn:hover { background: var(--groq-dim); border-color: var(--groq); transform: scale(1.05); }
.mic-btn.state-listening { border-color: var(--groq); background: var(--groq-dim); color: var(--groq); animation: pulse-groq 1.8s infinite; }
.mic-btn.state-speaking { border-color: var(--red); background: rgba(239,68,68,0.15); color: var(--red); animation: pulse-red 0.8s infinite; }
.mic-btn.state-processing { border-color: var(--yellow); background: rgba(234,179,8,0.12); color: var(--yellow); animation: pulse-yellow 1s infinite; cursor: default; }
.mic-btn.state-playing { border-color: var(--green); background: rgba(34,197,94,0.12); color: var(--green); animation: pulse-green 1.2s infinite; cursor: default; }
@keyframes pulse-groq { 0%,100% { box-shadow: 0 0 0 0 rgba(245,80,54,0.4); } 50% { box-shadow: 0 0 0 14px rgba(245,80,54,0); } }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); } 50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } }
@keyframes pulse-yellow { 0%,100% { box-shadow: 0 0 0 0 rgba(234,179,8,0.4); } 50% { box-shadow: 0 0 0 12px rgba(234,179,8,0); } }
@keyframes pulse-green { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); } 50% { box-shadow: 0 0 0 14px rgba(34,197,94,0); } }
.mic-label { font-size: 12px; color: var(--text-muted); margin-top: -8px; }
.status-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); width: 100%; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; transition: background 0.2s; }
.status-dot.active { background: var(--groq); }
.status-dot.speaking { background: var(--red); animation: blink 0.6s infinite; }
.status-dot.processing { background: var(--yellow); animation: blink 0.8s infinite; }
.status-dot.playing { background: var(--green); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.status-text { font-size: 13px; color: var(--text-muted); }
.volume-section { display: flex; align-items: center; gap: 8px; width: 100%; }
.volume-label { font-size: 10px; color: var(--text-dim); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.volume-bar-wrap { flex: 1; height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden; }
.volume-bar-fill { height: 100%; width: 0%; background: var(--groq); border-radius: 3px; transition: width 0.05s linear; }
.subtitle-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; min-height: 68px; font-size: 17px; font-weight: 600; color: var(--text); text-align: center; line-height: 1.6; word-break: break-all; transition: border-color 0.2s; }
.subtitle-card.active { border-color: var(--groq-border); }
.subtitle-card.placeholder { color: var(--text-dim); font-size: 13px; font-weight: 400; }
.timing-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
@media (max-width: 480px) { .timing-grid { grid-template-columns: repeat(3,1fr); } }
.timing-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.timing-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.timing-value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.timing-value.hl { color: var(--groq); }
