/* TAROCK Game Styles - Clean Minimal Design */

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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 20px;
  padding-top: 20px;
  color: #333333;
  overflow-x: hidden;
}

#app {
  max-width: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Main Container - 85% width */
.main-container {
  width: 85%;
  flex: 0 0 85%;
  padding: 20px;
  position: relative;
}

/* Sidebar - 15% width */
.sidebar {
  width: 15%;
  flex: 0 0 15%;
  background: #f9f9f9;
  border-left: 1px solid #e0e0e0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}

.sidebar-icons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
}

.sidebar-icon {
  width: auto;
  height: auto;
  min-width: 40px;
  min-height: 40px;
  border-radius: 0;
  background: none;
  color: #333333;
  font-size: 28px;
  font-weight: normal;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 8px;
  transition: opacity 0.2s;
  z-index: 50;
  pointer-events: auto;
}

.sidebar-icon:hover {
  opacity: 0.7;
}

.sidebar-icon.hidden {
  display: none !important;
}

.sidebar-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-icon:disabled:hover {
  opacity: 0.3;
}

/* Undo/Redo buttons - subtle, at bottom */
.undo-button,
.redo-button,
.abandon-button {
  background: transparent !important;
  color: #666666 !important;
  border: 1px solid #e0e0e0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  height: 36px !important;
}

.undo-button:hover,
.redo-button:hover {
  background: #f5f5f5 !important;
  border-color: #cccccc !important;
  color: #333333 !important;
}

.abandon-button {
  color: #cc0000 !important;
  border-color: #cc0000 !important;
}

.abandon-button:hover {
  background: #cc0000 !important;
  color: #ffffff !important;
  border-color: #cc0000 !important;
}

.undo-button:disabled,
.redo-button:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

.undo-button:disabled:hover,
.redo-button:disabled:hover {
  background: transparent !important;
  border-color: #e0e0e0 !important;
}

.sidebar-bottom-actions {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-button,
.sound-button {
  background: transparent;
  color: #666666;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-weight: 400;
  height: 36px;
  opacity: 0.8;
  transition: all 0.2s;
}

.voice-button:hover,
.sound-button:hover {
  opacity: 1;
  background: #f5f5f5;
  border-color: #cccccc;
}

.voice-button:active,
.sound-button:active {
  background: #e8e8e8;
}

#sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

header {
  text-align: center;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  position: fixed;
  top: 20px;
  left: 120px;
  font-size: 3em;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  padding: 10px 0;
  letter-spacing: 2px;
  text-align: left;
  z-index: 1000;
  background: none;
  pointer-events: none;
  font-family: 'Arial', 'Helvetica', sans-serif;
  white-space: nowrap;
  overflow: visible;
  transform: translateZ(0);
  mix-blend-mode: difference;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
  will-change: transform;
}

#tarock-logo.clickable-logo {
  cursor: pointer;
  transition: opacity 0.2s;
  pointer-events: auto;
}

#tarock-logo.clickable-logo:hover {
  opacity: 0.9;
}

header .subtitle {
  position: fixed;
  top: 85px;
  left: 120px;
  font-size: 0.6em;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  padding: 5px 0;
  letter-spacing: 0.5px;
  text-align: left;
  font-style: italic;
  line-height: 1.2;
  z-index: 1000;
  background: none;
  pointer-events: none;
  white-space: nowrap;
  overflow: visible;
  transform: translateZ(0);
  mix-blend-mode: difference;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.15), 0 0 15px rgba(255, 255, 255, 0.1);
  will-change: transform;
}

/* Game Tips and Hints - Below Subtitle */
.game-tips {
  position: fixed;
  top: 20px;
  right: calc(15% + 20px);
  z-index: 50;
  margin: 0;
  padding: 0;
  pointer-events: none;
  max-width: 500px;
}

.game-tip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 20px;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-left: 4px solid #666666;
  margin: 0 0 8px 0;
  text-align: left;
  pointer-events: auto;
  max-width: 500px;
}

.game-tip-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.game-tip-content {
  flex: 1;
  text-align: left;
}

.game-tip-text {
  font-size: 16px;
  color: #333333;
  margin: 0;
  line-height: 1.5;
  text-align: left;
}

.game-tip-text strong {
  color: #000000;
  font-weight: 700;
}

.game-tip-hint {
  font-size: 14px;
  color: #666666;
  margin: 6px 0 0 0;
  line-height: 1.5;
  text-align: left;
  font-style: italic;
}

.game-tip-hint strong {
  color: #333333;
  font-weight: 600;
  font-style: normal;
}

/* Buttons are now in sidebar, styled as .sidebar-icon */

/* Sort Buttons */
.sort-buttons {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  justify-content: center;
  flex-wrap: wrap;
}

/* Fixed sort buttons in bottom left corner */
.sort-buttons-fixed {
  position: fixed;
  bottom: 140px; /* Moved higher to avoid overlapping with music player */
  left: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  z-index: 50;
  width: auto;
}

