body {
    background: linear-gradient(135deg, #1a2333 0%, #232a3a 50%, #1a2030 100%);
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: gentle-bg 30s ease infinite alternate;
}

@keyframes gentle-bg {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}
#titlebar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 24px;
    background: rgba(30,50,60,0.55);
    border-radius: 12px;
    box-shadow: 0 2px 16px #0006;
    padding: 8px 0 4px 0;
}
#titlebar h1 {
    font-size: 1.6em;
    margin: 0;
    color: #9be7c4;
    text-shadow: 0 2px 16px #00ffd966, 0 2px 8px #0008;
    letter-spacing: 2px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
}
#scoreboard {
    font-size: 1.7em;
    margin: 10px 0 10px 0;
    letter-spacing: 10px;
    background: rgba(30,50,60,0.45);
    border-radius: 10px;
    display: inline-block;
    padding: 6px 22px;
    box-shadow: 0 2px 12px #0005;
}
#point-mult {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.9em;
    vertical-align: middle;
    color: #ffe066;
    text-shadow: 0 1px 8px #ffe06688;
}
#modifiers-bar {
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 27px;
    max-width: 98vw;
    margin: 2px auto 8px auto;
    font-size: 0.93em;
    padding: 4px 6px;
    background: linear-gradient(135deg, #1f2230 0%, #1a1f2a 100%);
    border-radius: 10px;
    box-shadow: 0 6px 16px #0008, 0 0 0 1px #fff2;
    margin-bottom: 10px;
}
.modifier {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #2b3344cc 60%, #3e4a6a 100%);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 0.93em;
    margin: 0 2px;
    color: #fff;
    box-shadow: 0 1px 8px #0006, 0 0 0 1px #fff2;
    transition: background 0.2s, transform 0.08s;
    min-width: 0;
    width: fit-content;
    max-width: none;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 1px;
    animation: popin 0.4s cubic-bezier(.5,1.8,.5,1) forwards;
    will-change: transform;
}
.modifier.no-anim {
    animation: none !important;
}
@keyframes popin {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.modifier:hover { transform: translateY(-1px); }
.modifier i { margin-right: 6px; font-size: 1.05em; }
.modifier .mod-count {
    margin-left: 6px;
    background: #3c465f;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.95em;
    color: #9be7c4;
    font-weight: bold;
}

@media (max-width: 700px) {
    #modifiers-bar {
        order: 2;
        margin-bottom: 8px;
    }
}

#pong-boards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin: 0 auto 10px auto;
    width: 99vw;
    max-width: 1024px;
}
.pong-canvas {
    background: #111;
    border: 2px solid #fff;
    border-radius: 7px;
    display: inline-block;
    box-shadow: 0 2px 8px #0006;
}

