/* webcheck 公開ギャラリー スタイル */
/* placeholder/index.html のダークテーマ（#0f0f23 + 紫グラデーション）に揃える */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #0f0f23;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}

.topbar {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.topbar h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: #888;
  margin-top: 0.3rem;
}

main {
  flex: 1;
  padding: 1rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.status-message {
  text-align: center;
  color: #999;
  padding: 2rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.card {
  background: #1a1a30;
  border: 1px solid #2a2a45;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.card-thumb {
  width: 100%;
  height: 160px;
  background: #11111f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb .audio-icon {
  font-size: 3rem;
  color: #667eea;
}

.card-body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

.card-filename, .card-created {
  font-size: 0.78rem;
  color: #999;
  word-break: break-all;
}

.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  width: fit-content;
}

.card-badge.chatgpt-user {
  background: #1f3d2f;
  color: #6fd89a;
}

.card-badge.gemini-user {
  background: #2a2850;
  color: #9db4ff;
}

.card-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}

.card-links a {
  color: #8fa0ff;
  text-decoration: none;
}

.card-links a:hover {
  text-decoration: underline;
}

/* --- モーダル（クリック拡大） --- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.modal-content {
  position: relative;
  background: #1a1a30;
  border-radius: 12px;
  max-width: min(900px, 95vw);
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-body {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.modal-body img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
}

.modal-body audio {
  width: 100%;
}

.modal-meta dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.85rem;
  color: #ccc;
  margin: 0.8rem 0;
}

.modal-meta dt {
  color: #888;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}

.btn-secondary {
  background: #2a2a45;
}

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #555;
}

footer a {
  color: #667eea;
  text-decoration: none;
}