.sort-label {
  font-size: 12px;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.sort-btn {
  padding: 12px 8px;
  font-size: 13px;
  background: #f5f5f5;
  border: 1px solid #cccccc;
  color: #333333;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  font-weight: 400;
  width: 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.sort-btn-text {
  display: inline-block;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

.sort-btn:hover {
  background: #e0e0e0;
  border-color: #999999;
}

/* Statistics Modal - Uses modal-overlay pattern */
.stats-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stats-modal-content {
  max-width: 800px;
  width: 100%;
}

.stats-content {
  background: #ffffff;
  border-radius: 0;
  width: 100%;
  overflow: visible;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.stats-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333333;
}

.close-stats {
  background: none;
  border: none;
  font-size: 32px;
  color: #666666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
}

.close-stats:hover {
  color: #333333;
}

.stats-body {
  padding: 20px;
}

.stats-section {
  margin-bottom: 30px;
}

.stats-section h3 {
  margin-bottom: 15px;
  color: #333333;
  font-size: 18px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.stats-section h4 {
  margin: 15px 0 10px 0;
  color: #333333;
  font-size: 16px;
}

.player-stats {
  background: #f9f9f9;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.player-stats ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player-stats li {
  padding: 5px 0;
  color: #333333;
}

.recent-games {
  max-height: 400px;
  overflow-y: auto;
}

.game-entry {
  padding: 12px;
  margin-bottom: 10px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.game-date {
  font-size: 12px;
  color: #666666;
  margin-bottom: 5px;
}

.game-details {
  font-size: 14px;
  color: #333333;
}

#screen {
  background: #ffffff;
  border: none;
  padding: 30px;
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 20px;
  min-height: calc(100vh - 200px);
  max-width: 100%;
}

#screen.hidden {
  display: none;
}

/* Game Controls */
.game-controls {
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  text-align: center;
  position: relative;
  z-index: 1;
}

.game-controls h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333333;
}

.game-controls .dog-instruction {
  margin: 0 0 30px 0;
  font-size: 16px;
  color: #666666;
}

.game-controls:empty,
.game-controls[style*="display: none"] {
  display: none !important;
  border: none;
  padding: 0;
  margin: 0;
}

.game-controls button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 400;
  background: #666666;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}

.game-controls button:hover {
  background: #555555;
}

.game-controls #continue-game {
  padding: 20px 48px;
  font-size: 24px;
  font-weight: 700;
  margin: 20px auto;
  display: block;
  min-width: 250px;
}

/* Top Info Bar - Scoreboard + Helper */
.top-info-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 0;
}

/* Scoreboard - Top Left Corner (Horizontal, Fixed) */
.scoreboard {
  background: #ffffff;
  padding: 16px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scoreboard h3 {
  margin-bottom: 12px;
  color: #333333;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  border-bottom: none;
  padding-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scores-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.scoreboard-note {
  font-size: 10px;
  color: #666666;
  margin-bottom: 6px;
  font-style: italic;
}


.player-score {
  padding: 10px 14px;
  font-size: 11px;
  color: #333333;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  font-weight: 400;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  line-height: 1.4;
  transition: all 0.2s;
}

.player-score.current-player-score {
  background: #f5f5f5;
  border: 2px solid #333333;
  border-left: 4px solid #333333;
}

.player-score:hover {
  background: #f9f9f9;
  border-color: #cccccc;
}

.player-score.current-player-score:hover {
  background: #f0f0f0;
  border-color: #333333;
}

.player-score strong {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  margin-bottom: 2px;
}

.player-score span {
  font-size: 13px;
  font-weight: 700;
  color: #000000;
}

/* Bidding Panel - Centered below title */
.bidding-panel {
  background: #ffffff;
  padding: 16px 20px;
  margin: 0;
  border: 2px solid #e0e0e0;
  position: fixed;
  top: 10px;
  right: calc(15% + 10px);
  display: none;
  text-align: left;
  max-width: 650px;
  z-index: 100; /* Lower than modals but above regular content */
}

.bidding-panel.show {
  display: block;
}

.bidding-panel h3 {
  margin-bottom: 12px;
  color: #333333;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  border-bottom: none;
  padding-bottom: 8px;
}

.bidding-instruction {
  font-size: 12px;
  color: #666666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.bid-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.bid-btn {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 400;
  background: #f5f5f5;
  color: #333333;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
  position: relative;
  font-family: 'Inter', sans-serif;
}

/* Visual reference: more red as risk increases */
.bid-btn[data-bid="pass"] {
  background: #f5f5f5;
  color: #333333;
}

.bid-btn[data-bid="petite"] {
  background: #ffe0e0;
  color: #333333;
}

.bid-btn[data-bid="garde"] {
  background: #ffb3b3;
  color: #333333;
}

.bid-btn[data-bid="garde-sans"] {
  background: #ff8080;
  color: #333333;
}

.bid-btn[data-bid="garde-contre"] {
  background: #ff4d4d;
  color: #ffffff;
}

.bid-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bid-btn[data-bid="pass"]:hover {
  background: #e0e0e0;
}

.bid-btn[data-bid="petite"]:hover {
  background: #ffcccc;
}

.bid-btn[data-bid="garde"]:hover {
  background: #ff9999;
}

.bid-btn[data-bid="garde-sans"]:hover {
  background: #ff6666;
}

.bid-btn[data-bid="garde-contre"]:hover {
  background: #ff3333;
}

.bid-btn:hover .bid-tooltip {
  visibility: visible;
  opacity: 1;
}

.bid-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #f5f5f5;
}

.bid-btn.disabled:hover {
  background: #f5f5f5;
  color: #000000;
}

.bid-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #666666;
  color: #ffffff;
  border-radius: 2px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  transition: opacity 0.2s;
  pointer-events: none;
}

.bid-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #666666;
}

.bidding-instruction {
  margin-bottom: 12px;
  padding: 8px;
  background: #ffffff;
  border: none;
  color: #333333;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
}

.current-bids {
  font-size: 12px;
  color: #666666;
  text-align: left;
  padding: 8px 0 0 0;
  background: transparent;
  border-top: 1px solid #e0e0e0;
  margin-top: 8px;
  border: none;
  margin-top: 12px;
  font-weight: 400;
}

/* Trick Area - Central Focus */
.trick-area {
  position: relative;
  background: transparent; /* Default transparent, will be set when waiting */
  padding: 20px 0; /* Add vertical padding to trick-area instead */
  margin: 20px auto;
  border: 3px solid transparent;
  text-align: center;
  min-height: 430px; /* Match card height (390px) + padding (20px top + 20px bottom) */
  height: 430px; /* Fixed height to match card size */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible; /* Allow cards to be fully visible */
  width: auto;
  /* Width will be set dynamically based on number of cards */
  max-width: 95%;
  transition: width 0.3s ease; /* Smooth transition when width changes */
}

