/* Enhanced Text Quality and Readability */

/* Base Typography Improvements */
* {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-ligatures: common-ligatures;
}

/* High-Quality Font Rendering */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
}

/* Enhanced Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Casino-Specific Text Enhancements */
.casino-title {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 0 30px rgba(255, 215, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
  100% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

/* Slot Machine Text */
.slot-machine-text {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd700;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Win Amount Text */
.win-amount {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 2.5rem;
  color: #4caf50;
  text-shadow: 
    0 0 20px rgba(76, 175, 80, 0.8),
    0 0 40px rgba(76, 175, 80, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
  animation: winPulse 1s ease-in-out infinite;
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Jackpot Text */
.jackpot-text {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: jackpotRainbow 3s linear infinite;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

@keyframes jackpotRainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Button Text Enhancement */
.btn-enhanced-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-enhanced-text:hover {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.08em;
}

/* Menu Item Text */
.menu-item-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.menu-item-text:hover {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  color: #ffd700;
}

/* Info Text */
.info-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #e0e0e0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Money Display */
.money-display {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.3rem;
  color: #4caf50;
  text-shadow: 
    0 0 10px rgba(76, 175, 80, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Bet Amount Text */
.bet-amount {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffd700;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Card Values */
.card-value {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  text-shadow: 
    0 0 15px currentColor,
    0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Error Messages */
.error-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #f44336;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success Messages */
.success-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #4caf50;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: successBounce 0.6s ease-in-out;
}

@keyframes successBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Loading Text */
.loading-text {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Tooltips */
.tooltip-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.9);
  padding: 8px 12px;
  border-radius: 6px;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Accessibility Improvements */
.high-contrast-text {
  color: #000000 !important;
  background: #ffffff !important;
  text-shadow: none !important;
}

/* Responsive Text Scaling */
@media (max-width: 768px) {
  .casino-title { font-size: 2.5rem; }
  .jackpot-text { font-size: 2rem; }
  .win-amount { font-size: 2rem; }
  .card-value { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .casino-title { font-size: 2rem; }
  .jackpot-text { font-size: 1.5rem; }
  .win-amount { font-size: 1.5rem; }
  .card-value { font-size: 2rem; }
}

/* Smooth Text Transitions */
.smooth-text-transition {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Glitch Text Effect */
.glitch-text {
  position: relative;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.1em;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  animation: glitch-1 0.5s infinite;
  color: #ff0000;
  z-index: -1;
}

.glitch-text::after {
  animation: glitch-2 0.5s infinite;
  color: #0000ff;
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
  40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
  60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 1px); }
  80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
  60% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -2px); }
  80% { clip-path: inset(5% 0 80% 0); transform: translate(-1px, 1px); }
}
