/* ========================================
   プレゼンテーションモード — スタイルシート
   ======================================== */

:root {
  --gradient-bg: linear-gradient(135deg,
    #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  --gradient-rainbow: linear-gradient(135deg,
    #0078D4, #00B7C3, #107C10,
    #FFB900, #D83B01, #E3008C,
    #5C2D91);
  --glass-bg:     rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-blur:   20px;
  --text-on-dark: #fff;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Segoe UI', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-bg);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  cursor: none;
}

body.show-cursor {
  cursor: default;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Particles --- */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}

/* --- Header --- */
.pres-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1.5rem 2rem 1rem;
  flex-shrink: 0;
}

.pres-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  background: var(--gradient-rainbow);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

/* --- Message Stage --- */
.message-stage {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem;
  overflow: hidden;
}

.message-card {
  max-width: 900px;
  width: 100%;
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 3.5rem;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-rainbow);
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
}

.message-text {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.message-meta {
  font-size: 1rem;
  opacity: 0.6;
}

.message-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.message-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: linear-gradient(135deg, rgba(255, 185, 0, 0.25), rgba(227, 0, 140, 0.2));
  border: 1px solid rgba(255, 185, 0, 0.4);
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
}

.empty-message {
  font-size: clamp(1.4rem, 3vw, 2rem);
  opacity: 0.5;
}

/* --- Footer Controls --- */
.pres-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem 1rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.4s;
}

body.show-cursor .pres-footer {
  opacity: 1;
}

.pres-counter {
  font-size: 1rem;
  opacity: 0.7;
}

.pres-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.pres-btn {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.pres-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.pres-btn.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.pres-status {
  font-size: 0.85rem;
  opacity: 0.6;
  min-width: 60px;
  text-align: center;
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-rainbow);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  z-index: 20;
  transition: width 0.3s linear;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .message-stage {
    padding: 1.5rem 1.5rem;
  }

  .message-card {
    padding: 2rem 1.5rem;
  }

  .pres-footer {
    padding: 0.6rem 1rem 0.8rem;
  }
}

/* --- prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  .pres-title {
    animation: none;
  }

  .message-card::before {
    animation: none;
  }

  .particle {
    display: none;
  }

  .progress-bar {
    animation: none;
    transition: none;
  }
}