/* Show background and glow only when waiting for first card */
.trick-area:not(.cards-played) {
  background: linear-gradient(#fafafa, #fafafa) padding-box,
              linear-gradient(90deg, #ffd700, #ffed4e, #ffd700, #ffaa00, #ffd700) border-box;
  background-size: 200% 200%;
  animation: goldBorderFlow 3s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
}

/* Hide background and glow when cards are played */
.trick-area.cards-played {
  background: transparent;
  border: none;
  box-shadow: none;
  animation: none;
}

.trick-area.cards-played::before {
  display: none; /* Hide the glow effect */
}

.trick-area::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(90deg, 
    rgba(255, 215, 0, 0.9),
    rgba(255, 237, 78, 0.9),
    rgba(255, 215, 0, 0.9),
    rgba(255, 170, 0, 0.9),
    rgba(255, 215, 0, 0.9)
  );
  background-size: 200% 100%;
  z-index: -1;
  animation: goldGlow 2s ease-in-out infinite;
  filter: blur(8px);
  opacity: 0.7;
}

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

@keyframes goldGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.trick-area.hidden {
  display: none !important;
}

.trick-area h3 {
  margin: 0;
  padding: 12px 20px 8px 20px;
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: center;
  width: 100%;
}

/* Phase Title - Centered in the middle */
.phase-title {
  position: relative;
  text-align: center;
  margin: 20px auto 20px auto; /* Reduced top margin to move it up */
  padding: 0;
  font-size: 32px;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Arial', 'Helvetica', sans-serif;
  pointer-events: none;
  z-index: 10;
}

.trick-info {
  margin-bottom: 24px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  font-size: 13px;
  color: #333333;
  font-weight: 400;
  display: inline-block;
  max-width: 600px;
}

.no-cards {
  color: #666666;
  font-style: italic;
  padding-top: 120px; /* Add top padding to center the text vertically */
  margin: 0;
}

.trick-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px; /* Reduced gap - cards closer together */
  flex-wrap: nowrap; /* Prevent wrapping - cards should stay in one row */
  padding: 0 30px; /* Remove vertical padding, keep horizontal */
  min-height: 390px; /* Increased to accommodate larger cards with border/shadow */
  height: 390px; /* Fixed height to match card size (260px * 1.5 = 390px + border/shadow) */
  width: 100%;
  overflow: visible; /* Allow cards to be fully visible */
  position: relative;
}

.trick-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex-shrink: 0; /* Prevent wrapper from shrinking */
  flex-grow: 0; /* Prevent wrapper from growing */
}

.trick-card-wrapper:nth-child(1) {
  z-index: 1;
}

.trick-card-wrapper:nth-child(2) {
  z-index: 2;
}

.trick-card-wrapper:nth-child(3) {
  z-index: 3;
}

.trick-card-wrapper:nth-child(4) {
  z-index: 4;
}

.trick-card-wrapper:nth-child(5) {
  z-index: 5;
}

.trick-card-player {
  font-size: 12px;
  font-weight: 600;
  color: #333333;
  text-align: center;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Blue neon animated border effect when waiting for cards */
.trick-cards.waiting-for-cards {
  border: none;
  position: relative;
}

.trick-cards .card {
  /* Cards are bigger in trick area - 1.5x scale */
  transition: transform 0.2s, box-shadow 0.3s, translate 0.5s ease-out;
  width: 270px; /* 180px * 1.5 */
  height: 390px; /* 260px * 1.5 */
  margin: 0; /* Ensure no margin causes overlap */
  flex-shrink: 0; /* Prevent cards from shrinking */
  flex-grow: 0; /* Prevent cards from growing */
}

.trick-cards .card:hover {
  transform: scale(1.02); /* Slightly larger on hover */
}

.trick-card-wrapper .card {
  margin: 0; /* Remove any margin from card itself */
}

/* Winning card highlight and animation */
.trick-cards .card.trick-winner {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
  border: 3px solid #ffd700;
  z-index: 10;
  position: relative;
}

.trick-cards .card.trick-winner-slide {
  transform: translateY(-60px); /* Only translate, no scale since card is already at correct size */
  box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8);
  z-index: 20;
}

/* Helper Overlay - Now in Sidebar (Game Progress + Contract Info) */
.helper-overlay {
  background: #ffffff;
  padding: 14px 18px;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 50; /* Lower than modals */
}

/* Contract Info - Now integrated in helper overlay (top right) */

.helper-overlay h4 {
  margin-bottom: 8px;
  color: #333333;
  font-size: 14px;
  font-weight: 700;
  border-bottom: none;
  padding-bottom: 4px;
}

.helper-overlay p {
  margin: 4px 0;
  font-size: 12px;
  color: #333333;
  line-height: 1.4;
}

.helper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f5f5f5;
  border: none;
  min-width: 60px;
}

.helper-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #cccccc;
  color: #333333;
  font-weight: 700;
  font-size: 12px;
  border-radius: 0;
  flex-shrink: 0;
}

.helper-step-name {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}

.helper-step.active {
  background: #666666;
}

.helper-step.active .helper-step-number {
  background: #ffffff;
  color: #666666;
}

.helper-step.active .helper-step-name {
  color: #ffffff;
}

.helper-step.completed {
  background: #999999;
}

.helper-step.completed .helper-step-number {
  background: #ffffff;
  color: #999999;
}

.helper-step.completed .helper-step-name {
  color: #ffffff;
}

/* Contract Info Compact - In Helper Overlay */
.contract-info-compact {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 2px solid #e0e0e0;
}

.contract-header {
  font-size: 11px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}

.contract-detail {
  font-size: 10px;
  color: #666666;
  line-height: 1.8;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contract-detail strong {
  color: #000000;
  font-weight: 600;
  margin-right: 8px;
}

/* Player Hands */
.hands-container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
  margin: 0;
  background: transparent;
  padding: 0;
  border: none;
  overflow: visible;
}

