*, *::before, *::after {
  box-sizing: border-box;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', sans-serif;
  background-color: #0c0714;
  color: #f1ecf7;
  position: fixed; /* Prevents scroll bounce on mobile Safari */
}

/* Background Glowing Elements */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(98, 0, 234, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(0, 184, 212, 0.15) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

/* Glassmorphism General Cards */
.glass-card {
  background: rgba(20, 14, 34, 0.7);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Overlay screens (Welcome / Game Over) */
.overlay-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background-color: rgba(6, 4, 10, 0.85);
  padding: 20px;
  overflow-y: auto;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.overlay-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Start Card Container */
.start-card {
  width: 100%;
  max-width: 950px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.6s ease-out;
}

.logo-text {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ff007f 0%, #7000ff 50%, #00ffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  text-shadow: 0px 5px 15px rgba(112, 0, 255, 0.3);
}

.subtitle {
  font-size: 1.1rem;
  color: #bfaecf;
  margin-bottom: 35px;
}

/* Selection Grid Layout */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  margin-bottom: 35px;
}

/* Individual Character Card */
.char-card {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.char-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Active Selected states */
.char-card.selected[data-char="hayel"] {
  border-color: #2ecc71;
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.05);
}
.char-card.selected[data-char="leen"] {
  border-color: #00ffff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
  background: rgba(0, 255, 255, 0.05);
}
.char-card.selected[data-char="dana"] {
  border-color: #ff007f;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.4);
  background: rgba(255, 0, 127, 0.05);
}

/* Character Avatar container */
.char-image-container {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background-color: #120b22;
  overflow: hidden;
}

.char-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.char-card:hover .char-avatar {
  transform: scale(1.08);
}

/* Age Badge */
.age-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.age-hayel { background: #2ecc71; }
.age-leen { background: #00b8d4; }
.age-dana { background: #ff007f; }

/* Sibling Info details */
.char-info {
  padding: 20px;
  text-align: left;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.char-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.class-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b59fcf;
  margin-bottom: 15px;
}

.char-card[data-char="hayel"] h2 { color: #2ecc71; }
.char-card[data-char="leen"] h2 { color: #00ffff; }
.char-card[data-char="dana"] h2 { color: #ff007f; }

/* Sibling statistics display */
.stats {
  margin-bottom: 15px;
}

.stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #bfaecf;
}

.stat-row span {
  width: 55px;
  font-weight: 600;
}

.stat-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-left: 8px;
}

.stat-bar .fill {
  height: 100%;
  border-radius: 4px;
}
.char-card[data-char="hayel"] .fill { background: #2ecc71; }
.char-card[data-char="leen"] .fill { background: #00ffff; }
.char-card[data-char="dana"] .fill { background: #ff007f; }

.desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #cfc2df;
  margin-top: auto;
}

/* Play Buttons */
.btn-primary {
  padding: 16px 45px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7000ff 0%, #b800ff 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(112, 0, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  letter-spacing: 1px;
}

.btn-primary:hover:not(.disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(112, 0, 255, 0.6);
  background: linear-gradient(135deg, #821fff 0%, #c41fff 100%);
}

.btn-primary:active:not(.disabled) {
  transform: translateY(-1px);
}

.btn-primary.disabled {
  background: #2a223a;
  color: #6a5e7d;
  cursor: not-allowed;
  box-shadow: none;
}

/* In-game Arena Container */
#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

/* Game Canvas styling */
#game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* HUD Overlay Styles */
#hud {
  position: absolute;
  top: 15px;
  left: 5%;
  right: 5%;
  height: 70px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none; /* Let clicks pass through HUD to game canvas if needed */
}

.hud-profile {
  display: flex;
  align-items: center;
  background: rgba(15, 10, 30, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 18px;
  border-radius: 40px;
  min-width: 180px;
  max-width: 260px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hud-avatar-frame {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  background-color: #120b22;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.hud-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hud-details {
  flex-grow: 1;
  margin: 0 10px;
}

.text-right {
  text-align: right;
}

.hud-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.health-bar-container {
  height: 10px;
  width: 100%;
  max-width: 120px;
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  background: #2ecc71; /* Player starts green, updates in JS based on HP */
  border-radius: 5px;
  transition: width 0.15s ease-out;
}

/* Versus Label in Middle */
.versus-label {
  font-size: 1.4rem;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  text-shadow: 0 0 8px rgba(112, 0, 255, 0.8);
  margin: 0 15px;
}

/* Enemies Group (Flex container) */
.enemies-hud {
  display: flex;
  gap: 15px;
}

.enemy-hud {
  border-color: rgba(255, 0, 127, 0.15);
}

.enemy-fill {
  background: #ff3366; /* Red-ish/pink for enemies */
}

/* Game Announcer Label */
#announcer-text {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  z-index: 10;
  font-size: 2.2rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 1px;
  color: #ffea33;
  text-shadow: 0 0 12px rgba(255, 234, 51, 0.5), 0 4px 8px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

#announcer-text.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Sound & In-game Settings utility buttons */
.sound-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  z-index: 110;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.sound-toggle:hover {
  background: rgba(15, 10, 30, 0.8);
  transform: scale(1.05);
}

.fullscreen-toggle {
  position: fixed;
  top: 15px;
  right: 70px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  z-index: 110;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.fullscreen-toggle:hover {
  background: rgba(15, 10, 30, 0.8);
  transform: scale(1.05);
}

.btn-secondary-hud {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  cursor: pointer;
  pointer-events: auto; /* HUD wrapper disables pointer-events, let this button receive clicks */
  z-index: 11;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.btn-secondary-hud:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Super Power Button */
.btn-super {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 10, 30, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 150px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-super .super-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.btn-super .super-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.btn-super .super-charge-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.btn-super .super-charge-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7000ff, #ff007f);
  border-radius: 3px;
  transition: width 0.15s ease-out;
}

.btn-super.charging {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-super.ready {
  opacity: 1;
  border-color: rgba(255, 0, 127, 0.6);
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.35), 0 0 40px rgba(112, 0, 255, 0.2);
  animation: superPulse 1.2s ease-in-out infinite;
}

.btn-super.ready .super-charge-fill {
  background: linear-gradient(90deg, #2ecc71, #00e5ff, #ff4081);
}

@keyframes superPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.35), 0 0 40px rgba(112, 0, 255, 0.2);
    transform: translateX(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 0, 127, 0.55), 0 0 60px rgba(112, 0, 255, 0.35);
    transform: translateX(-50%) scale(1.06);
  }
}

.btn-super:active:not(.charging) {
  transform: translateX(-50%) scale(0.95);
}

/* Result Overlay card */
.result-card {
  width: 100%;
  max-width: 450px;
  padding: 35px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#result-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffea33;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(255, 234, 51, 0.4);
}

#result-subtitle {
  color: #bfaecf;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.result-stats {
  display: flex;
  gap: 15px;
  width: 100%;
  margin-bottom: 30px;
}

.result-stat-box {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-stat-box .label {
  font-size: 0.75rem;
  color: #8c7ba0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.result-stat-box .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.result-card .btn-primary {
  width: 100%;
  margin-bottom: 12px;
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #bfaecf;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Media Queries (Portrait) */
@media (max-width: 900px) {
  .start-card {
    padding: 25px;
  }
  .logo-text {
    font-size: 2.1rem;
  }
  .subtitle {
    margin-bottom: 25px;
    font-size: 0.95rem;
  }
  .selection-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
  }
  .char-card {
    flex-direction: row;
    align-items: center;
    padding: 10px;
  }
  .char-image-container {
    width: 80px;
    height: 80px;
    padding-top: 0;
    border-radius: 12px;
    flex-shrink: 0;
  }
  .char-info {
    padding: 0 0 0 15px;
  }
  .char-info h2 {
    font-size: 1.3rem;
  }
  .class-title {
    margin-bottom: 5px;
  }
  .desc {
    display: none; /* Hide descriptions on narrow mobile screens to fit selection grid */
  }
  .age-badge {
    bottom: 4px;
    right: 4px;
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  .stats {
    display: none; /* Hide stat bars on narrow mobile to keep list compact */
  }
  #hud {
    top: 55px; /* push down to clear system/notch overlays or back button */
    left: 6px;
    right: 6px;
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .hud-profile {
    min-width: 0;
    max-width: none;
    padding: 4px 8px;
    flex: 1 1 0;
  }
  .player-hud {
    flex: 1 1 auto;
    max-width: 40%;
  }
  .hud-avatar-frame {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
  .hud-details {
    min-width: 0;
  }
  .hud-name {
    font-size: 0.7rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .health-bar-container {
    width: 100%;
    height: 6px;
  }
  .versus-label {
    font-size: 0.85rem;
    margin: 0 3px;
    flex-shrink: 0;
  }
  .enemies-hud {
    gap: 6px;
    flex: 1 1 auto;
    max-width: 55%;
  }
  .enemy-hud {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (orientation: landscape) {
  /* Dynamic viewport fitting start card */
  .overlay-screen {
    overflow-y: auto; /* Enable scroll if viewport is extremely tight */
    padding: 1vh 1vw;
  }
  .start-card {
    max-width: 95vw;
    min-height: 96vh; /* Take full height but allow growing and scrolling */
    padding: 2vh 3vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    margin: auto;
  }
  .logo-text {
    font-size: min(1.8rem, 5vh);
    margin: 0;
    line-height: 1.2;
  }
  .subtitle {
    display: none !important; /* Hide subtitle to save vertical space */
  }
  .selection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5vw;
    margin-bottom: 0.5vh;
    width: 100%;
    max-height: 38vh;
  }
  .char-card {
    flex-direction: row;
    align-items: center;
    padding: 1vh 1.5vw;
    gap: 1vw;
    border-radius: 12px;
    height: 100%;
  }
  .char-image-container {
    width: min(55px, 12vh) !important;
    height: min(55px, 12vh) !important;
    padding-top: 0 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }
  .char-avatar {
    border-radius: 50%;
    position: static;
    width: 100%;
    height: 100%;
  }
  .age-badge {
    display: none !important;
  }
  .char-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .char-info h2 {
    font-size: min(1.2rem, 3.5vh);
    margin: 0;
  }
  .class-title, .desc, .stats {
    display: none !important; /* Hide details in landscape */
  }
  .btn-primary {
    padding: 1vh 3vw;
    font-size: min(1rem, 3vh);
    margin-top: 0.5vh !important;
  }

  /* Theme selection adjustments inside landscape */
  .section-title {
    font-size: min(0.9rem, 3vh);
    margin-top: 0.5vh;
    margin-bottom: 0.5vh;
  }
  .theme-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1vw;
    margin-bottom: 0.5vh;
    width: 100%;
  }
  .theme-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1vh 0.5vw;
    gap: 0.5vh;
    border-radius: 10px;
  }
  .theme-icon {
    font-size: min(1.3rem, 4vh);
    margin: 0;
  }
  .theme-info {
    text-align: center;
  }
  .theme-info h3 {
    font-size: min(0.75rem, 2.2vh);
    margin: 0;
  }
  .theme-info p {
    display: none !important;
  }

  /* In-game UI tweaks for landscape */
  #hud {
    top: 5px;
    left: 10px;
    right: 10px;
    height: auto;
    padding-left: 110px; /* Offset to leave space for "Quit to Menu" button on the left */
    justify-content: flex-start;
    gap: 10px;
  }
  .versus-label {
    display: none; /* Hide VS text in compact landscape to save space */
  }
  .hud-profile {
    padding: 3px 8px;
    min-width: 0;
    max-width: 130px;
    border-radius: 20px;
    flex: 0 1 auto;
  }
  .player-hud {
    max-width: 130px;
  }
  .enemies-hud {
    gap: 8px;
    flex: 0 1 auto;
    max-width: 280px;
  }
  .enemy-hud {
    max-width: 130px;
  }
  .hud-avatar-frame {
    width: 22px;
    height: 22px;
  }
  .hud-name {
    font-size: 0.65rem;
    margin-bottom: 1px;
  }
  .health-bar-container {
    height: 5px;
  }
  .btn-secondary-hud {
    top: 5px;
    left: 10px;
    padding: 5px 12px;
    font-size: 0.75rem;
  }
  .btn-super {
    bottom: 10px;
    padding: 6px 16px;
    font-size: 0.8rem;
    min-width: 120px;
    gap: 2px;
  }
  .btn-super .super-emoji {
    font-size: 1.1rem;
  }
  .btn-super .super-label {
    font-size: 0.6rem;
  }
}

/* Arena Theme Selector styling */
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #bfaecf;
  margin-top: 25px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 25px;
}

.theme-card {
  min-width: 0; /* Prevent horizontal container overflow */
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.theme-card.selected {
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.07);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.theme-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.theme-info {
  min-width: 0;
}

.theme-info h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #fff;
}

.theme-info p {
  font-size: 0.7rem;
  color: #bfaecf;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile responsive for themes */
@media (max-width: 900px) {
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .theme-card {
    min-width: 0; /* Prevent horizontal container overflow */
    padding: 8px;
    gap: 8px;
  }
}
/* Redundant media query removed, consolidated to single landscape media query */

