.fx-frame {
	position: absolute;
	top: -10px;
	left: -10px;
	right: -10px;
	bottom: -10px;
	pointer-events: none;
	border: 6px solid;/* 太い枠 */
	border-radius: 8px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s;
	z-index: 100;
}
/* 回転中（アクティブ）の状態 */

.fx-active {
	opacity: 1;
	visibility: visible;
}

#rotate-frame {
	position: absolute;/* 盤面の board-wrapper に対して配置 */
	top: -12px !important;
	left: -12px !important;
	right: -12px !important;
	bottom: -12px !important;
	border: 10px solid #ff3300 !important;/* 太さを強調 */
	border-radius: 12px !important;
	display: none;/* JSで block に切り替え */
	z-index: 9000 !important;
	pointer-events: none;/* 発光 */
	box-shadow: 0 0 20px #ff3300, inset 0 0 10px #ff3300;/* マスクの初期設定 */
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

#rotate-frame.fx-active {
	display: block !important;
	opacity: 1 !important;/* 常に少し明滅させることで「稼働中」を強調 */
	animation: pulse-red 2s infinite alternate;
}
@keyframes pulse-red {
    from { filter: brightness(1.0) drop-shadow(0 0 5px #ff0000); }
    to   { filter: brightness(1.5) drop-shadow(0 0 15px #ff0000); }
}

/* セルの同色フラッシュ：輝度とエフェクトの減衰版 */
.flash-active {
    position: relative;
    /* 明るさを1.5倍程度に抑え、彩度を上げることで色を強調 */
    filter: brightness(1.4) saturate(1.5) !important;
    /* 外側への強い光（白）を避け、セルの内側に色を溜める */
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.3) !important;
    z-index: 5;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.video-tile.flash-active,
.cell[style*="background-image"].flash-active {
    filter: brightness(1.2) contrast(1.2) !important;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5) !important;
}

.cell.flash-active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.6); /* 白色のオーバーレイ */
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

/* --- css/gimmick-effects.css 修正案 --- */

#searchlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95); /* 暗幕 */
    z-index: 150; /* 暗幕の高さ */
    pointer-events: none;
    display: none;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* 同色ギミック等で強調したいセルの定義 */
/* 暗幕(150)よりも高い z-index を指定して上に突き抜けさせる */
.cell.highlight-target,
.cell.flash-active {
    position: relative; /* z-indexを有効にするために必要 */
    z-index: 200 !important; 
    /* 視認性を上げるために発光エフェクトを追加（任意） */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: transform 0.1s ease-out;
}

/* 稼働中（タイマーON ＋ ドラッグ中）の表示 */

#searchlight-overlay.fx-active {
	display: block !important;
}

/* 回転アニメーションの定義 */
@keyframes board-rotate-90 {
    from { transform: rotate(0deg); }
    to   { transform: rotate(90deg); }
}
/* アニメーション適用用のクラス */

.board-rotating {
	animation: board-rotate-90 0.4s ease-in-out;
}
/* --- Complete!! --- */
.status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 204, 113, 0.8);
    color: white;
    font-size: 24px;
    font-weight: bold;/* 初期値は必ず none に。show クラスがある時だけ flex にする */
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 6px;
    pointer-events: none;
}

.status-overlay.show {
    display: flex !important;
}