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

body {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  font-family: 'Segoe UI', Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 20px;
  width: 100%;
}

.container {
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.accepted-rank {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.accepted-rank h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

#currentRank {
  margin: 1rem 0;
  font-size: 1.2rem;
}

#rollCount {
  font-size: 1.1rem;
  color: #bbb;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
}

.case-container {
  width: 600px;
  margin: 0 auto;
}

.case-window {
  position: relative;
  width: 600px;
  height: 120px;
  background: linear-gradient(to bottom, #2a2a2a, #1f1f1f);
  border: 2px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  cursor: grab;
  clip-path: inset(0 0 0 0);
}

.items-container {
  position: absolute;
  display: flex;
  left: 0;
  top: 0;
  height: 100%;
  align-items: center;
  will-change: transform;
  transform: translateX(0);
  user-select: none;
  pointer-events: none;
  -webkit-overflow-scrolling: touch;
}

.item {
  width: 100px;
  height: 100px;
  margin: 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  font-weight: bold;
  transition: transform 0.3s ease-in-out;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  transform-origin: center;
}

.item:hover {
  transform: none;
}

.item.selected {
  animation: pulse 1s ease-in-out infinite;
  position: relative;
  z-index: 5;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0);
  }
  
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.selector {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 20px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.selector::after {
  content: "▼";
  color: white;
  font-size: 24px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: arrow-glow 1.5s ease-in-out infinite;
  margin-top: -5px;
}

@keyframes arrow-glow {
  0%, 100% {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  }
  50% {
    transform: translateY(2px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 1);
  }
}

.case-light-beam {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 5;
  clip-path: inset(0 0 0 0);
  display: none; /* Hide the white beam */
}

.light-beam {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 4px;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.light-beam.yellow {
  background: linear-gradient(to bottom, rgba(255, 255, 0, 0.8), rgba(255, 255, 0, 0));
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
  animation: beam-fade 2s ease-out forwards;
}

.light-beam.cyan {
  background: linear-gradient(to bottom, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0));
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
  animation: beam-fade 2s ease-out forwards;
}

.light-beam.blue {
  background: linear-gradient(to bottom, rgba(0, 0, 255, 0.8), rgba(0, 0, 255, 0));
  box-shadow: 0 0 20px rgba(0, 0, 255, 0.8);
  animation: beam-fade 2s ease-out forwards;
}

.light-beam.red {
  background: linear-gradient(to bottom, rgba(255, 0, 0, 0.8), rgba(255, 0, 0, 0));
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
  animation: beam-fade 2s ease-out forwards;
}

@keyframes beam-fade {
  0% {
    opacity: 0;
    height: 0;
  }
  10% {
    opacity: 1;
    height: 100vh;
  }
  100% {
    opacity: 0;
    height: 100vh;
  }
}

button {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin: 0.5rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, #45a049, #3d8b40);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  background: linear-gradient(135deg, #cccccc, #999999);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#declineRank {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

#declineRank:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

#shareRank {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

#shareRank:hover {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.result-actions {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#resultDisplay {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeSlideIn 0.5s ease-out;
  transform-origin: center;
}

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

.result-actions button {
  animation: scaleIn 0.3s ease-out backwards;
}

#acceptRank {
  animation-delay: 0.2s;
}

#declineRank {
  animation-delay: 0.4s;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.rankings-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #333, #444);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rankings-toggle:hover {
  background: linear-gradient(135deg, #444, #555);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.rankings-toggle .arrow {
  transition: transform 0.3s ease;
}

.rankings-toggle .arrow.up {
  transform: rotate(180deg);
}

.rankings {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 99;
  display: none;
  transform-origin: top right;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
}

.rankings.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.rankings h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.shared-rank {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease;
}

.shared-rank:hover {
  transform: translateY(-2px);
}

.rank-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.rank-info .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.rank-info .username {
  font-weight: 600;
  color: #e0e0e0;
}

.rank-info .timestamp {
  color: #888;
  font-size: 0.9rem;
  margin-left: auto;
}

