/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 1920px;
    height: 1200px;
    overflow: hidden;
    /* Noto Sans JPを最優先に使用 */
    font-family: 'Noto Sans JP', sans-serif;
    position: relative;
    /* テキスト選択を無効化（動画再生を妨げないため） */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 動画コンテナ（BrightSign互換性対応） */
#video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1200px;
    z-index: 1;
    overflow: hidden;
}

/* 背景動画（hwz使用時はobject-fitが効かないため明示的指定） */
#background-video {
    display: block;
    width: 1920px;
    height: 1200px;
}

/* オーバーレイコンテナ（動画の上のレイヤー） */
#overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* マウスイベントを通過させる */
}

/* メッセージコンテナ */
#message-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* 吹き出し（座布団） - 仮デザイン */
#speech-bubble {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 40px 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    /* backdrop-filter: blur(10px); */ /* BrightSign互換性のためコメントアウト */
    -webkit-backdrop-filter: blur(10px); /* Safari/古いChromium用 */
    display: inline-block;
    min-width: 400px;
    max-width: 1200px;
    /* BrightSign用に明示的な表示指定を追加 */
    visibility: visible;
    opacity: 1;
}

/* 日付テキスト */
#date-text {
    font-size: 32px;
    font-weight: 400;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    /* フォントレンダリング最適化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* メッセージテキスト */
#message-text {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* フォントレンダリング最適化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* エラーインジケーター */
#error-indicator {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.5);
}

#error-indicator.hidden {
    display: none;
}

.error-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
}

.error-text {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.4;
}

/* エラーアイコンのパルスアニメーション */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* フェードインアニメーション */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