@media (min-width: 1200px) {
  .hands-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

.player-hand {
  background: transparent;
  padding: 16px;
  border: none;
  position: relative;
  transition: all 0.2s;
}

.player-hand.compact {
  padding: 12px;
}

.player-hand.compact .cards-container {
  display: none;
}

.player-hand.current-player {
  border: none;
  background: transparent;
  grid-column: 1 / -1;
  order: -1;
  padding: 20px;
  position: relative;
}

.player-hand.current-player::before {
  display: none;
}

.player-label {
  font-weight: 500;
  margin-bottom: 12px;
  color: #333333;
  font-size: 15px;
  text-align: left;
  padding: 10px 12px;
  background: #f9f9f9;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.player-label:hover {
  background: #f9f9f9;
}

.player-label .expand-toggle {
  font-size: 11px;
  color: #333333;
  font-weight: 400;
  padding: 4px 8px;
  border: none;
  background: #f5f5f5;
  transition: all 0.2s;
}

.player-label .expand-toggle:hover {
  background: #666666;
  color: #ffffff;
}

.player-hand.current-player .player-label .expand-toggle {
  display: none;
}

.play-instruction {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f9f9f9;
  border-left: 3px solid #666666;
  font-size: 12px;
  font-weight: 500;
  color: #333333;
  text-align: left;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  min-height: 200px;
  justify-content: center;
  padding: 20px;
  align-content: flex-start;
}

/* Cards - Realistic Playing Card Style */
.card {
  width: 180px;
  height: 260px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.card::before {
  display: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #999999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card.playable {
  border: 2px solid #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.3);
  position: relative;
}

.card.playable::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
  animation: neonPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes neonPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8), 0 0 30px rgba(0, 255, 0, 0.4);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 20px rgba(0, 255, 0, 1), 0 0 40px rgba(0, 255, 0, 0.6);
  }
}

.card.playable:hover {
  transform: translateY(-6px);
  border-color: #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.8), 0 0 30px rgba(0, 255, 0, 0.5);
}

.card-corner-label {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 2px;
  z-index: 10;
  line-height: 1.2;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  height: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0;
  position: relative;
  background: #ffffff;
}

/* Card corners - top and bottom */
.card-corner-top,
.card-corner-bottom {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  z-index: 10;
}

.card-corner-top {
  top: 8px;
  left: 10px;
}

.card-corner-bottom {
  bottom: 8px;
  right: 10px;
  transform: rotate(180deg);
}

.card-corner-rank {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Arial', 'Helvetica', sans-serif;
  letter-spacing: -0.5px;
}

.card-corner-suit {
  font-size: 20px;
  line-height: 1;
  margin-top: -2px;
}

/* Center content */
.card-center-icon {
  font-size: 80px;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.card-center-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Center icon - large suit symbol */
.card-center-icon {
  font-size: 120px;
  line-height: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  font-weight: normal;
}

/* Card Background Colors - removed, using images only */
.card.spades::before,
.card.hearts::before,
.card.diamonds::before,
.card.clubs::before,
.card.trump::before,
.card.trump.rank-1::before,
.card.trump.rank-21::before,
.card.excuse::before {
  display: none;
}

/* Special card indicators - removed */
.card.oudler::after {
  display: none;
}

/* Dog Cards */
.dog-cards {
  display: flex;
  gap: 30px;
  flex-wrap: nowrap;
  margin: 30px 0;
  justify-content: flex-start;
  overflow-x: auto;
  width: 100%;
  padding: 20px 0;
}

/* Dog Discard Instruction - Tips & Hints Style */
.dog-instruction-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 40px;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-left: 4px solid #666666;
  margin: 20px auto;
  max-width: 800px;
  text-align: center;
}

.dog-instruction-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.dog-instruction-content {
  flex: 1;
  text-align: center;
}

.dog-instruction-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 16px;
  text-align: center;
}

.dog-instruction {
  font-size: 18px;
  color: #333333;
  margin: 12px 0;
  line-height: 1.6;
  text-align: center;
}

.dog-instruction strong {
  color: #000000;
  font-weight: 700;
}

.dog-instruction-hint {
  font-size: 16px;
  color: #666666;
  margin: 12px 0;
  line-height: 1.6;
  text-align: center;
  font-style: italic;
}

.dog-instruction-hint strong {
  color: #333333;
  font-weight: 600;
  font-style: normal;
}

/* Old dog-instruction (keeping for backwards compatibility if needed) */
.dog-instruction-old {
  margin: 12px 0;
  padding: 12px;
  background: #f5f5f5;
  border: none;
  color: #333333;
  font-size: 14px;
}

/* Scoring Results */
.scoring-results {
  background: #fafafa;
  padding: 15px 20px;
  margin: 20px 0 20px 40px;
  border: 2px solid #e0e0e0;
  text-align: left;
  position: relative;
}

.scoring-results h2 {
  color: #333333;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
}

.scoring-results p {
  margin: 12px 0;
  color: #333333;
  font-size: 16px;
}

.scoring-details {
  background: transparent;
  padding: 0;
  margin: 0 0 20px 0;
  border: none;
}