#intro-screen {
    position: fixed;
    z-index: 200;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(20, 20, 32, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
}
.intro-content {
    background: #181c24;
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 0 40px #0008;
    padding: 22px 17px 10px 17px;
    max-width: 460px;
    margin: 0 12px;
}
.intro-content.ultra-fancy {
    background: rgba(24,28,36,0.95);
    border-radius: 28px;
    box-shadow: 0 0 60px rgba(0,255,180,0.15), 0 0 0 1px rgba(255,255,255,0.1);
    padding: 28px 24px 16px 24px;
    max-width: 580px;
    margin: 0 12px;
    border: 1.5px solid rgba(155,231,196,0.5);
    animation: popin 0.7s cubic-bezier(.5,1.6,.5,1) forwards;
    backdrop-filter: blur(10px);
}
.main-title {
    font-size: 2.1em;
    color: #9be7c4;
    text-shadow: 0 2px 24px #00ffd966, 0 2px 8px #0008;
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 800;
}
.intro-section {
    margin: 18px 0 18px 0;
    padding: 16px 0 0 0;
    border-top: 1.5px solid #2a2f3a;
    text-align: left;
}
.intro-section h2 {
    color: #ffe066;
    font-size: 1.15em;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 8px #ffe06688;
}
.intro-section ul {
    margin: 0 0 0 18px;
    padding-left: 18px;
    font-size: 1em;
}
.modifier-list-fancy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0 0;
    font-size: 1.05em;
    color: #cde;
}
.modifier-list-fancy span {
    background: rgba(44,54,74,0.7);
    border-radius: 8px;
    padding: 4px 10px;
    margin: 2px 0;
    box-shadow: 0 1px 6px #0004;
    font-weight: 500;
    letter-spacing: 1px;
}
.rebirth-bonus {
    display: inline-block;
    background: linear-gradient(90deg, #ffe066 60%, #9be7c4 100%);
    color: #222;
    border-radius: 7px;
    padding: 2px 10px;
    margin: 2px 0;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 1px 6px #ffe06644;
}
.intro-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 24px 0 0 0;
}
.intro-buttons button {
    font-size: 1.13em;
    background: linear-gradient(135deg, #274a64, #22506a 60%, #1f3850);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 32px;
    cursor: pointer;
    box-shadow: 0 3px 12px #0008, 0 0 0 1px #fff2;
    transition: transform 0.08s, filter 0.2s, box-shadow 0.2s;
    outline: none;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 1px 8px #00ffd966;
}
.intro-buttons button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px #00ffd933, 0 0 0 1px #fff2;
}
.intro-buttons button:active {
    transform: translateY(0) scale(0.98);
}
.tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.tab-btn {
  background: linear-gradient(135deg, #232a3a 60%, #2a3c5a 100%);
  color: #ffe066;
  border-radius: 12px 12px 0 0;
  padding: 12px 28px;
  font-size: 1.13em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px #0006, 0 0 0 1px #fff2;
  border: none;
  outline: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  letter-spacing: 1px;
  text-shadow: 0 1px 8px #ffe06688;
  margin-bottom: -2px;
  z-index: 2;
  position: relative;
}
.tab-btn.active, .tab-btn:hover {
  background: linear-gradient(135deg, #ffe066 60%, #9be7c4 100%);
  color: #232a3a;
  box-shadow: 0 6px 24px #ffe06644, 0 0 0 1.5px #ffe066;
  text-shadow: none;
}
.tab-content {
    display: none;
    background: rgba(24,28,36,0.92);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 0 30px rgba(0,255,180,0.12), 0 0 0 1px rgba(255,255,255,0.1);
    padding: 22px 16px 16px 16px;
    min-height: 100px;
    max-height: 60vh;
    overflow-y: auto;
    animation: popin 0.5s cubic-bezier(.5,1.8,.5,1) forwards;
}
.tab-content.active {
    display: block;
}
.modifier-chances-fancy ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-size: 1.08em;
}
.modifier-chances-fancy li {
  margin: 5px 0;
  padding: 6px 0 6px 0;
  background: linear-gradient(90deg, #232a3a 60%, #2a3c5a 100%);
  border-radius: 8px;
  color: #ffe066;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 6px #0004;
  padding-left: 18px;
}
.modifier-chances-fancy h3 {
  color: #9be7c4;
  margin: 12px 0 6px 0;
  font-size: 1.1em;
  text-shadow: 0 1px 8px #9be7c488;
}

#skills-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 8px 6px 12px 6px;
    max-width: 98vw;
    margin: 0 auto 10px auto;
    background: rgba(24,28,36,0.4);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.skill-btn {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #274a64, #22506a 60%, #1f3850);
  border-radius: 10px;
  padding: 8px 16px;
  color: #fff;
  font-size: 0.95em;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px #0006;
  position: relative;
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
  overflow: hidden;
}
.skill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #00ffd933;
}
.skill-btn.cooldown {
  opacity: 0.7;
  cursor: not-allowed;
}
.skill-btn i {
  margin-right: 8px;
  font-size: 1.1em;
}
.skill-name {
  font-weight: 500;
}
.skill-key {
  margin-left: auto;
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85em;
}
.cd-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  transition: height 0.1s;
}

#boost-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,20,20,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}
#boost-content {
    background: rgba(42,47,58,0.98);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 0 40px #00ffd933, 0 0 0 1px #fff2;
    padding: 32px 24px;
    font-size: 1.13em;
    text-align: center;
    outline: none;
    max-width: 400px;
}
#boost-content button {
    background: linear-gradient(135deg, #274a64, #22506a 60%, #1f3850);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1.08em;
    margin: 10px 0;
    box-shadow: 0 2px 12px #0008;
    transition: background 0.2s, box-shadow 0.2s;
    width: 100%;
}
#boost-content button:hover, #boost-content button:focus {
    background: #5ba987;
    box-shadow: 0 6px 24px #00ffd933;
}
.hidden {
    display: none !important;
}

/* Better buttons for Reset Modifiers and Hard Reset */
.action-button {
    border-radius: 8px;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    margin: 0 5px;
    color: #fff;
    transition: all 0.2s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.blue-button {
    background: linear-gradient(135deg, #2c5282, #2a4365);
}

.blue-button:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}

.red-button {
    background: linear-gradient(135deg, #c53030, #9b2c2c);
}

.red-button:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}
.menu-desc {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 1.08em;
    text-align: left;
    margin-bottom: 8px;
}
.menu-desc > div {
    padding: 2px 0;
}