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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: #076324;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 80%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  min-height: 100vh;
  color: #f5f5dc;
  overflow-x: hidden;
}

/* Casino-themed buttons */
.casino-button {
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  border: 2px solid #f5d76e;
  color: #1a1a1a;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 900;
  border-radius: 50px; /* More like a chip */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 4px double #f5d76e;
}

.casino-button:hover {
  background: linear-gradient(135deg, #f5d76e 0%, #d4af37 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

.casino-button:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.casino-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(1);
}

/* Input fields */
.casino-input {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #d4af37;
  color: #f5f5dc;
  padding: 14px 20px;
  font-size: 18px;
  border-radius: 30px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.casino-input:focus {
  outline: none;
  border-color: #f5d76e;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), inset 0 2px 5px rgba(0,0,0,0.5);
}

.casino-input::placeholder {
  color: rgba(245, 245, 220, 0.4);
}

/* Table Markings */
.table-marking {
  border: 2px solid rgba(245, 215, 110, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.table-marking::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid rgba(245, 215, 110, 0.2);
  border-radius: 16px;
  pointer-events: none;
}

/* Container styles */
.casino-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.casino-card {
  background: rgba(10, 77, 38, 0.8);
  border: 3px double #d4af37;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

/* PIN display */
.pin-display {
  font-size: 48px;
  font-weight: bold;
  color: #d4af37;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 8px;
  text-align: center;
  margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .casino-container {
    padding: 10px;
  }
  
  .pin-display {
    font-size: 36px;
    letter-spacing: 4px;
  }
}

/* Added styles for Home view */
.home {
  min-height: 100vh;
  padding: 40px 20px;
}

.welcome-section {
  text-align: center;
  margin-bottom: 50px;
  transition: margin 0.3s ease;
}

.welcome-section.compact {
  margin-bottom: 20px;
}

.main-title {
  font-size: 84px;
  color: #d4af37;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 5px;
  font-weight: 900;
  font-family: 'Georgia', serif;
  font-variant: small-caps;
  letter-spacing: 4px;
}

.subtitle {
  font-size: 18px;
  color: #f5d76e;
  letter-spacing: 12px;
  font-weight: bold;
  opacity: 0.8;
  margin-top: -10px;
}

.action-cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.action-card {
  flex: 0 1 350px;
  text-align: center;
  padding: 40px;
}

.action-card h2 {
  color: #d4af37;
  font-size: 32px;
  margin-bottom: 10px;
  font-family: 'Georgia', serif;
}

.action-card p {
  color: #f5f5dc;
  margin-bottom: 30px;
  font-size: 16px;
  font-style: italic;
  opacity: 0.8;
}

.back-link {
  text-align: center;
  margin-bottom: 10px;
}

.text-link {
  background: none;
  border: none;
  color: #d4af37;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 2px;
  font-family: 'Georgia', serif;
  font-size: 24px;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.text-link:hover {
  color: #f5d76e;
  text-decoration: underline;
  transform: scale(1.05);
}

.session-creator, .pin-entry {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.casino-title {
  font-size: 32px;
  color: #d4af37;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Georgia', serif;
  letter-spacing: 2px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  color: #f5d76e;
  font-weight: 900;
  letter-spacing: 1px;
}

.pin-input {
  text-align: center;
  font-size: 42px;
  letter-spacing: 12px;
  font-weight: 900;
  color: #d4af37 !important;
  font-family: 'Courier New', monospace;
}

.error-message {
  color: #ff6b6b;
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .main-title {
    font-size: 42px;
  }
  
  .subtitle {
    font-size: 18px;
  }
  
  .action-cards {
    flex-direction: column;
    align-items: center;
  }
}

/* Playing Card Styles */
.playing-card {
  width: 100px;
  height: 140px;
  perspective: 1000px;
  cursor: pointer;
  margin: 10px;
  transition: transform 0.3s ease;
}

.playing-card:hover:not(.disabled) {
  transform: translateY(-10px) scale(1.05);
}

.playing-card.selected {
  transform: translateY(-15px) scale(1.1);
  z-index: 10;
}

.playing-card.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

.playing-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.playing-card.revealed .card-inner {
  animation: reveal 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes reveal {
  from {
    transform: rotateY(180deg);
  }
  to {
    transform: rotateY(0deg);
  }
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.card-front {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  display: flex;
  flex-direction: column;
  padding: 8px;
  color: #1a1a1a; /* Default black */
}

.card-front.red {
  color: #d40000 !important;
}

.card-front.black {
  color: #1a1a1a !important;
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.card-corner.top-left {
  align-self: flex-start;
}

.card-corner.bottom-right {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card-value {
  font-size: 20px;
  font-weight: 900;
}

.card-suit {
  font-size: 16px;
}

.card-center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-suit-large {
  font-size: 48px;
}

.card-back {
  background: #b80f0a; /* Classic red card back */
  transform: rotateY(180deg);
  padding: 6px;
  border: 4px solid white;
}

.card-back-pattern {
  width: 100%;
  height: 100%;
  background-color: #b80f0a;
  background-image: 
    radial-gradient(circle at 100% 150%, #b80f0a 24%, #9a0d08 25%, #9a0d08 28%, #b80f0a 29%, #b80f0a 36%, #9a0d08 36%, #9a0d08 40%, transparent 40%, transparent),
    radial-gradient(circle at 0    150%, #b80f0a 24%, #9a0d08 25%, #9a0d08 28%, #b80f0a 29%, #b80f0a 36%, #9a0d08 36%, #9a0d08 40%, transparent 40%, transparent),
    radial-gradient(circle at 50%  100%, #9a0d08 10%, #b80f0a 11%, #b80f0a 23%, #9a0d08 24%, #9a0d08 30%, #b80f0a 31%, #b80f0a 43%, #9a0d08 44%, #9a0d08 50%, #b80f0a 51%, #b80f0a 63%, #9a0d08 64%, #9a0d08 71%, transparent 71%, transparent),
    radial-gradient(circle at 100% 50%, #9a0d08 5%, #b80f0a 6%, #b80f0a 15%, #9a0d08 16%, #9a0d08 20%, #b80f0a 21%, #b80f0a 30%, #9a0d08 31%, #9a0d08 35%, #b80f0a 36%, #b80f0a 45%, #9a0d08 46%, #9a0d08 49%, transparent 49%, transparent),
    radial-gradient(circle at 0    50%, #9a0d08 5%, #b80f0a 6%, #b80f0a 15%, #9a0d08 16%, #9a0d08 20%, #b80f0a 21%, #b80f0a 30%, #9a0d08 31%, #9a0d08 35%, #b80f0a 36%, #b80f0a 45%, #9a0d08 46%, #9a0d08 49%, transparent 49%, transparent);
  background-size: 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

.pattern-logo {
  background: white;
  color: #b80f0a;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  font-family: serif;
  border: 2px solid #9a0d08;
}

.playing-card.selected .card-front {
  border: 3px solid #d4af37;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

@media (max-width: 768px) {
  .playing-card {
    width: 70px;
    height: 100px;
    margin: 4px;
  }
  
  .card-value {
    font-size: 14px;
  }
  
  .card-suit {
    font-size: 12px;
  }
  
  .card-suit-large {
    font-size: 24px;
  }
}

/* Voting Room Styles */
.voting-room {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.session-header {
  text-align: center;
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.3);
}

.session-name {
  color: #d4af37;
  font-size: 48px;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-family: 'Georgia', serif;
  font-variant: small-caps;
}

.session-pin {
  color: #f5d76e;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 6px;
}

.participants-section {
  margin-bottom: 40px;
}

.section-title {
  color: #f5d76e;
  margin-bottom: 20px;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  font-family: 'Georgia', serif;
}

.participants-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.participant-item {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #d4af37;
  border-radius: 40px;
  padding: 8px 20px 8px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  min-width: 150px;
}

.participant-item.has-voted {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.chip-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  border: 2px dashed #f5d76e;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #1a1a1a;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.participant-name {
  color: #f5f5dc;
  font-weight: bold;
  font-size: 16px;
}

.vote-indicator {
  color: #4caf50;
  font-size: 12px;
  font-weight: 900;
  margin-left: auto;
  letter-spacing: 1px;
}

.voting-section {
  margin-bottom: 40px;
  background: rgba(0, 0, 0, 0.2);
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.selected-card-info {
  text-align: center;
  color: #f5d76e;
  font-size: 20px;
  margin-top: 30px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.host-controls {
  text-align: center;
  margin-top: 30px;
}

.reveal-button {
  font-size: 20px;
  padding: 15px 30px;
}

.end-session-button {
  background: linear-gradient(135deg, #b80f0a 0%, #8b0000 100%);
  border-color: #ff6b6b;
  margin-left: 15px;
}

.end-session-button:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, #b80f0a 100%);
}

/* Results Display Styles */
.results-display {
  margin-top: 30px;
}

.results-title {
  color: #d4af37;
  text-align: center;
  margin-bottom: 40px;
  font-size: 42px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: 'Georgia', serif;
  font-variant: small-caps;
  letter-spacing: 4px;
}

.votes-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.vote-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.5s ease-out both;
}

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

.statistics {
  display: flex;
  justify-content: space-around;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  border: 2px solid #d4af37;
  margin-top: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  color: #f5f5dc;
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 2px;
  font-weight: bold;
  opacity: 0.8;
}

.stat-value {
  color: #d4af37;
  font-size: 32px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.results-actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* Modal Styles */
.casino-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.casino-modal-content {
  max-width: 500px;
  width: 90%;
  animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Toast/Feedback */
.copy-feedback {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 2000;
  animation: toastFade 2s ease-in-out forwards;
}

@keyframes toastFade {
  0% { transform: translate(-50%, 20px); opacity: 0; }
  15% { transform: translate(-50%, 0); opacity: 1; }
  85% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -20px); opacity: 0; }
}