.final-scores {
  background: transparent;
  padding: 0;
  margin: 20px 0;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.final-scores h3 {
  margin: 0 0 12px 0;
  color: #333333;
  font-size: 16px;
  font-weight: 700;
}

/* Generic Modal Overlay - Used by all modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  z-index: 1;
}

.modal-content {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-radius: 0;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stats-modal-content,
.history-modal-content,
.tutorial-modal-content {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 0;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Tutorial Overlay - Uses modal-overlay pattern */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.tutorial-overlay.hidden {
  display: none;
}

.tutorial-content,
.tutorial-modal-content {
  background: #ffffff;
  border-radius: 0;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-tutorial {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: #666666;
  color: #ffffff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.close-tutorial:hover {
  background: #555555;
}

.close-lore {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: #666666;
  color: #ffffff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.close-lure:hover {
  background: #555555;
}

.lore-intro {
  font-size: 14px;
  color: #666666;
  margin-bottom: 30px;
  font-style: italic;
}

/* The Lore Page */
.lore-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%; /* Match main-container width */
  height: 100vh;
  padding: 40px;
  padding-right: calc(15% + 40px); /* Account for sidebar */
  overflow-y: auto;
  background: #ffffff;
  z-index: 50;
  display: block;
}

.lore-page.hidden {
  display: none;
}

.lore-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.lore-header {
  text-align: center;
  margin-bottom: 60px;
}

.lore-header h2 {
  font-size: 3em;
  font-weight: 700;
  color: #333333;
  margin: 20px auto 4px auto;
  letter-spacing: 2px;
  width: 100%;
  text-align: center;
}

.lore-intro {
  font-size: 0.9em;
  font-weight: 400;
  color: #666666;
  margin: 0 auto 20px auto;
  letter-spacing: 0.5px;
  text-align: center;
  font-style: italic;
  line-height: 1.2;
}

.card-entry-large {
  display: flex;
  gap: 40px;
  margin-bottom: 100px;
  padding-bottom: 0;
  border-bottom: none;
  align-items: flex-start;
}

.card-entry-large:last-child {
  border-bottom: none;
}

.card-image-container {
  flex-shrink: 0;
  width: 400px;
  height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px; /* 3D perspective */
}

.lore-card-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  cursor: pointer;
}

.card-image-container:hover .lore-card-3d {
  transform: rotateY(180deg);
}

.lore-card-front,
.lore-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  overflow: visible;
  padding: 0;
}

.lore-card-back {
  transform: rotateY(180deg);
}