.inventory-toggle {
  position: relative;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #333, #444);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1rem auto;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.inventory-toggle:hover {
  background: linear-gradient(135deg, #444, #555);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.inventory-toggle .arrow {
  transition: transform 0.3s ease;
}

.inventory-toggle .arrow.up {
  transform: rotate(180deg);
}

.inventory {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  transition: all 0.3s ease;
}

.inventory.visible {
  display: block;
}

.inventory h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.inventory-slot {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px;
  animation: slotAppear 0.3s ease-out backwards;
}

@keyframes slotAppear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.inventory-slot:not(.empty):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.inventory-slot.equipped {
  border: 2px solid #4CAF50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
  animation: equipPulse 0.5s ease-out;
}

@keyframes equipPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.inventory-slot.equipped::before {
  content: "Equipped";
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.inventory-slot.empty {
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  cursor: default;
}

.delete-rank {
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.delete-rank:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: scale(1.2) rotate(90deg);
}

.inventory-full {
  color: #f44336;
  margin-top: 15px;
  font-weight: 600;
  text-align: center;
  padding: 10px;
  background: rgba(244, 67, 54, 0.1);
  border-radius: 8px;
  display: none;
}

.upgrade-inventory {
  padding: 0.8rem;
  margin-bottom: 1rem;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 8px;
  text-align: center;
}

.upgrade-inventory h3 {
  margin: 0 0 10px;
  color: #4CAF50;
  font-size: 1.1rem;
}

.upgrade-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.buy-slot-button {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.buy-slot-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2E7D32, #1B5E20);
  transform: translateY(-2px);
}

.buy-slot-button:disabled {
  background: linear-gradient(135deg, #9E9E9E, #757575);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Rarity colors */
.bronze { 
  background: linear-gradient(135deg, #cd7f32, #a66225);
  color: white;
}

.silver { 
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: white;
}

.gold { 
  background: linear-gradient(135deg, #ffd700, #daa520);
  color: white;
}

.platinum { 
  background: linear-gradient(135deg, #e5e4e2, #c8c8c8);
  color: white;
}

.diamond { 
  background: linear-gradient(135deg, #b9f2ff, #89CFF0);
  color: white;
}

.master { 
  background: linear-gradient(135deg, #ff00ff, #800080);
  color: white;
  animation: immortal-pulse 3s infinite;
}

.grandmaster { 
  background: linear-gradient(135deg, #00ffff, #0000ff);
  color: white;
  animation: transcendent-glow 4s infinite;
}

.elite { 
  background: linear-gradient(135deg, #00ff00, #008000);
  color: white;
  animation: universal-pulse 3s infinite;
}

.supreme { 
  background: linear-gradient(135deg, #ffd700, #ff4500);
  color: white;
  animation: galactic-shine 4s infinite;
}

.ultimate { 
  background: linear-gradient(135deg, #ff1493, #ff00ff);
  color: white;
  animation: dimensional-shift 5s infinite;
}

/* Add new variant styles */
.shiny, .rainbow, .glowing, .ethereal, .celestial, .divine, .mythical, .legendary, .ancient {
  animation: shine 2s linear infinite;
  position: relative;
  overflow: hidden;
}

.shiny::after, .rainbow::after, .glowing::after, .ethereal::after, .celestial::after, .divine::after, .mythical::after, .legendary::after, .ancient::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: shine-sweep 2s linear infinite;
}

@keyframes shine-sweep {
  0% {
    transform: translate(-100%, -100%) rotate(45deg);
  }
  100% {
    transform: translate(100%, 100%) rotate(45deg);
  }
}

@keyframes shine {
  
}

/* Rainbow variant */
.rainbow {
  animation: rainbow-bg 3s linear infinite;
}

@keyframes rainbow-bg {
  0% { background: linear-gradient(135deg, #ff0000, #ff7f00); }
  20% { background: linear-gradient(135deg, #ff7f00, #ffff00); }
  40% { background: linear-gradient(135deg, #ffff00, #00ff00); }
  60% { background: linear-gradient(135deg, #00ff00, #0000ff); }
  80% { background: linear-gradient(135deg, #0000ff, #4b0082); }
  100% { background: linear-gradient(135deg, #4b0082, #ff0000); }
}

/* Glowing variant */
.glowing {
  animation: glow 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes glow {
  0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
  100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
}

/* Ethereal variant */
.ethereal {
  background: linear-gradient(135deg, #b9f2ff, #89CFF0);
  opacity: 0.8;
  animation: ethereal 3s ease-in-out infinite;
}

@keyframes ethereal {
  0% { opacity: 0.8; }
  50% { opacity: 0.6; }
  100% { opacity: 0.8; }
}

/* Celestial variant */
.celestial {
  background: linear-gradient(135deg, #4b0082, #9400d3);
  animation: celestial 4s linear infinite;
}

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

/* Divine variant */
.divine {
  background: linear-gradient(135deg, #ffd700, #ffffff, #ffd700);
  animation: divine 3s linear infinite;
}

@keyframes divine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Mythical variant */
.mythical {
  background: linear-gradient(135deg, #ff1493, #9400d3, #4b0082);
  animation: mythical 5s linear infinite;
}

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

/* Legendary variant */
.legendary {
  background: linear-gradient(135deg, #ffd700, #ff4500, #ff8c00);
  animation: legendary 4s ease infinite;
}

@keyframes legendary {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

/* Ancient variant */
.ancient {
  background: linear-gradient(135deg, #800080, #4b0082, #000000);
  animation: ancient 6s linear infinite;
}

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

/* Add new rank styles */
.immortal { 
  background: linear-gradient(135deg, #ff00ff, #800080);
  color: white;
  animation: immortal-pulse 3s infinite;
}

.transcendent { 
  background: linear-gradient(135deg, #00ffff, #0000ff);
  color: white;
  animation: transcendent-glow 4s infinite;
}

.cosmic { 
  background: linear-gradient(135deg, #4b0082, #8b008b);
  color: white;
  animation: cosmic-spiral 5s infinite;
}

.galactic { 
  background: linear-gradient(135deg, #ffd700, #ff4500);
  color: white;
  animation: galactic-shine 4s infinite;
}

.universal { 
  background: linear-gradient(135deg, #00ff00, #006400);
  color: white;
  animation: universal-pulse 3s infinite;
}

.dimensional { 
  background: linear-gradient(135deg, #ff1493, #ff00ff);
  color: white;
  animation: dimensional-shift 5s infinite;
}

.quantum { 
  background: linear-gradient(135deg, #4169e1, #000080);
  color: white;
  animation: quantum-fluctuation 4s infinite;
}

.omnipotent { 
  background: linear-gradient(135deg, #ffd700, #ffffff);
  color: white;
  animation: omnipotent-radiance 6s infinite;
}

.infinite { 
  background: linear-gradient(135deg, #ff0000, #000000);
  color: white;
  animation: infinite-cycle 8s infinite;
}

.absolute { 
  background: linear-gradient(135deg, #ffffff, #000000);
  color: white;
  animation: absolute-power 10s infinite;
}

@keyframes immortal-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

@keyframes transcendent-glow {
  0%, 100% { box-shadow: 0 0 20px #00ffff; }
  50% { box-shadow: 0 0 40px #0000ff; }
}

@keyframes cosmic-spiral {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes galactic-shine {
  0%, 100% { filter: contrast(100%); }
  50% { filter: contrast(150%); }
}

@keyframes universal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes dimensional-shift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes quantum-fluctuation {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes infinite-cycle {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes absolute-power {
  0% { filter: saturate(100%) brightness(1); }
  50% { filter: saturate(200%) brightness(1.5); }
  100% { filter: saturate(100%) brightness(1); }
}

/* New secret rank styles */
.secret-rank {
  background: linear-gradient(135deg, #000000, #333333);
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.secret-rank div {
  animation: secret-pulse 2s ease-in-out infinite;
}

@keyframes secret-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.arcane {
  background: linear-gradient(135deg, #FF00FF, #800080);
  animation: arcane 3s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(128, 0, 128, 0.7);
}

@keyframes arcane {
  0% {
    box-shadow: 0 0 15px rgba(128, 0, 128, 0.7);
    filter: hue-rotate(0deg);
  }
  50% {
    box-shadow: 0 0 25px rgba(128, 0, 128, 0.9);
    filter: hue-rotate(180deg);
  }
  100% {
    box-shadow: 0 0 15px rgba(128, 0, 128, 0.7);
    filter: hue-rotate(360deg);
  }
}

.obtainable {
  background: linear-gradient(135deg, #32CD32, #006400);
  animation: obtainable 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.6);
}

@keyframes obtainable {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.6);
  }
}

/* Add new rank styles */
.secret-celestial {
  background: linear-gradient(135deg, #4b0082, #0000ff);
  animation: celestial-secret 3s infinite;
}

@keyframes celestial-secret {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.secret-infernal {
  background: linear-gradient(135deg, #ff4500, #8b0000);
  animation: infernal-burn 2s infinite;
}

@keyframes infernal-burn {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}

.secret-abyssal {
  background: linear-gradient(135deg, #00008b, #4b0082);
  animation: abyssal-pulse 3s ease-in-out infinite;
}

@keyframes abyssal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.secret-eternal {
  background: linear-gradient(135deg, #ffffff, #00ffff);
  animation: eternal-spin 4s linear infinite;
}

@keyframes eternal-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.secret-nebula {
  background: linear-gradient(135deg, #ff00ff, #9400d3);
  animation: nebula-glow 2s alternate infinite;
}

@keyframes nebula-glow {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.secret-void {
  background: linear-gradient(135deg, #000000, #4b0082);
  animation: void-suck 5s linear infinite;
}

@keyframes void-suck {
  0% { background-size: 100% 100%; }
  50% { background-size: 200% 200%; }
  100% { background-size: 100% 100%; }
}

.secret-quantum {
  background: linear-gradient(135deg, #00ff00, #000000);
  animation: quantum-flux 1s steps(10) infinite;
}

@keyframes quantum-flux {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

.secret-paradox {
  background: linear-gradient(135deg, #ff0000, #0000ff);
  animation: paradox-conflict 2s infinite;
}

@keyframes paradox-conflict {
  0%, 100% { background-position: left; }
  50% { background-position: right; }
}

.secret-oblivion {
  background: linear-gradient(135deg, #808080, #000000);
  animation: oblivion-decay 3s ease-out infinite;
}

@keyframes oblivion-decay {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.secret-infinity {
  background: linear-gradient(135deg, #ffffff, #000000);
  animation: infinite-cycle 2s linear infinite;
}

/* Add new secret-orangutan style */
.secret-orangutan {
  background: linear-gradient(135deg, #FFA500, #8B4513);
  color: white;
  animation: orangutan-swing 3s ease-in-out infinite;
}

@keyframes orangutan-swing {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

.inventory {
  transform-origin: top;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scaleY(0);
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.inventory.visible {
  opacity: 1;
  transform: scaleY(1);
  height: auto;
  margin-top: 2rem;
  padding: 1.5rem;
}

.rankings {
  transform-origin: top right;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.95) translateY(-20px);
  pointer-events: none;
}

.rankings.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.shared-rank {
  animation: rankAppear 0.3s ease-out backwards;
}

@keyframes rankAppear {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.result-actions button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-actions button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.result-actions button:active {
  transform: translateY(1px) scale(0.98);
}

.inventory-toggle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inventory-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.inventory-toggle:active {
  transform: translateY(1px);
}

.inventory-toggle .arrow {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rankings-toggle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rankings-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.rankings-toggle:active {
  transform: translateY(1px);
}

.rankings-toggle .arrow {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#currentRank > div {
  transition: all 0.3s ease;
}

#currentRank > div:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#shareRank {
  animation: shareAppear 0.5s ease-out backwards;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media screen and (max-width: 768px) {
  .case-window {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
  }

  .items-container {
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
  }

  .item {
    width: 80px;
    height: 80px;
    margin: 0 5px;
    font-size: 0.8em;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5px;
  }

  .selector {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    z-index: 100;
  }

  .item.selected {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  }

  /* Ensure selected item is always visible */
  .case-window {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 10%,
      black 90%,
      transparent 100%
    );
  }
}

@media screen and (max-width: 360px) {
  .item {
    width: 70px;
    height: 70px;
    margin: 0 4px;
    font-size: 0.7em;
  }
}

/* Even smaller screens */
@media screen and (max-width: 360px) {
  .inventory-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .item {
    width: 70px;
    height: 70px;
    font-size: 0.8em;
  }

  .case-window {
    height: 90px;
  }

  button {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }

  .rankings {
    width: calc(100% - 20px);
    max-width: none;
    right: 10px;
  }
}

/* Fix for notched phones */
@supports (padding: max(0px)) {
  body {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

.reality-donald-equipped {
  animation: shakeScreen 0.5s infinite;
  filter: sepia(1) hue-rotate(-50deg) saturate(3);
  transition: all 0.3s ease;
}

.reality-donald-equipped.inactive {
  animation: none;
  filter: none;
}

@keyframes shakeScreen {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
  }
  25% { 
    transform: translate(-5px, 5px) rotate(-1deg); 
  }
  50% { 
    transform: translate(5px, -5px) rotate(1deg);
  }
  75% { 
    transform: translate(-5px, -5px) rotate(-1deg);
  }
}

.reality-donald {
  background: linear-gradient(135deg, #8B0000, #FF0000);
  color: white;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 0, 1);
  }
}

.reality-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 9999;
  animation: fadeIn 0.5s ease-out;
}

.reality-controls button {
  background: linear-gradient(135deg, #8B0000, #FF0000);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2em;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: glowRed 2s infinite;
}

@keyframes glowRed {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
  }
}

.game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  color: red;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10vw;
  text-transform: uppercase;
  letter-spacing: 10px;
  z-index: 99999;
  animation: gameOverPulse 2s infinite;
}

@keyframes gameOverPulse {
  0%, 100% {
    text-shadow: 0 0 20px red;
  }
  50% {
    text-shadow: 0 0 40px red, 0 0 60px red;
  }
}

.destroy-target {
  position: relative;
  animation: destroyAnimation 1s forwards;
  pointer-events: none;
}

@keyframes destroyAnimation {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(0) rotate(720deg);
    opacity: 0;
  }
}

.pouend {
  background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
  color: white;
  animation: pouend-pulse 2s infinite;
}

@keyframes pouend-pulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
}

.pouend-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  justify-content: center;
}

.earthquake-button {
  background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2em;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.earthquake-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.earthquake-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.earthquake {
  animation: earthquake 0.1s infinite;
}

@keyframes earthquake {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-5px, 5px) rotate(-1deg);
  }
  50% {
    transform: translate(5px, -5px) rotate(1deg);
  }
  75% {
    transform: translate(-5px, -5px) rotate(-1deg);
  }
}

.chat-container {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 350px;
  height: 450px;
  background: rgba(15, 15, 15, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.chat-header {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.chat-header .user-count {
  background: rgba(76, 175, 80, 0.3);
  color: #4CAF50;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  margin-left: 10px;
}

.chat-controls {
  display: flex;
  gap: 8px;
}

.chat-toggle, .chat-settings {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.chat-toggle:hover, .chat-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.chat-toggle {
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.chat-toggle.minimized {
  transform: rotate(180deg);
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.chat-message {
  margin-bottom: 15px;
  animation: messageSlide 0.3s ease-out;
  opacity: 0;
  animation-fill-mode: forwards;
  max-width: 85%;
  position: relative;
}

.chat-message.own {
  align-self: flex-end;
  background: rgba(33, 150, 243, 0.2);
  border-radius: 15px 15px 0 15px;
}

.chat-message.other {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px 15px 15px 0;
}

.message-content {
  padding: 10px 15px;
  position: relative;
  color: #fff;
  word-break: break-word;
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.message-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.message-username {
  font-weight: bold;
  font-size: 0.9em;
  color: #4CAF50;
  margin-right: 8px;
}

.message-timestamp {
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.5);
}

.system-message {
  align-self: center;
  background: rgba(255, 193, 7, 0.2);
  color: #FFC107;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.8em;
  margin: 5px 0;
  animation: systemMessageFade 0.3s ease-out;
  text-align: center;
}

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

.chat-input {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input form {
  display: flex;
  gap: 5px;
  align-items: center;
  width: 100%;
}

.chat-input input {
  flex: 1;
  min-width: 0; /* This prevents the input from overflowing */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 10px 15px;
  color: #fff;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.chat-input input:focus {
  outline: none;
  border-color: #4CAF50;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.chat-input button {
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  min-width: 60px;
}

.chat-input button:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.chat-input button:active {
  transform: translateY(1px);
}

.chat-container.minimized {
  height: 60px;
  overflow: hidden;
}

.chat-container.minimized .chat-messages,
.chat-container.minimized .chat-input {
  display: none;
}

.emoji-picker {
  position: absolute;
  bottom: 70px;
  left: 15px;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-width: 250px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transform-origin: bottom left;
  transform: scale(0);
  opacity: 0;
  transition: all 0.2s ease-out;
}

.emoji-picker.visible {
  transform: scale(1);
  opacity: 1;
}

.emoji-item {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.emoji-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

.emoji-button {
  background: none;
  border: none;
  color: #ccc;
  padding: 10px;
  cursor: pointer;
  font-size: 1.2em;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-right: 5px;
}

.emoji-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.user-typing {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.6);
  padding: 5px 15px;
  height: 20px;
}

.typing-indicator {
  display: inline-block;
}

.typing-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin-right: 3px;
  background: rgba(255, 255, 255, 0.6);
  animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

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

@media screen and (max-width: 768px) {
  .chat-container {
    width: calc(100% - 40px);
    height: 350px;
  }
  
  .chat-container.minimized {
    width: 250px;
  }
  
  .chat-message {
    max-width: 90%;
  }
  
  .chat-input button {
    padding: 8px 10px;
    font-size: 0.9em;
  }
  
  .emoji-button {
    padding: 8px;
  }
}

/* Add safe area insets for modern mobile browsers */
@supports (padding: max(0px)) {
  .chat-container {
    padding-bottom: max(15px, env(safe-area-inset-bottom));
    padding-left: max(15px, env(safe-area-inset-left));
  }
}

.index-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #333, #444);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.index-toggle:hover {
  background: linear-gradient(135deg, #444, #555);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.index-toggle .arrow {
  transition: transform 0.3s ease;
}

.index-toggle .arrow.up {
  transform: rotate(180deg);
}

.index-container {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 99;
  transform-origin: bottom left;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  display: none;
}

.index-container.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.index-section {
  margin-bottom: 1.5rem;
}

.index-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.index-progress {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 0.8rem;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px;
}

.index-item {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  font-size: 0.8rem;
  text-align: center;
  padding: 5px;
  word-break: break-word;
}

.index-item.unknown {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #666;
}

@media screen and (max-width: 768px) {
  .index-container {
    width: calc(100% - 40px);
    bottom: 70px;
  }
  
  .index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cool-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #333, #444);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-button:hover {
  background: linear-gradient(135deg, #444, #555);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.menu-icon {
  font-size: 1.2rem;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transform-origin: top left;
  transform: scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.menu-dropdown.active {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.menu-item {
  padding: 15px 20px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 25px;
}

.discord-promo {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
}

.discord-button {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  color: white;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
  transition: all 0.3s ease;
  animation: discordPulse 2s infinite;
}

.discord-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.6);
}

.discord-icon {
  width: 30px;
  height: 30px;
  filter: brightness(1.1);
}

@keyframes discordPulse {
  0% {
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
  }
  100% {
    box-shadow: 0 5px 30px rgba(88, 101, 242, 0.7);
  }
}

.rankings-toggle {
  top: 20px;
  right: 20px;
  z-index: 100;
}

@media screen and (max-width: 768px) {
  .discord-promo {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
  }
  
  .discord-button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .discord-icon {
    width: 24px;
    height: 24px;
  }
}

.star-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinning-star {
  position: absolute;
  width: 150%;
  height: 150%;
  object-fit: contain;
  z-index: 1;
  animation: spin 6s linear infinite;
}

.question-mark {
  position: relative;
  z-index: 2;
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px black, 0 0 10px black;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.achievements-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 100;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.achievements-toggle:hover {
  background: linear-gradient(135deg, #F57C00, #E65100);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.achievements-toggle .arrow {
  transition: transform 0.3s ease;
}

.achievements-toggle .arrow.up {
  transform: rotate(180deg);
}

.achievements-panel {
  position: fixed;
  top: 140px;
  right: 20px;
  width: 320px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 99;
  transform-origin: top right;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  display: none;
}

.achievements-panel.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.achievements-list h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #FF9800;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.variant-points {
  padding: 0.8rem;
  margin-bottom: 1rem;
  background: rgba(255, 152, 0, 0.2);
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #FF9800;
}

.achievement {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.achievement:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.achievement.achieved {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.achievement-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #fff;
}

.achievement.achieved .achievement-title {
  color: #4CAF50;
}

.achievement-desc {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.achievement-reward {
  font-size: 0.9rem;
  color: #FF9800;
  font-weight: bold;
}

.luck-toggle {
  margin-top: 1.5rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.luck-toggle label {
  color: #fff;
  font-size: 0.9rem;
}

.mass-roll-display {
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(33, 150, 243, 0.2);
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #2196F3;
}

.achievement-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 15px 25px;
  background: rgba(76, 175, 80, 0.9);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 80%;
}

.achievement-notification.show {
  transform: translateX(-50%) translateY(0);
}

.notification-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 5px;
}

.notification-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

@media screen and (max-width: 768px) {
  .achievements-panel {
    width: calc(100% - 40px);
    right: 20px;
    top: 140px;
  }
  
  .achievement-notification {
    width: 90%;
    padding: 10px 15px;
  }
  
  .notification-title {
    font-size: 1rem;
  }
  
  .notification-message {
    font-size: 0.9rem;
  }
}

.item-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.item-actions button {
  padding: 5px 15px;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
}

.accept-item {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.accept-item:hover:not(:disabled) {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-2px);
}

.decline-item {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  border: none;
  box-shadow: 0 2px 5px rgba(244, 67, 54, 0.3);
}

.decline-item:hover:not(:disabled) {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: translateY(-2px);
}

.item-actions button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.chat-settings-menu {
  position: absolute;
  top: 60px;
  right: 15px;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px;
  width: 200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  z-index: 3;
  transform-origin: top right;
  transform: scale(0);
  opacity: 0;
  transition: all 0.2s ease-out;
  pointer-events: none;
}

.chat-settings-menu.visible {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-settings-menu h4 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.settings-option label {
  color: #ddd;
  font-size: 0.9rem;
}

.settings-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.settings-option select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.clear-chat {
  width: 100%;
  background: rgba(244, 67, 54, 0.3);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.clear-chat:hover {
  background: rgba(244, 67, 54, 0.5);
}

/* Font size classes */
.chat-container.font-small .chat-messages,
.chat-container.font-small .chat-input input {
  font-size: 0.8em;
}

.chat-container.font-medium .chat-messages,
.chat-container.font-medium .chat-input input {
  font-size: 0.9em;
}

.chat-container.font-large .chat-messages,
.chat-container.font-large .chat-input input {
  font-size: 1.1em;
}

.absolute-power {
  0% { filter: saturate(100%) brightness(1); }
  50% { filter: saturate(200%) brightness(1.5); }
  100% { filter: saturate(100%) brightness(1); }
}

/* Auto Roll Config Panel */
.auto-roll-toggle {
  position: fixed;
  top: 140px;
  right: 20px;
  z-index: 100;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #2196F3, #1976D2);
  border: none;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.auto-roll-toggle:hover {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.auto-roll-toggle .arrow {
  transition: transform 0.3s ease;
}

.auto-roll-toggle .arrow.up {
  transform: rotate(180deg);
}

.auto-roll-panel {
  position: fixed;
  top: 200px;
  right: 20px;
  width: 350px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 99;
  transform-origin: top right;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  display: none;
}

.auto-roll-panel.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.auto-roll-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2196F3;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.auto-roll-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(33, 150, 243, 0.1);
  padding: 1rem;
  border-radius: 10px;
}

.auto-roll-button {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 120px;
}

.auto-roll-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #1976D2, #1565C0);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.auto-roll-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auto-roll-button.stop {
  background: linear-gradient(135deg, #F44336, #D32F2F);
}

.auto-roll-button.stop:hover {
  background: linear-gradient(135deg, #D32F2F, #C62828);
}

.auto-roll-count {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  color: #2196F3;
  font-weight: bold;
  font-size: 1.1rem;
}

.auto-roll-speed {
  margin: 1rem 0;
}

.auto-roll-speed label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e0e0e0;
}

.auto-roll-speed-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
}

.auto-roll-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196F3;
  cursor: pointer;
}

.auto-roll-speed-value {
  text-align: center;
  margin-top: 0.5rem;
  color: #2196F3;
  font-weight: bold;
}

.rank-config-section {
  margin-top: 1.5rem;
}

.rank-config-section h3 {
  font-size: 1.2rem;
  color: #e0e0e0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.rank-option:hover {
  background: rgba(33, 150, 243, 0.1);
}

.rank-option label {
  display: flex;
  align-items: center;
  color: #e0e0e0;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.rank-option input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.auto-roll-stats {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: #e0e0e0;
}

.stats-value {
  font-weight: bold;
  color: #2196F3;
}

.select-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.select-buttons button {
  background: rgba(33, 150, 243, 0.2);
  color: #e0e0e0;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.select-buttons button:hover {
  background: rgba(33, 150, 243, 0.3);
  color: white;
}

.secret-rank-option .rank-name {
  color: #FF9800;
}

@keyframes absolute-power {
  0% { filter: saturate(100%) brightness(1); }
  50% { filter: saturate(200%) brightness(1.5); }
  100% { filter: saturate(100%) brightness(1); }
}

/* Add rarity border styles */
.rarity-common {
  border: 2px solid #b0b0b0 !important;
  box-shadow: 0 0 5px rgba(176, 176, 176, 0.5) !important;
}

.rarity-uncommon {
  border: 2px solid #55a557 !important;
  box-shadow: 0 0 5px rgba(85, 165, 87, 0.5) !important;
}

.rarity-rare {
  border: 2px solid #4a69ff !important;
  box-shadow: 0 0 5px rgba(74, 105, 255, 0.5) !important;
}

.rarity-epic {
  border: 2px solid #a335ee !important;
  box-shadow: 0 0 5px rgba(163, 53, 238, 0.5) !important;
}

.rarity-legendary {
  border: 2px solid #ff8000 !important;
  box-shadow: 0 0 8px rgba(255, 128, 0, 0.6) !important;
}

.rarity-mythic {
  border: 2px solid #ff2d95 !important;
  box-shadow: 0 0 8px rgba(255, 45, 149, 0.6) !important;
}

.rarity-celestial {
  border: 2px solid #00ffff !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.7) !important;
}

.rarity-divine {
  border: 2px solid #ffff00 !important;
  box-shadow: 0 0 12px rgba(255, 255, 0, 0.8) !important;
}

.rarity-transcendent {
  border: 2px solid #ff00ff !important;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.8) !important;
}

.rarity-cosmic {
  background-clip: padding-box !important;
  border: 3px solid transparent !important;
  position: relative !important;
}

.rarity-cosmic::before {
  content: '';
  position: absolute;
  top: -3px; right: -3px; bottom: -3px; left: -3px;
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 400% 400%;
  z-index: -1;
  animation: cosmic-border 3s ease infinite;
  border-radius: inherit;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

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

.rarity-exclusive {
  background-clip: padding-box !important;
  border: 3px solid transparent !important;
  position: relative !important;
}

.rarity-exclusive::before {
  content: '';
  position: absolute;
  top: -3px; right: -3px; bottom: -3px; left: -3px;
  background: linear-gradient(45deg, #ffd700, #ffffff, #ffd700);
  background-size: 200% 200%;
  z-index: -1;
  animation: exclusive-border 3s ease infinite;
  border-radius: inherit;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

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

.rarity-redacted {
  background-clip: padding-box !important;
  border: 3px solid transparent !important;
  position: relative !important;
}

.rarity-redacted::before {
  content: '';
  position: absolute;
  top: -3px; right: -3px; bottom: -3px; left: -3px;
  background: repeating-linear-gradient(45deg, #000, #000 10px, #f00 10px, #f00 20px);
  z-index: -1;
  animation: glitch-border 0.2s linear infinite;
  border-radius: inherit;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

@keyframes glitch-border {
  0% { filter: hue-rotate(0deg); }
  10% { transform: translate(-2px, 1px); }
  20% { transform: translate(2px, 0px); }
  30% { transform: translate(-1px, -1px); filter: hue-rotate(90deg); }
  40% { transform: translate(1px, 2px); }
  50% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 1px); filter: hue-rotate(180deg); }
  70% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, -1px); }
  90% { transform: translate(-2px, 0px); filter: hue-rotate(270deg); }
  100% { transform: translate(0px, 0px); }
}

.rarity-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: bold;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.index-item .rarity-badge {
  font-size: 7px;
  bottom: 2px;
  right: 2px;
  padding: 1px 3px;
}

.offline-mode-toggle {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(33, 150, 243, 0.1);
  border-radius: 10px;
}

.offline-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: bold;
  color: #2196F3;
}

.offline-mode-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.offline-mode-info {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #aaa;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.inventory-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  gap: 10px;
}

.page-button {
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-button:hover:not(:disabled) {
  background: rgba(33, 150, 243, 0.3);
  transform: translateY(-2px);
}

.page-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: #e0e0e0;
  font-size: 0.9rem;
}

.trol {
  background: linear-gradient(135deg, #69c, #420);
  color: white;
  animation: trol-animation 1s ease-in-out infinite;
}

@keyframes trol-animation {
  0%, 100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.troll-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2em;
  z-index: 10;
  animation: trollface-appear 0.5s ease-out forwards;
}

@keyframes trollface-appear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

.item[data-is-trol="true"] {
  position: relative;
  overflow: hidden;
}

.item[data-is-trol="true"]::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(45deg);
  animation: cosmic-sweep 3s linear infinite;
}

.item.revealed[data-is-trol="true"]::after {
  display: none;
}

.question-reveal-cutscene {
  z-index: 50;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.reveal-star {
  position: absolute;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
  transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 52;
}

.reveal-vignette {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 51;
}

.shake-item {
  animation: shake-reveal 2s ease-in-out;
}

@keyframes shake-reveal {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-2px, 0) rotate(-1deg); }
  20%, 40%, 60%, 80% { transform: translate(2px, 0) rotate(1deg); }
}

.screen-shake {
  animation: screenShakeEffect 0.5s ease-in-out infinite;
}

@keyframes screenShakeEffect {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(var(--shake-intensity, 5px), var(--shake-intensity, 5px)) rotate(1deg); }
  50% { transform: translate(calc(var(--shake-intensity, 5px) * -1), var(--shake-intensity, 5px)) rotate(-1deg); }
  75% { transform: translate(var(--shake-intensity, 5px), calc(var(--shake-intensity, 5px) * -1)) rotate(1deg); }
}