/* ═══════════════════════════════════════════════════
   COMMI #7 — Wordle  (ueber-uns.php)
   Design: minimal black/white, single gold accent
   ═══════════════════════════════════════════════════ */

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

body.cw7-lock {
  overflow: hidden;
}

/* ══════════════════════════════════════════════════
   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.16, 1, 0.3, 1);
}

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

@keyframes cw7DegHintText {
  0%, 100% {
    color: inherit;
    text-shadow: none;
  }
  50% {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 24px rgba(255, 215, 0, 0.2);
  }
}

/* Hover: the 360° literally rotates 360° */
.cw7-deg-trigger.cw7-active:hover {
  color: #ffd700 !important;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.45), 0 0 34px rgba(255, 215, 0, 0.18);
  transform: rotate(360deg) scale(1.1);
}

.cw7-deg-trigger.cw7-collected {
  color: #ccaa00 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  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(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 24px 0;
}

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

/* ── Shared card shell ── */
.cw7-intro-card,
.cw7-game-card,
.cw7-result-card {
  position: relative;
  background: linear-gradient(180deg, #161616 0%, #101010 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── COMMI badge ── */
.cw7-badge {
  display: inline-block;
  background: #0a0a0a;
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #ffd700;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════
   INTRO MODAL
   ══════════════════════════════════════════════════ */
.cw7-intro-card {
  padding: 44px 40px 36px;
  max-width: 470px;
  width: 94%;
}

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

.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: 14px 18px;
  margin: 18px 0 24px;
}

.cw7-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 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: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-weight: 800;
  font-size: 0.82rem;
}

.cw7-rule-tile.cw7-correct {
  background: linear-gradient(135deg, #fff6b3 0%, #ffd700 55%, #ccaa00 100%);
  color: #0a0a0a;
}

.cw7-rule-tile.cw7-present {
  background: #fff;
  color: #0a0a0a;
}

.cw7-rule-tile.cw7-absent {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
}

.cw7-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s, border-color 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw7-close-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.06);
}

/* ── Primary button (white pill) ── */
.cw7-start-btn,
.cw7-claim-btn {
  width: 100%;
  padding: 15px 0;
  background: #fff;
  border: none;
  border-radius: 999px;
  color: #0a0a0a;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}

.cw7-start-btn:hover,
.cw7-claim-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 34px rgba(255, 255, 255, 0.14);
}

.cw7-claim-btn {
  margin-bottom: 12px;
}

/* ── Ghost button ── */
.cw7-retry-btn {
  width: 100%;
  padding: 13px 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw7-retry-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
}

/* ══════════════════════════════════════════════════
   GAME OVERLAY
   ══════════════════════════════════════════════════ */
.cw7-game-card {
  padding: 26px 30px 28px;
  max-width: 620px;
  width: 96%;
}

.cw7-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 2px;
  padding-right: 110px; /* keep clear of quit button */
}

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

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

.cw7-attempts span {
  color: #ffd700;
  font-weight: 700;
}

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

.cw7-row {
  display: flex;
  gap: 6px;
  perspective: 700px;
}

.cw7-cell {
  width: 54px;
  height: 54px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw7-cell.cw7-filled {
  border-color: rgba(255, 255, 255, 0.4);
  animation: cw7Pop 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3D flip while colors swap at the edge-on midpoint */
.cw7-cell.cw7-flip {
  animation: cw7Flip 0.5s ease-in-out;
}

.cw7-cell.cw7-correct {
  background: linear-gradient(135deg, #fff6b3 0%, #ffd700 55%, #ccaa00 100%);
  border-color: #ffd700;
  color: #0a0a0a;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}

.cw7-cell.cw7-present {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
}

.cw7-cell.cw7-absent {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.35);
}

.cw7-cell.cw7-bounce {
  animation: cw7Bounce 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.55);
}

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

@keyframes cw7Flip {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

@keyframes cw7Bounce {
  0% { transform: translateY(0); }
  35% { transform: translateY(-16px); }
  65% { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

@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: 7px;
}

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

.cw7-key {
  min-width: 40px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 8px;
  text-transform: uppercase;
}

.cw7-key:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

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

.cw7-key.cw7-wide {
  min-width: 64px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.cw7-key.cw7-correct {
  background: linear-gradient(135deg, #fff6b3 0%, #ffd700 55%, #ccaa00 100%);
  border-color: #ffd700;
  color: #0a0a0a;
}

.cw7-key.cw7-present {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
}

.cw7-key.cw7-absent {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.25);
}

/* ── Message toast ── */
.cw7-toast {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #0a0a0a;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

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

/* ── Quit button ── */
.cw7-quit-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 7px 16px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  position: absolute;
  top: 22px;
  right: 24px;
}

.cw7-quit-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════════════════
   RESULT CARDS
   ══════════════════════════════════════════════════ */
.cw7-result-card {
  padding: 50px 44px 42px;
  max-width: 430px;
  width: 90%;
}

.cw7-win-card {
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 70px rgba(255, 215, 0, 0.08);
}

.cw7-result-icon {
  display: block;
  margin-bottom: 18px;
  animation: cw7IconDrop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

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

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

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

.cw7-win-card .cw7-result-word {
  border-color: rgba(255, 215, 0, 0.35);
  color: #ffd700;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.3);
}
