/* ========================================
   HOCHZEITS-IMPROTHEATER - Styles
   ======================================== */

:root {
  --navy: #1B365D;
  --coral: #EA580C;
  --blush: #FFF0EB;
  --sand: #FAF7F2;
  --white: #FFFFFF;
  --slate: #4A5D78;
  --border: #ECE8E1;
  --color-royal-blue: #1D4ED8;
  --color-royal-blue-light: #EFF6FF;
  --coral-light: #FFF7ED;
  --chocolate: #D2691E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 12px rgba(27, 54, 93, 0.06);
  --shadow-card-hover: 0 4px 20px rgba(27, 54, 93, 0.10);
  --shadow-elevated: 0 8px 24px rgba(27, 54, 93, 0.12);
  --shadow-btn: 0 2px 8px rgba(234, 88, 12, 0.25);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--sand);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ========================================
   APP WRAPPER
   ======================================== */
.app-wrapper {
  width: 100%;
  max-width: 500px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: var(--sand);
  box-shadow: 0 0 50px rgba(27, 54, 93, 0.05);
  position: relative;
}

/* ========================================
   HEADER
   ======================================== */
.app-header {
  padding: 24px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--coral);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.heart-icon {
  color: var(--coral);
  margin-bottom: 8px;
  animation: floatHeart 4s ease-in-out infinite;
}

.brand-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 8px;
}

.brand-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 400;
  color: var(--coral);
  max-width: 90%;
  line-height: 1.4;
}

/* ========================================
   MAIN CONTENT & SCREENS
   ======================================== */
.app-main {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   WELCOME SCREEN
   ======================================== */
.heart-float {
  align-self: center;
  color: var(--coral);
  margin-bottom: 8px;
  animation: floatHeart 4s ease-in-out infinite;
}

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}

.intro-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  font-size: 15px;
  color: var(--slate);
  line-height: 1.6;
}

.intro-card strong { color: var(--navy); }

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-bottom: 4px;
}

.screen-instructions {
  font-size: 13px;
  color: var(--slate);
  text-align: center;
  margin-bottom: 28px;
  max-width: 90%;
  align-self: center;
  line-height: 1.5;
}

/* Player Selection */
.player-selection-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.player-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-family: inherit;
}

.player-card:hover {
  border-color: var(--coral);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.player-card:active { transform: scale(0.98); }

.player-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--color-royal-blue);
  line-height: 1;
  margin-bottom: 4px;
}

.player-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.5px;
}

.player-sub {
  font-size: 13px;
  color: var(--slate);
  margin-top: 4px;
}

