/* フォントのインポート */
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

body {
	background-color: #000000;
	color: #00ff00;
	font-family: "MS Gothic", "Courier New", monospace;
	margin: 20px;
}
header { text-align: center; border-bottom: 3px double #00ff00; padding-bottom: 10px; margin-bottom: 20px; }
header > h1 { font-family: "Pixelify Sans", "MS Gothic", "Courier New", monospace; font-size: 2.5rem; }
.top-message { color: #ff00ff; font-size: 1rem; }
main { max-width: 600px; margin: 0 auto; }
.box { border: 2px solid #00ff00; padding: 15px; margin-bottom: 20px; background-color: #111111; }
.box h2 { margin-top: 0; background-color: #00ff00; color: #000000; display: inline-block; padding: 2px 10px; font-size: 1.1rem; }

/* プロジェクト全体のコメント（親） */
.project-comment-box {
	margin: 10px 0;
	padding-left: 10px;
	border-left: 2px solid #ffff00;
}
.project-comment-box .comment-label {
	font-size: 0.75rem;
	color: #ffaa00;
	margin: 0;
}
.project-comment-box .comment-text {
	font-size: 0.9rem;
	margin: 4px 0 0 0;
	color: #ffff00;
	line-height: 1.4;
}

/* バージョンごとのコメント（子） */
.ver-comment-box {
	margin: 8px 0 12px 15px;
	padding-left: 10px;
	border-left: 2px dashed #aaaaaa;
}
.ver-comment-box .comment-label {
	font-size: 0.7rem;
	color: #777777;
	margin: 0;
}
.ver-comment-box .comment-text {
	font-size: 0.8rem;
	margin: 2px 0 0 0;
	color: #cccccc;
	line-height: 1.4;
}
.comment-text {
	white-space: pre-wrap;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

/* 詳細表示用のコンテナ */
.song-item-detail {
	padding: 5px 0;
}
.song-header {
	display: flex;
	justify-content: space-between;
	font-weight: bold;
	margin-bottom: 12px;
}
.song-date {
	font-size: 0.8rem;
	color: #888888;
}
.song-meta {
	margin-bottom: 8px;
	font-size: 0.9rem;
}
.ver-select, .type-select, .dl-select {
	background: #000;
	color: #00ff00;
	border: 1px solid #00ff00;
	font-family: inherit;
	padding: 2px;
	margin-right: 10px;
}
.song-audio {
	width: 100%;
	margin-top: 5px;
}
footer { text-align: center; margin-top: 30px; }
button, .dl-btn { background-color: #000; color: #00ff00; border: 2px outset #00ff00; padding: 5px 15px; cursor: pointer; font-family: inherit; }
button:active, .dl-btn:active { border: 2px inset #00ff00; }

.back-to-dashboard {
	margin-bottom: 15px;
}
.back-to-dashboard a {
	color: #ff00ff;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: bold;
}
.back-to-dashboard a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   【新規追加】ダッシュボード・グリッドカードシステム
   ========================================================================== */
#project-grid-container {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-top: 15px;
}

.project-card {
	display: block;
	border: 1px solid #00ff00;
	background: #0a0a0a;
	padding: 12px;
	text-decoration: none;
	color: inherit;
	transition: all 0.2s ease;
}

.project-card:hover {
	background: #152215;
	border-color: #ffffff;
	box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.card-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.card-title {
	margin: 0;
	font-size: 1.5rem;
	color: #00ff00;
	font-family: 'Courier New', Courier, monospace;
}

.project-card:hover .card-title {
	color: #ffffff;
}

.card-meta {
	display: flex;
	gap: 15px;
	font-size: 0.75rem;
	color: #666666;
	margin-bottom: 8px;
}

.card-comment-preview {
	margin: 0;
	font-size: 0.8rem;
	color: #ffff00;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis; /* 長いテキストは自動で「...」にする */
}

.card-enter-label {
	text-align: right;
	font-size: 0.7rem;
	color: #ff00ff;
	font-weight: bold;
	margin-top: 4px;
}

/* ==========================================================================
   凡例パネル ＆ 指定英語名ステータスバッジ（16pxアニメーション版）
   ========================================================================== */
.status-legend-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 15px 0 20px 0;
	padding: 10px;
	width: auto;
	border: 1px dashed #00ff00;
	background: #050505;
	font-size: 0.8rem;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.legend-label {
	color: #888888;
	font-family: "Pixelify Sans", monospace;
}

.song-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* バッジの共通ベース */
.status-badge {
	display: inline-block;
	width: 16px;
	height: 16px;
	box-sizing: border-box;
	position: relative;
	vertical-align: middle;
	flex-shrink: 0;
}

/* 0. Progress：進行中（工事中風アンバー斜線スクロール） */
.status-badge.progress {
	background: linear-gradient(
		135deg,
		#ffaa00 25%, #000000 25%,
		#000000 50%, #ffaa00 50%,
		#ffaa00 75%, #000000 75%,
		#000000 100%
	);
	background-size: 10px 10px;
	border: 2px solid #ffaa00;
	box-shadow: 0 0 6px #ffaa00;
	animation: progress-stripe 0.6s linear infinite;
}
@keyframes progress-stripe {
	0% { background-position: 0 0; }
	100% { background-position: 10px 0; }
}

/* 1. Rejection：赤色の「❌」ドット ＆ パルス */
.status-badge.rejection {
	background: transparent;
	border: 2px solid #ff3333;
	animation: rejection-pulse 2s infinite ease-in-out;
}
.status-badge.rejection::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 2px;
	height: 2px;
	background: #ff3333;
	box-shadow: 
		-2px -2px 0 #ff3333, 2px -2px 0 #ff3333,
		-2px 2px 0 #ff3333, 2px 2px 0 #ff3333;
}
@keyframes rejection-pulse {
	0%, 100% { box-shadow: 0 0 2px #ff0000; border-color: #ff3333; }
	50% { box-shadow: 0 0 10px #ff0000, inset 0 0 4px #ff0000; border-color: #ff6666; }
}

/* 2. Cancel：黄色の「⚠️」ドット ＆ フラッシュ */
.status-badge.cancel {
	background: #222200;
	border: 2px solid #ffff00;
	animation: cancel-flash 1.5s infinite steps(1, start);
}
.status-badge.cancel::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 2px;
	height: 5px;
	background: #ffff00;
	box-shadow: 0 6px 0 #ffff00;
}
@keyframes cancel-flash {
	0%, 100% { box-shadow: 0 0 8px #ffff00; opacity: 1; }
	50% { box-shadow: 0 0 1px #888800; opacity: 0.4; }
}

/* 3. Complete：青色の円形 ＆ スピンループ */
.status-badge.complete {
	background: #0077ff;
	border: 2px dashed #00ffff;
	border-radius: 50%;
	box-shadow: 0 0 6px #00ffff;
	animation: complete-spin 4s linear infinite;
}
.status-badge.complete::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 2px;
	height: 2px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 0 2px #ffffff;
}
@keyframes complete-spin {
	0% { transform: rotate(0deg); box-shadow: 0 0 4px #00ffff; }
	50% { box-shadow: 0 0 10px #00ffff; }
	100% { transform: rotate(360deg); box-shadow: 0 0 4px #00ffff; }
}


/* --- 動的NEWタグスタイル --- */
.new-badge {
	font-family: "Pixelify Sans", monospace;
	font-size: 0.75rem;
	font-weight: bold;
	color: #ff00ff;
	background: #000000;
	border: 1px solid #ff00ff;
	padding: 1px 5px;
	margin-right: 5px;
	letter-spacing: 0.05em;
	box-shadow: 0 0 6px rgba(255, 0, 255, 0.4);
	display: inline-block;
	vertical-align: middle;
	line-height: 1.2;
	/* ネオンがパチパチと明滅するようなサイバーアニメーションを付与 */
	animation: new-badge-flash 1.2s infinite alternate ease-in-out;
}

@keyframes new-badge-flash {
	0% {
		opacity: 0.6;
		box-shadow: 0 0 2px #ff00ff;
	}
	100% {
		opacity: 1;
		box-shadow: 0 0 10px #ff00ff, inset 0 0 2px #ff00ff;
		text-shadow: 0 0 4px #ff00ff;
	}
}