/* ═══════════════════════════════════════════════════
   COMMI #7 — Wordle  (ueber-uns.php)
   ═══════════════════════════════════════════════════ */

/* ── Desktop only ── */
@media (max-width: 1023px) {
  #cw7Trigger,
  .cw7-overlay {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════
   TRIGGER — Hidden in the "360°" timeline text
   ══════════════════════════════════════════════════ */
.cw7-deg-trigger {
  display: inline-block;
  cursor: default;
  position: relative;
  transition: color 0.3s, text-shadow 0.3s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cw7-deg-trigger.cw7-active {
  cursor: pointer;
  display: inline-block;
  animation: cw7DegHintText 3s ease-in-out infinite;
}

/* Stronger, more noticeable pulse to draw the eye */
@keyframes cw7DegHintText {
  0%, 100% { 
    color: inherit; 
    text-shadow: none; 
  }
  50% { 
    color: #a5b4fc; 
    text-shadow: 0 0 12px rgba(99, 102, 241, 0.8), 0 0 25px rgba(99, 102, 241, 0.4); 
  }
}

/* Hover: the 360° literally rotates 360° — clever! */
.cw7-deg-trigger.cw7-active:hover {
  color: #a5b4fc !important;
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.6), 0 0 40px rgba(99, 102, 241, 0.2);
  transform: rotate(360deg) scale(1.1);
}

.cw7-deg-trigger.cw7-collected {
  color: #f59e0b !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  cursor: default;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   OVERLAY BASE
   ══════════════════════════════════════════════════ */
.cw7-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 3, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  padding: 24px 0;
}

.cw7-overlay.cw7-open {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════════════════
   INTRO MODAL
   ══════════════════════════════════════════════════ */
.cw7-intro-card {
  position: relative;
  background: linear-gradient(160deg, #131126 0%, #1e1338 50%, #0d0a1b 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 28px;
  padding: 48px 40px 40px;
  max-width: 480px;
  width: 94%;
  text-align: center;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transform: translateY(40px) scale(0.92);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cw7-overlay.cw7-open .cw7-intro-card {
  transform: translateY(0) scale(1);
}

.cw7-badge {
  display: inline-block;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: #fff;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.cw7-intro-card h2 {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.cw7-intro-card > p {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 12px;
}

.cw7-rules {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0 28px;
}

.cw7-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.cw7-rule-tile {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
}

.cw7-rule-tile.cw7-correct { background: #22c55e; }
.cw7-rule-tile.cw7-present { background: #eab308; }
.cw7-rule-tile.cw7-absent  { background: #3f3f46; }

.cw7-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cw7-close-btn:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.cw7-start-btn {
  width: 100%;
  padding: 16px 0;
  background: linear-gradient(135deg, #4338ca, #6366f1, #4338ca);
  background-size: 200% auto;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.cw7-start-btn:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

/* ══════════════════════════════════════════════════
   GAME OVERLAY
   ══════════════════════════════════════════════════ */
.cw7-game-card {
  position: relative;
  background: linear-gradient(160deg, #131126 0%, #1a1530 50%, #0d0a1b 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 28px;
  padding: 36px 28px 28px;
  max-width: 680px;
  width: 96%;
  text-align: center;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.9);
  transform: scale(0.92);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cw7-overlay.cw7-open .cw7-game-card {
  transform: scale(1);
}

.cw7-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.cw7-game-title {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cw7-attempts {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.cw7-attempts span {
  color: #a5b4fc;
  font-weight: 900;
}

/* ── Game Board ── */
.cw7-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.cw7-row {
  display: flex;
  gap: 4px;
}

.cw7-cell {
  width: 44px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  transition: border-color 0.2s, transform 0.15s;
  background: rgba(255, 255, 255, 0.02);
}

.cw7-cell.cw7-filled {
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
  animation: cw7Pop 0.1s ease;
}

.cw7-cell.cw7-correct {
  background: #22c55e;
  border-color: #22c55e;
  animation: cw7Flip 0.5s ease;
}

.cw7-cell.cw7-present {
  background: #eab308;
  border-color: #eab308;
  animation: cw7Flip 0.5s ease;
}

.cw7-cell.cw7-absent {
  background: #3f3f46;
  border-color: #3f3f46;
  animation: cw7Flip 0.5s ease;
}

@keyframes cw7Pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1.05); }
}

@keyframes cw7Flip {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

@keyframes cw7Shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.cw7-row.cw7-shake {
  animation: cw7Shake 0.4s ease;
}

/* ── Keyboard ── */
.cw7-keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cw7-kb-row {
  display: flex;
  gap: 4px;
}

.cw7-key {
  min-width: 34px;
  height: 46px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0 6px;
  text-transform: uppercase;
}

.cw7-key:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.cw7-key:active {
  transform: scale(0.95);
}

.cw7-key.cw7-wide {
  min-width: 58px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.cw7-key.cw7-correct {
  background: #22c55e;
}

.cw7-key.cw7-present {
  background: #eab308;
}

.cw7-key.cw7-absent {
  background: #27272a;
  color: rgba(255, 255, 255, 0.3);
}

/* ── Message toast ── */
.cw7-toast {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #0f172a;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.cw7-toast.cw7-show {
  opacity: 1;
}

/* ── Quit button ── */
.cw7-quit-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 6px 16px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  position: absolute;
  top: 16px;
  right: 18px;
}

.cw7-quit-btn:hover {
  color: #fff;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

/* ══════════════════════════════════════════════════
   RESULT CARDS
   ══════════════════════════════════════════════════ */
.cw7-result-card {
  position: relative;
  border-radius: 28px;
  padding: 60px 48px 50px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.95);
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cw7-overlay.cw7-open .cw7-result-card {
  transform: scale(1);
}

.cw7-win-card {
  background: linear-gradient(160deg, #1f1b0c 0%, #2f270a 50%, #151307 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.9), 0 0 80px rgba(245, 158, 11, 0.15);
}

.cw7-lose-card {
  background: linear-gradient(160deg, #1c0f0f 0%, #2b1111 50%, #110808 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cw7-result-icon {
  display: inline-block;
  margin-bottom: 20px;
  animation: cw7IconDrop 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes cw7IconDrop {
  0% { transform: scale(0) translateY(-100px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.cw7-result-card h2 {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cw7-win-card h2 { text-shadow: 0 0 30px rgba(245, 158, 11, 0.6); }
.cw7-lose-card h2 { text-shadow: 0 0 30px rgba(239, 68, 68, 0.5); }

.cw7-result-card > p {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cw7-result-word {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: inline-block;
}

.cw7-claim-btn {
  width: 100%;
  padding: 16px 0;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.cw7-claim-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.6);
}

.cw7-retry-btn {
  width: 100%;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.cw7-retry-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}