/* Tip Card */
.tip-card {
  margin-top: auto;
  background: var(--blush);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.tip-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tip-icon {
  color: var(--coral);
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.tip-body {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
}

/* ========================================
   NAVIGATION
   ======================================== */
.btn-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.btn-back:hover { color: var(--navy); }

.btn-back svg { transition: transform 0.2s; }
.btn-back:hover svg { transform: translateX(-3px); }

/* ========================================
   GAME LIST
   ======================================== */
.games-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.game-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  text-align: left;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
  border-left: 4px solid var(--coral);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.game-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.game-card p {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-card-badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.badge-players {
  background: var(--color-royal-blue-light);
  color: var(--color-royal-blue);
}

.badge-duration {
  background: var(--coral-light);
  color: var(--coral);
}

.game-card-action {
  font-size: 14px;
  font-weight: 700;
  color: var(--coral);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.game-card:hover .game-card-action { gap: 8px; }

/* ========================================
   GAME DETAIL
   ======================================== */
.game-detail-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-bottom: 4px;
}

.game-meta-badge {
  align-self: center;
  background: var(--navy);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

/* ========================================
   TABS
   ======================================== */
.game-tabs {
  display: flex;
  background: var(--border);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 6px;
  color: var(--slate);
  transition: all 0.25s;
  position: relative;
  z-index: 1;
}

.tab-btn.active {
  background: var(--blush);
  color: var(--navy);
  box-shadow: var(--shadow-card);
}

.tab-container { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  animation: tabFadeIn 0.25s ease-out;
  gap: 12px;
  padding-bottom: 8px;
}

.tab-content.active { display: flex; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RULES TAB
   ======================================== */
.rules-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  border-left: 3px solid var(--coral);
  padding-left: 10px;
  margin-top: 8px;
  margin-bottom: 6px;
}

.rules-text {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-list li {
  font-size: 14px;
  color: var(--slate);
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
}

.rules-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.rules-list li strong { color: var(--navy); }

.rules-list li em { font-style: italic; }

/* Golden rule box */
.golden-rule-box {
  background: var(--blush);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 3px solid var(--coral);
  font-size: 14px;
  line-height: 1.6;
  color: var(--navy);
}

.golden-rule-box strong { color: var(--coral); }

/* Phase cards */
.phase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.phase-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.phase-text {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
}

/* Role cards (Stinky Sexy Silly) */
.role-card-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid var(--slate);
}

.role-card-item.stinky { border-left-color: var(--chocolate); }
.role-card-item.sexy { border-left-color: var(--coral); }

.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.role-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.role-card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border-radius: 20px;
}

.role-card-badge.stinky { background: rgba(210, 105, 30, 0.1); color: var(--chocolate); }
.role-card-badge.sexy { background: rgba(234, 88, 12, 0.1); color: var(--coral); }
.role-card-badge.silly { background: rgba(74, 93, 120, 0.1); color: var(--slate); }

.role-card-text {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.4;
}

/* Spiel starten CTA at bottom of rules */
.rules-cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-cta-hint {
  text-align: center;
  font-size: 13px;
  color: var(--slate);
}

/* ========================================
   PLAY TAB
   ======================================== */
.info-note {
  background: var(--blush);
  border: 1px dashed rgba(234, 88, 12, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 4px;
}

.info-note strong { color: var(--navy); }

/* Interactive Prompt Card */
.interactive-prompt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-elevated);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.25s;
}

.prompt-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.prompt-field {
  background: var(--sand);
  border: 1px dashed var(--coral);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prompt-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--coral);
  letter-spacing: 1px;
}

.prompt-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

/* Secret Box (Retoure) */
.secret-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.secret-box.revealed {
  background: var(--sand);
  border: 2px solid var(--coral);
  color: var(--navy);
}

.secret-box-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.secret-box.revealed .secret-box-header { color: var(--navy); }

.secret-box-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 12px;
}

.btn-reveal {
  background: var(--coral);
  border: none;
  color: var(--white);
  padding: 8px 18px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
}

.btn-reveal:hover { filter: brightness(1.1); }
.btn-reveal:active { transform: scale(0.96); }

/* Tip box in prompts */
.tip-box-inline {
  background: var(--blush);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tip-box-inline strong { color: var(--navy); }

/* Mental prep card */
.mental-prep-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.mental-prep-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.mental-prep-text {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 12px;
}

.role-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.role-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.role-dot.stinky { background: var(--chocolate); }
.role-dot.sexy { background: var(--coral); }
.role-dot.silly { background: var(--slate); }

.role-assign-text {
  font-size: 14px;
  color: var(--navy);
}

/* Guessing section */
.guessing-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
}

.guessing-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.guessing-text {
  font-size: 13px;
  color: var(--slate);
}

/* ========================================
   PLAY CONTROLS
   ======================================== */
.play-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

/* Timer */
.game-timer {
  background: var(--blush);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timer-display {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: var(--navy);
}

.timer-display.alert {
  color: var(--coral);
  animation: pulseTimer 0.8s ease-in-out infinite alternate;
}

@keyframes pulseTimer {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.timer-buttons { display: flex; gap: 8px; }

.btn-timer-ctrl {
  background: var(--navy);
  border: none;
  color: var(--white);
  padding: 8px 18px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 70px;
}

.btn-timer-ctrl:hover { background: #2B4C7E; }
.btn-timer-ctrl:active { transform: scale(0.96); }

.btn-timer-outline {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
}

.btn-timer-outline:hover { background: var(--sand); }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, #D24A0A 100%);
  border: none;
  color: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-outline:hover { background: var(--sand); border-color: var(--coral); }
.btn-outline:active { transform: scale(0.97); }

.dice-icon { transition: transform 0.4s; }
.rolling .dice-icon { transform: rotate(180deg); }

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.app-footer p {
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.5px;
}

/* ========================================
   ROLL ANIMATION
   ======================================== */
.roll-animation {
  animation: rollClick 0.4s ease-out;
}

@keyframes rollClick {
  0% { transform: scale(1); filter: blur(0); }
  50% { transform: scale(0.95); filter: blur(1px); }
  100% { transform: scale(1); filter: blur(0); }
}
