:root {
  /* Premium Night Mode Palette */
  --bg-color: #050505;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  /* Sophisticated Grey */
  --accent-color: #7d5fff;
  /* Neon Purple */
  --card-bg: rgba(20, 20, 35, 0.45);
  /* Darker Glass */
  --card-border: rgba(125, 95, 255, 0.3);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  /* Midnight Gradient */
  background: linear-gradient(135deg, #09090b 0%, #1a1b26 50%, #09090b 100%);
  background-attachment: fixed;
  /* Fix background to viewport */
  background-size: cover;
  background-position: center;
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100dvh;
  /* changed from height:100dvh to prevent cutoff */
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* Bubbles Background - Cool Blue Only */
.bubbles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -20px;
  background: rgba(125, 95, 255, 0.15);
  /* Purple tint */
  border-radius: 50%;
  animation: rise 15s infinite ease-in;
  box-shadow: 0 0 15px rgba(125, 95, 255, 0.1);
}

.bubble:nth-child(1) {
  width: 40px;
  height: 40px;
  left: 10%;
  animation-duration: 8s;
}

.bubble:nth-child(2) {
  width: 20px;
  height: 20px;
  left: 20%;
  animation-duration: 5s;
  animation-delay: 1s;
}

.bubble:nth-child(3) {
  width: 50px;
  height: 50px;
  left: 35%;
  animation-duration: 10s;
  animation-delay: 2s;
}

.bubble:nth-child(4) {
  width: 80px;
  height: 80px;
  left: 50%;
  animation-duration: 11s;
  animation-delay: 0s;
}

.bubble:nth-child(5) {
  width: 35px;
  height: 35px;
  left: 55%;
  animation-duration: 6s;
  animation-delay: 1s;
}

.bubble:nth-child(6) {
  width: 45px;
  height: 45px;
  left: 65%;
  animation-duration: 8s;
  animation-delay: 3s;
}

.bubble:nth-child(7) {
  width: 90px;
  height: 90px;
  left: 70%;
  animation-duration: 12s;
  animation-delay: 2s;
}

.bubble:nth-child(8) {
  width: 25px;
  height: 25px;
  left: 80%;
  animation-duration: 6s;
  animation-delay: 2s;
}

@keyframes rise {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-120vh);
    opacity: 0;
  }
}



/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100dvh;
  display: flex;
  /* Flex layout for centering */
  flex-direction: column;
  justify-content: center;
  /* Better vertical centering */
}

/* Landscape Mode Adaptation */


/* Header */
.header {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3vh;
  /* Dynamic spacing */
}

.logo {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 0 25px rgba(125, 95, 255, 0.4);
  /* Purple Glow */
  background: none;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Hero & Shuffle Section */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  /* Take remaining space */
  gap: 3rem;
  padding-bottom: 5rem;
}

.shuffle-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 3rem;
  width: 100%;
  max-width: 500px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 242, 255, 0.05);
  transition: transform 0.2s;
}

.shuffle-card.shuffling {
  transform: scale(1.02);
  box-shadow: 0 0 60px rgba(0, 242, 255, 0.2);
  border-color: rgba(0, 242, 255, 0.6);
}

.shuffle-icon {
  font-size: 6rem;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4));
}

.shuffle-text {
  font-size: 2.5rem;
  /* Increased from 2rem */
  font-weight: 700;
  color: var(--text-primary);
}

/* Random Button - SIMPLE & CLEAN */
.random-section {
  text-align: center;
  position: relative;
  z-index: 10;
}

.btn-random {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 100px;
  color: #fff;
  padding: 1.2rem 5rem;
  /* Increased padding */
  font-size: 1.6rem;
  /* Increased font size */
  font-weight: 700;
  /* Bolder */
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}

.btn-random:hover {
  background: #fff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.btn-random:active {
  transform: translateY(1px);
}

/* Modal Footer */
.modal-footer {
  margin-top: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.btn-reroll {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-reroll:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Shared Floating Button Styles */
.floating-btn {
  position: absolute;
  top: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(5px);
}

.floating-btn:hover {
  background: rgba(0, 242, 255, 0.1);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

/* Individual Positioning */
.btn-list {
  left: 2rem;
}

.btn-fullscreen {
  right: 2rem;
}

/* Responsive Portrait (Mobile) */
@media (max-width: 480px) and (orientation: portrait) {
  .logo {
    font-size: 2.5rem;
  }

  .header {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }

  .shuffle-card {
    padding: 2rem 1.5rem;
  }

  .shuffle-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
  }

  .shuffle-text {
    font-size: 1.5rem;
  }

  .btn-random {
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
  }

  /* Adjust floating buttons for mobile portrait */
  .floating-btn {
    top: 40px !important;
    /* Move down significantly to avoid notch/status bar overlap */
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
}

/* Footer Styling */
.footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.footer:hover {
  opacity: 1;
}

.footer .author {
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 1px;
}