.lore-card-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-image-container:hover .lore-card-image {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 6px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* Borders on card images based on rarity/type - moved from container */
.empress-entry .lore-card-image {
  border: 3px solid #FFD700;
}

.emperor-entry .lore-card-image {
  border: 3px solid #8B0000;
}

.excuse-entry .lore-card-image {
  border: 3px solid #9370DB;
}

.priestess-entry .lore-card-image {
  border: 3px solid #4B0082;
}

.hierophant-entry .lore-card-image {
  border: 3px solid #8B4513;
}

.pagat-entry .lore-card-image {
  border: 3px solid #4682B4;
}

.lovers-entry .lore-card-image {
  border: 3px solid #FFD700;
}

.card-info-container {
  flex: 1;
  padding-top: 20px;
  position: relative;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.card-header-row h3 {
  margin: 0;
  flex: 1;
}

.card-badge-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  letter-spacing: 0.5px;
}

.view-toggle-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gameplay-tagline-inline {
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: #666666;
  margin: 0;
  flex: 1;
}

.card-history {
  font-style: italic;
  color: #555555;
  line-height: 1.6;
  margin: 16px 0;
  padding: 12px;
  background: #f9f9f9;
  border-left: 3px solid #666666;
  cursor: help;
  position: relative;
}

.name-explanation {
  font-size: 14px;
  color: #555555;
  margin: 12px 0;
  line-height: 1.6;
  padding: 10px;
  background: #f9f9f9;
  border-left: 3px solid #9370DB;
}

.ruler-status-header {
  margin: 20px 0;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid;
}

.excuse-header {
  background: #f5f0ff;
  border-color: #9370DB;
}

.priestess-header {
  background: #f0e6ff;
  border-color: #4B0082;
}

.empress-header {
  background: #fffef0;
  border-color: #FFD700;
}

.emperor-header {
  background: #fff5f5;
  border-color: #8B0000;
}

.hierophant-header {
  background: #f5ede0;
  border-color: #8B4513;
}

.pagat-header {
  background: #f0f8ff;
  border-color: #4682B4;
}

.ruler-title {
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 10px 0;
  text-align: center;
  letter-spacing: 1px;
}

.ruler-icon {
  font-size: 24px;
  margin: 0 8px;
}

.escape-icon-inline {
  color: #9370DB;
  font-size: 24px;
  margin: 0 8px;
}

.priestess-header .ruler-icon {
  color: #4B0082;
}

.empress-header .ruler-icon {
  color: #FFD700;
}

.emperor-header .ruler-icon {
  color: #8B0000;
}

.hierophant-header .ruler-icon {
  color: #8B4513;
}

.rarity-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.rarity-badge.legendary {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000000;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rarity-badge.throne {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.4);
}

.rarity-badge.special {
  background: linear-gradient(135deg, #4682B4 0%, #5F9EA0 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(70, 130, 180, 0.4);
}

.rarity-badge.mid {
  background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
  color: #333333;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rarity-badge.high-mid {
  background: linear-gradient(135deg, #9370DB 0%, #7B68EE 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(147, 112, 219, 0.4);
}

.rarity-badge.high {
  background: linear-gradient(135deg, #FF8C00 0%, #FF6347 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
}

.gameplay-tagline-main {
  font-size: 16px;
  text-align: center;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.5px;
  margin: 8px 0 0 0;
}

.excuse-header .gameplay-tagline-main {
  color: #9370DB;
}

.priestess-header .gameplay-tagline-main {
  color: #4B0082;
}

.empress-header .gameplay-tagline-main {
  color: #B8860B;
}

.emperor-header .gameplay-tagline-main {
  color: #8B0000;
}

.hierophant-header .gameplay-tagline-main {
  color: #8B4513;
}

.pagat-header .gameplay-tagline-main {
  color: #4682B4;
}

.pagat-header .ruler-icon {
  color: #4682B4;
}

.lovers-header {
  background: #fffef0;
  border-color: #FFD700;
}

.lovers-header .gameplay-tagline-main {
  color: #B8860B;
}

.lovers-header .ruler-icon {
  color: #FFD700;
}

.gameplay-ability {
  margin: 20px 0;
  padding: 15px;
  background: #f5f0ff;
  border: 2px solid #9370DB;
  border-radius: 8px;
  cursor: help;
  transition: background 0.2s;
}

.gameplay-ability:hover {
  background: #ede5ff;
}

.escape-icon {
  font-size: 32px;
  text-align: center;
  margin-bottom: 10px;
  color: #9370DB;
  font-weight: bold;
}

.escape-meaning {
  font-size: 14px;
  color: #333333;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
}

.gameplay-tip {
  font-size: 13px;
  color: #555555;
  text-align: center;
  margin: 12px 0;
  padding: 8px;
  background: #ffffff;
  border-radius: 4px;
  font-style: italic;
}

.flavor-micro-hook {
  font-size: 12px;
  color: #666666;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  font-style: italic;
  border-top: 1px solid #e0e0e0;
  padding-top: 12px;
}

.rarity-explanation {
  margin: 15px 0;
  padding: 12px;
  background: #fff9e6;
  border-left: 3px solid #FFD700;
  border-radius: 4px;
}

.rarity-explanation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #555555;
}

.achievement-section {
  margin: 20px 0;
  padding: 15px;
  background: #f0f0f0;
  border: 2px dashed #9370DB;
  border-radius: 8px;
}

.achievement-title {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 12px 0;
}

.achievement-trigger,
.achievement-reward {
  font-size: 13px;
  color: #555555;
  margin: 8px 0;
  line-height: 1.6;
}

.achievement-trigger strong,
.achievement-reward strong {
  color: #333333;
}

/* World-Building Styles for The Empress */
.empress-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

/* World-Building Styles for The Emperor */
.emperor-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

/* World-Building Styles for The Excuse */
.excuse-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

/* World-Building Styles for The Priestess */
.priestess-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

/* World-Building Styles for The Hierophant */
.hierophant-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

.pagat-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

.lovers-entry {
  /* Border moved to card image */
  background: transparent;
  padding: 0;
  margin-bottom: 100px;
}

/* Four Rulers Page */
.four-rulers-page {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.four-rulers-header {
  text-align: center;
  margin-bottom: 60px;
}

.four-rulers-header h2 {
  font-size: 3em;
  font-weight: 700;
  color: #333333;
  margin: 20px auto 10px auto;
  letter-spacing: 2px;
}

.four-rulers-intro {
  font-size: 1.1em;
  color: #666666;
  font-style: italic;
  margin: 0;
}

.rulers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.ruler-card {
  padding: 30px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ruler-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.ruler-card h3 {
  font-size: 1.8em;
  font-weight: 700;
  color: #333333;
  margin: 0 0 15px 0;
  letter-spacing: 1px;
}

.ruler-keywords {
  font-size: 0.9em;
  color: #666666;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.ruler-description {
  font-size: 1.1em;
  color: #333333;
  font-weight: 600;
  margin: 15px 0;
  font-style: italic;
}

.ruler-power {
  font-size: 0.95em;
  color: #555555;
  margin: 15px 0 0 0;
  font-style: italic;
}

.empress-card {
  border-color: #FFD700;
  background: linear-gradient(to bottom, #fffef0 0%, #ffffff 100%);
}

.emperor-card {
  border-color: #8B0000;
  background: linear-gradient(to bottom, #fff5f5 0%, #ffffff 100%);
}

.priestess-card {
  border-color: #4B0082;
  background: linear-gradient(to bottom, #f0e6ff 0%, #ffffff 100%);
}

.hierophant-card {
  border-color: #8B4513;
  background: linear-gradient(to bottom, #f5ede0 0%, #ffffff 100%);
}

.view-toggle {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  padding-bottom: 0;
  border-bottom: none;
}

.view-toggle-btn {
  padding: 8px 20px;
  background: #f5f5f5;
  border: 2px solid #cccccc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  transition: all 0.3s ease;
}

.view-toggle-btn:hover {
  background: #e8e8e8;
  border-color: #999999;
}

.view-toggle-btn.active {
  background: #FFD700;
  border: 2px solid #FFD700;
  color: #000000;
}

.cosmic-view {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 3px solid #FFD700;
}

.cosmic-view.hidden,
.cosmic-layer-content.hidden {
  display: none;
}

.historical-view.hidden {
  display: none;
}

.cosmic-layer-content {
  margin: 20px 0;
  padding: 20px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.cosmic-section {
  margin-bottom: 24px;
}

.cosmic-section:last-child {
  margin-bottom: 0;
}

.cosmic-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.cosmic-role-text {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
  font-style: italic;
  margin: 0;
}

.sacred-symbol-text {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  margin: 0;
  padding: 12px;
  background: #ffffff;
  border-left: 4px solid #9370DB;
  border-radius: 4px;
}

.secret-connection-text {
  font-size: 14px;
  line-height: 1.6;
  color: #666666;
  margin: 0;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-style: italic;
}

.world-building-section {
  margin: 25px 0;
  padding: 16px;
  background: #fafafa;
  border-left: 3px solid #FFD700;
}

.concept-one-liner {
  font-size: 1.2em;
  text-align: center;
  padding: 20px;
  background: #ffffff;
  border: 2px solid #FFD700;
  border-radius: 4px;
  margin: 15px 0;
  font-weight: 600;
}

.lands-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 15px;
}

.land-item {
  padding: 12px;
  background: #ffffff;
  border-left: 3px solid #cccccc;
  line-height: 1.6;
}

.map-ascii {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  background: #ffffff;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin: 15px 0;
  overflow-x: auto;
}

.map-notes {
  margin-top: 15px;
  padding: 12px;
  background: #ffffff;
  border-left: 3px solid #666666;
}

.character-profile {
  margin-top: 30px;
}

.profile-item {
  margin: 20px 0;
  padding: 15px;
  background: #ffffff;
  border-left: 4px solid #FFD700;
}

.profile-label {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-item p {
  margin: 0;
  line-height: 1.7;
  color: #555555;
  font-size: 15px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.throne-badge {
  display: inline-block;
  padding: 8px 16px;
  background: #FFD700;
  color: #000000;
  font-weight: 700;
  font-size: 16px;
  margin: 10px 0;
  border-radius: 4px;
}

.throne-domain, .throne-dynamics {
  margin: 10px 0;
  line-height: 1.6;
}

.throne-relationships {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.throne-relationships .allies,
.throne-relationships .enemies {
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.throne-relationships ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.throne-relationships li {
  margin: 5px 0;
  line-height: 1.5;
}

.myth-text {
  font-style: italic;
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
  padding: 15px;
  background: #ffffff;
  border-left: 3px solid #FFD700;
}

.iconography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.icon-item {
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  line-height: 1.6;
}

.icon-item.hidden-symbol {
  background: #fff9e6;
  border-color: #FFD700;
  font-style: italic;
}

.secret-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444444;
  padding: 15px;
  background: #fff9e6;
  border: 2px dashed #FFD700;
  font-style: italic;
}

.voice-line {
  margin: 12px 0;
  padding: 12px;
  background: #ffffff;
  border-left: 3px solid #FFD700;
  font-style: italic;
}

.why-two-names-section {
  margin-top: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-left: 4px solid #9370DB;
}

.why-two-names-section p {
  margin: 12px 0;
  line-height: 1.7;
  color: #333333;
}

.expansion-subsection {
  margin: 20px 0;
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.expansion-subsection h5 {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 10px;
}

.expansion-subsection ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.expansion-subsection li {
  margin: 8px 0;
  line-height: 1.6;
}

.stakes-text {
  color: #cc0000;
  font-weight: 600;
  margin-top: 10px;
}

.rumor-text {
  font-style: italic;
  color: #666666;
  padding: 10px;
  background: #f5f5f5;
  border-left: 3px solid #999999;
}

.quest-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.quest-list li {
  margin: 15px 0;
  padding: 15px;
  background: #ffffff;
  border-left: 4px solid #FFD700;
  line-height: 1.6;
}

.opponents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.opponent-quote {
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #666666;
  font-style: italic;
  line-height: 1.6;
}

.economic-truth {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 15px 0;
  padding: 12px;
  background: #fff9e6;
  border-left: 4px solid #FFD700;
}

.lore-hint {
  font-size: 13px;
  color: #666666;
  font-style: italic;
  margin-top: 10px;
}

.one-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.one-line-grid > div {
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  text-align: center;
  line-height: 1.6;
}

.mini-map {
  margin: 20px 0;
  padding: 20px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  text-align: center;
  overflow-x: auto;
}

.map-ascii {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #333333;
  margin: 0;
  white-space: pre;
  text-align: left;
  display: inline-block;
}

.map-notes {
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-left: 3px solid #FFD700;
}

.map-notes ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.map-notes li {
  margin: 8px 0;
  line-height: 1.6;
}

.history-hover-image {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  display: none;
  background: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 300px;
}

.history-hover-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.historical-versions {
  margin: 20px 0;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 4px;
}

.versions-label {
  margin-bottom: 12px;
  font-weight: 600;
  color: #333333;
}

.version-option {
  margin: 8px 0;
  display: flex;
  align-items: center;
}

.version-option input[type="radio"] {
  margin-right: 10px;
  cursor: pointer;
}

.version-option label {
  cursor: pointer;
  font-size: 14px;
  color: #333333;
  line-height: 1.4;
}

.version-option label:hover {
  color: #000000;
}

.card-info-container h3 {
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.card-details {
  margin-left: 0;
}

.card-details p {
  margin: 12px 0;
  font-size: 16px;
  color: #333333;
  line-height: 1.8;
}

.card-details strong {
  color: #000000;
  font-weight: 600;
  display: inline-block;
  min-width: 160px;
}

.card-description {
  font-style: italic;
  color: #555555;
  font-size: 18px;
  margin: 16px 0 20px 0;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  line-height: 1.6;
}

.tutorial-content h2 {
  color: #333333;
  margin-bottom: 30px;
  font-size: 2em;
  font-weight: 700;
  text-align: center;
  border-bottom: none;
  padding-bottom: 16px;
}

.tutorial-section {
  margin-bottom: 24px;
  padding: 24px;
  background: #f5f5f5;
  border: none;
}

.tutorial-section h3 {
  color: #333333;
  margin-bottom: 14px;
  font-size: 1.4em;
  font-weight: 700;
}

.tutorial-section p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #333333;
}

.tutorial-section ul,
.tutorial-section ol {
  margin-left: 24px;
  margin-top: 12px;
}

.tutorial-section li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #333333;
}

.tutorial-section strong {
  color: #333333;
  font-weight: 700;
}

/* Welcome Message */
.welcome-message {
  text-align: center;
  padding: 40px;
}

.welcome-message h2 {
  color: #333333;
  margin-bottom: 20px;
  font-size: 2em;
  font-weight: 700;
}

.welcome-message p {
  margin-bottom: 30px;
  color: #333333;
  font-size: 18px;
  line-height: 1.6;
}

.tutorial-btn {
  margin-left: 10px;
  padding: 12px 24px;
  font-size: 16px;
  background: #666666;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}

.tutorial-btn:hover {
  background: #555555;
}

/* Player Selection */
.player-selection {
  text-align: center;
  padding: 50px;
}

.player-selection h2 {
  color: #333333;
  margin-bottom: 20px;
  font-size: 2em;
}

.player-names-selection {
  text-align: center;
  padding: 50px;
  max-width: 600px;
  margin: 0 auto;
}

.player-names-selection h2 {
  color: #333333;
  margin-bottom: 20px;
  font-size: 2em;
}

.player-names-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 30px 0;
  text-align: left;
}

.player-name-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-name-input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  text-align: left;
}

.player-name-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  background: #ffffff;
  color: #333333;
  border-radius: 0;
  font-family: inherit;
  transition: border-color 0.2s;
}

.player-name-input:focus {
  outline: none;
  border-color: #666666;
}

.start-game-btn {
  margin-top: 20px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  background: #333333;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.start-game-btn:hover {
  background: #000000;
}

.start-game-btn:active {
  background: #666666;
  font-weight: 700;
}

.player-selection p {
  margin-bottom: 40px;
  color: #333333;
  font-size: 18px;
}

.player-options {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.player-count-btn {
  flex: 1;
  min-width: 200px;
  padding: 40px 24px;
  background: #666666;
  border: 2px solid #666666;
  cursor: pointer;
  transition: all 0.2s;
}

.player-count-btn:hover {
  background: #555555;
  border-color: #555555;
}

.player-count-number {
  font-size: 56px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.player-count-label {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.player-count-info {
  font-size: 14px;
  color: #ffffff;
  font-style: italic;
  opacity: 0.9;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: calc(15% + 20px);
  padding: 12px 20px;
  border-radius: 0;
  box-shadow: none;
  font-weight: 400;
  font-size: 14px;
  z-index: 9999;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 500px;
  border: 2px solid #e0e0e0;
  border-left: 4px solid #666666;
  background: #f9f9f9;
  color: #333333;
}

/* Trick Result Notification - Fixed below logo and headline */
.trick-result-notification {
  position: fixed;
  top: 100px;
  right: calc(15% + 20px);
  transform: translateY(-20px);
  opacity: 0;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 350px;
  max-height: 50vh;
  overflow-y: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  pointer-events: auto;
  display: none;
}

.trick-result-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.trick-result-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
}

.trick-result-close:hover {
  color: #333333;
  background: #f5f5f5;
  border-radius: 4px;
}

.trick-result-header {
  font-size: 13px;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
  padding-right: 30px; /* Space for close button */
}

.trick-result-winner {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  text-align: center;
  margin-bottom: 10px;
  padding: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.trick-result-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #666666;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  position: relative;
  transition: all 0.2s;
}

.trick-result-info-icon:hover {
  background: #333333;
}

.trick-result-tooltip {
  position: fixed;
  background: #333333;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  white-space: normal;
  text-align: center;
}

.trick-result-cards {
  font-size: 11px;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 8px;
  text-align: left;
  padding: 0 8px;
}

.trick-result-points {
  font-size: 12px;
  font-weight: 600;
  color: #333333;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
  margin-bottom: 8px;
}

/* Trick History */
.trick-history-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

.trick-history-title {
  font-size: 10px;
  font-weight: 700;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.trick-history-item {
  font-size: 10px;
  color: #666666;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 6px;
  align-items: center;
}

.trick-history-item:last-child {
  border-bottom: none;
}

.trick-history-number {
  font-weight: 600;
  color: #333333;
  min-width: 55px;
}

.trick-history-winner {
  flex: 1;
  color: #333333;
}

.trick-history-points {
  color: #999999;
  font-size: 9px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-error {
  background: #f5f5f5;
  color: #333333;
}

.toast-info {
  background: #f5f5f5;
  color: #333333;
}

.toast-success {
  background: #f5f5f5;
  color: #333333;
}

/* Game Progress Indicator - Removed (moved to helper overlay in top right) */

.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 0;
  font-size: 16px;
  font-weight: 400;
  color: #666666;
  background: #f5f5f5;
  transition: all 0.2s;
  border: none;
  min-width: 120px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #cccccc;
  color: #333333;
  font-weight: 700;
  font-size: 18px;
  border-radius: 0;
  flex-shrink: 0;
}

.step-name {
  font-size: 16px;
  font-weight: 400;
}

.progress-step.active {
  background: #666666;
  color: #ffffff;
}

.progress-step.active .step-number {
  background: #ffffff;
  color: #666666;
}

.progress-step.completed {
  background: #999999;
  color: #ffffff;
}

.progress-step.completed .step-number {
  background: #ffffff;
  color: #999999;
}

.scoring-results button {
  margin-top: 20px;
  padding: 12px 32px;
  font-size: 16px;
  background: #666666;
  color: #ffffff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}

.scoring-results button:hover {
  background: #555555;
}

/* Card Modal - Full Screen View */
.card-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
}

.card-modal.hidden {
  display: none;
}

.card-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.card-modal-content {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.card-modal-content img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.card-modal-content .card-fallback {
  width: auto;
  height: auto;
  padding: 60px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #cccccc;
  transform: scale(2.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .card {
    width: 160px;
    height: 230px;
  }
}

/* Lore Quote Popup - Positioned below hints or after history container */
.lore-quote-popup {
  z-index: 99999 !important;
  pointer-events: none;
  animation: loreQuoteFadeIn 0.3s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: fixed !important;
}

.lore-quote-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333333;
  font-size: 13px;
  line-height: 1.4;
  max-width: 300px;
}

.lore-quote-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #000000;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.lore-quote-icon {
  font-size: 14px;
  opacity: 0.8;
}

.lore-quote-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000000;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.lore-quote-text {
  font-size: 13px;
  font-style: italic;
  color: #222222;
  padding-left: 20px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes loreQuoteFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Audio control buttons in sidebar */
.audio-control-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.audio-control-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.audio-control-btn.active {
  opacity: 1;
}

/* Music Player - Fixed bottom left */
.music-player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.music-toggle-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.music-toggle-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.music-toggle-btn.active {
  opacity: 1;
}

.music-controls {
  display: none;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.music-player:hover .music-controls {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}

.music-nav-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.2s ease;
  color: #333;
  opacity: 0.7;
}

.music-nav-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  padding: 2px 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #333;
  opacity: 0.7;
}

.volume-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.volume-slider {
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #000;
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  background: #000;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .card {
    width: 140px;
    height: 200px;
  }
  
  .bid-options {
    flex-direction: column;
  }
  
  .bid-btn {
    width: 100%;
  }
  
  header h1 {
    font-size: 2em;
    top: 15px;
    left: 15px;
  }
  
  .top-info-bar {
    grid-template-columns: 1fr;
  }
}
