body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f6f8;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.5s, color 0.5s; /* スムーズな遷移 */
}

/* 伏せモード（省電力・没入モード） */
body.face-down-mode {
    background-color: #000;
}

body.face-down-mode .container {
    background-color: #111;
    color: #888;
    box-shadow: none;
    border: 1px solid #333;
}

body.face-down-mode header h1 {
    color: #555;
}

body.face-down-mode p,
body.face-down-mode .status-text,
body.face-down-mode .silence-timer {
    color: #444;
}

body.face-down-mode .status-icon {
    color: #222;
    animation: none;
}
/* 伏せモード終わり */

.container {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #2c3e50;
}

header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.status-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.status-icon {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 8px;
}

.status-playing .status-icon {
    color: #2ecc71;
    animation: pulse 2s infinite;
}

.status-speaking .status-icon {
    color: #e67e22;
}

#status-text {
    font-weight: bold;
    color: #34495e;
}

/* 音量バー */
.volume-meter-container {
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.volume-bar {
    width: 0%;
    height: 100%;
    background-color: #3498db;
    transition: width 0.1s linear;
}

.silence-timer {
    font-family: monospace;
    font-size: 2rem;
    color: #7f8c8d;
    height: 40px;
    margin-bottom: 24px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn {
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.primary {
    background-color: #3498db;
    color: white;
}

.secondary {
    background-color: #e74c3c; /* 停止ボタンは赤に */
    color: white;
}

.accent {
    background-color: #f1c40f;
    color: #333;
    width: 100%;
    justify-content: center;
    font-weight: bold;
}

.manual-trigger {
    margin-bottom: 24px;
}

.history {
    text-align: left;
    margin-top: 24px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.history h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #34495e;
}

#topic-log {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

#topic-log li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

footer a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 0.8rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}