@font-face {
  font-family: "Inter";
  src: url("/fonts/inter/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter/Inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter/Inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Orbitron";
  src: url("/fonts/orbitron/Orbitron-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Orbitron";
  src: url("/fonts/orbitron/Orbitron-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

.game-duck-count {
bottom: 6px;
right: 4px;
color: #fff;
padding: 4px 8px;
border-radius: 5px;
font-size: 0.7rem;
font-weight: 600;
text-align: center;
}

body.light .game-mode-display {
background: rgba(0, 0, 0, 0.7);
color: #fff;
}

.duck-wrapper {
position: absolute;
left: 0;
will-change: transform;
display: flex;
align-items: center;
z-index: 10;
}

.duck {
transition: none;
}

.duck-name {
position: absolute;
top: -18px;
left: 0;
color: white;
font-size: 0.65rem;
padding: 2px 5px;
border-radius: 3px;
font-weight: 500;
z-index: 20;
max-width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transform: translateZ(0); 
}

.duck-name.winner {
background: linear-gradient(to right, #d97706, #facc15);
color: white;
font-weight: bold;
}

.start-line {
position: absolute;
top: -20px;
bottom: 0;
left: 40px; 
background-size: 16px 16px;
z-index: 5;
display: flex;
justify-content: center;
align-items: center;
color: yellow;
font-weight: bold;
font-size: 12px;
writing-mode: vertical-rl; 
text-orientation: mixed;
font-family: "Orbitron", sans-serif;
}

.start-line::after {
content: "START";
position: absolute;
top: 0;
left: 0;
color: #fff;
font-weight: 900;
font-size: 20px;
white-space: nowrap;
background: #0c28557a;
padding: 10px 4px;
height: 100%;
text-align: center;
}

.finish-line {
position: absolute;
top: -20px;
bottom: 0;
left: 40px; 
width: 10px;
background-image: linear-gradient(
45deg,
#fff 25%,
#000 25%,
#000 50%,
#fff 50%,
#fff 75%,
#000 75%,
#000
);
background-size: 25px 25px;
z-index: 5;
display: flex;
justify-content: center;
align-items: center;
color: yellow;
font-weight: bold;
font-size: 12px;
writing-mode: vertical-rl; 
text-orientation: mixed;
font-family: "Orbitron", sans-serif;
}

.effect-icon {
font-size: 1.4rem;
margin-left: 6px;
animation: popUp 0.8s ease-in-out forwards;
pointer-events: none;
will-change: transform, opacity;
}

@keyframes popUp {
0% {
transform: scale(0.5) translateY(0);
opacity: 0;
}

50% {
transform: scale(1.2) translateY(-8px);
opacity: 1;
}

100% {
transform: scale(1) translateY(-24px);
opacity: 0;
}
}

.duck-dance {
animation: dance 0.25s infinite alternate ease-in-out;
}

@keyframes dance {
from {
transform: rotate(6deg) translateY(-4px);
}

to {
transform: rotate(-6deg) translateY(-4px);
}
}

.duck-freeze {
filter: brightness(0.7) sepia(0.3) hue-rotate(180deg);
}

@keyframes freeze-shake {
from {
transform: translateX(-1.5px);
}

to {
transform: translateX(1.5px);
}
}

.duck-blackhole {
animation: blackhole-spin 0.5s linear infinite;
transition: transform 0.5s ease, opacity 0.5s ease;
}

@keyframes blackhole-spin {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}

.blackhole {
position: absolute;
width: 30px;
height: 30px;
background: radial-gradient(circle, #000 30%, transparent 70%);
border-radius: 50%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
z-index: 8;
animation: blackhole-pulse 1.5s infinite;
will-change: transform;
}

@keyframes blackhole-pulse {
0% {
transform: scale(1);
}

50% {
transform: scale(1.2);
}

100% {
transform: scale(1);
}
}

.countdown {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 900;
font-size: 8rem;
z-index: 60;
text-transform: uppercase;
letter-spacing: 2px;
color: #fff;
text-shadow: 0 0 10px rgba(255, 230, 0, 0.9), 0 0 30px rgba(255, 200, 0, 0.7),
0 0 60px rgba(255, 180, 0, 0.4);
animation: countdownPulse 1s ease-in-out forwards;
font-family: "Orbitron", sans-serif;
}

.shuffle-status {
text-transform: uppercase;
top: 50%;
left: 50%;
font-weight: 900;
letter-spacing: 2px;
color: #fff;
text-shadow: 0 0 10px rgba(255, 230, 0, 0.9), 0 0 30px rgba(255, 200, 0, 0.7),
0 0 60px rgba(255, 180, 0, 0.4);
font-family: "Orbitron", sans-serif;
}

@keyframes countdownPulse {
0% {
transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
opacity: 0;
text-shadow: 0 0 0 rgba(255, 230, 0, 0.5), 0 0 10px rgba(255, 180, 0, 0.2);
}

30% {
transform: translate(-50%, -50%) scale(1.3) rotate(10deg);
opacity: 1;
text-shadow: 0 0 20px rgba(255, 230, 0, 1), 0 0 40px rgba(255, 200, 0, 0.8),
0 0 80px rgba(255, 150, 0, 0.6);
}

70% {
transform: translate(-50%, -50%) scale(1) rotate(0deg);
opacity: 1;
}

100% {
transform: translate(-50%, -50%) scale(0.9);
opacity: 0;
text-shadow: 0 0 5px rgba(255, 230, 0, 0.3), 0 0 15px rgba(255, 180, 0, 0.1);
}
}

.death-message {
position: absolute;
top: 10px;
left: 50%;
transform: translateX(-50%);
background: rgba(255, 0, 0, 0.8);
color: white;
padding: 5px 10px;
border-radius: 5px;
font-size: 0.9rem;
z-index: 60;
animation: fadeOut 3s ease-in-out forwards;
}

@keyframes fadeOut {
0% {
opacity: 1;
}

80% {
opacity: 1;
}

100% {
opacity: 0;
}
}

.tooltip {
position: relative;
}

.tooltip:hover .tooltip-text,
.tooltip.active .tooltip-text {
visibility: visible;
opacity: 1;
}

.tooltip-text {
visibility: hidden;
opacity: 0;
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: #1f2937;
color: white;
padding: 8px;
border-radius: 4px;
font-size: 0.8rem;
width: 200px;
text-align: center;
z-index: 100;
transition: opacity 0.2s ease-in-out;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.light .tooltip-text {
background: #e0e0e0;
color: #202124;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
.countdown {
font-size: 4rem;
}

.duck-name {
font-size: 0.55rem;
max-width: 60px;
}

.race-track {
padding: 0.75rem;
}

.death-message {
font-size: 0.75rem;
}

.tooltip-text {
width: 150px;
font-size: 0.7rem;
}

.game-mode-display,
.game-duck-count {
font-size: 0.7rem;
padding: 4px 8px;
}

.race-track:fullscreen .start-line {
width: 38px !important;
background-size: 16px 16px !important;
}

.race-track:fullscreen .finish-line {
width: 20px !important;
}

.race-track:fullscreen .duck-rank-badge {
left: -15px !important;
font-size: 25px !important;
}

.race-track:fullscreen .start-line:after {
font-size: 20px !important;
left: 0 !important;
}

.race-track:fullscreen .game-mode-display {
font-size: 0.8rem !important;
}

.race-track:fullscreen .game-duck-count {
font-size: 0.8rem !important;
bottom: 40px !important;
}

.race-track:fullscreen .duck-name {
font-size: 0.7rem !important;
padding: 0px 8px !important;
border-radius: 8px !important;
max-width: 150px !important;
top: -20px !important;
}

.race-track:fullscreen button {
font-size: 0.8rem !important;
padding: 10px 18px !important;
transform: scale(1.2) translate(-50%, -50%) !important;
font-weight: bold;
}

.race-track:fullscreen .timer {
font-size: 0.8rem !important;
top: 14px !important;
right: 75px !important;
width: 70px !important;
padding: 8px 10px !important;
}

.race-track:fullscreen .countdown {
font-size: 10rem !important;
font-weight: bold;
}

.race-track:fullscreen .duck img {
transform: scale(1.25);
transform-origin: left center;
}

.race-track:fullscreen .fullscreen {
right: -10px;
font-size: 0.8rem !important;
padding: 6px 10px !important;
}

.race-track:fullscreen .settings,
.race-track:fullscreen .custom-race,
.race-track:fullscreen .shuffle-name,
.race-track:fullscreen .sort-az,
.race-track:fullscreen .shuffle-skins {
right: -10px;
font-size: 0.8rem !important;
padding: 6px 10px !important;
}

.race-track:fullscreen .effect-icon {
font-size: 4rem;
margin-left: 10px;
animation: popUp 0.8s ease-in-out forwards;
pointer-events: none;
}

.race-track:fullscreen .death-message {
font-size: 1.3rem;
text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.race-track:fullscreen .blackhole {
transform: scale(1.5);
filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
transition: transform 0.3s ease;
}

.race-track:fullscreen .effect-icon {
font-size: 2rem !important;
transform: scale(1.5);
transition: transform 0.3s ease;
}

.race-track:fullscreen .stop svg,
.race-track:fullscreen .pause svg {
width: 30px;
height: 30px;
}

.race-track:fullscreen .stop,
.race-track:fullscreen .pause {
transform: scale(1.5);
top: 35px !important;
font-size: 0.8rem !important;
padding: 0px 6px !important;
}

.race-track:fullscreen .stop {
right: 132px !important;
}

.race-track:fullscreen .pause {
right: 190px !important;
}
}

.space-y-8 > * + * {
margin-top: 2rem;
}

.max-w-5xl {
max-width: 64rem;
}

.max-w-md {
max-width: 28rem;
}

.p-6 {
padding: 1.5rem;
}

.sm\:p-8 {
padding: 2rem;
}

.arrange-input {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}

.arrange-input input[type="text"] {
flex-grow: 1;
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #4b5563;
transition: background 0.3s ease, color 0.3s ease;
}

body.dark .arrange-input input[type="text"] {
background: #1f2937;
color: white;
}

body.light .arrange-input input[type="text"] {
background: #f5f7fa;
color: #202124;
}

.arrange-input input[type="text"]:disabled {
background: #2d3748;
cursor: not-allowed;
opacity: 0.5;
}

body.light .arrange-input input[type="text"]:disabled {
background: #d1d5db;
}

.arrange-input input[type="file"] {
width: 100px;
font-size: 0.75rem;
}

.arrange-input input[type="file"]:disabled {
cursor: not-allowed;
opacity: 0.5;
}

.arrange-input button {
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #4b5563;
transition: background 0.3s ease, color 0.3s ease;
}

body.dark .arrange-input button {
background: #374151;
color: white;
}

body.light .arrange-input button {
background: #e0e0e0;
color: #202124;
}

.arrange-input button:hover:not(:disabled) {
background: #4b5563;
}

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

.color-button {
width: 32px;
height: 32px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.375rem;
border: 1px solid #4b5563;
cursor: pointer;
transition: all 0.2s ease;
font-size: 1.1rem;
}

body.dark .color-button {
background: #374151;
}

body.light .color-button {
background: #e0e0e0;
}

.color-button:hover:not(:disabled) {
background: #4b5563;
transform: scale(1.1);
}

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

.color-input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}

.color-input:disabled {
cursor: not-allowed;
}

.timer {
position: absolute;
top: 5px;
right: 44px;
background: rgba(0, 0, 0, 0.8);
color: white;
padding: 5px 10px;
border-radius: 5px;
font-size: 0.9rem;
font-weight: 600;
z-index: 50;
min-width: 60px;
width: 60px;
text-align: center;
}

body.light .timer {
background: rgba(0, 0, 0, 0.5);
color: #fff;
}

.hamburger {
cursor: pointer;
padding: 0.5rem;
margin-left: 0.5rem;
}

.dropdown {
position: absolute;
top: 100%;
right: 0;
background: #1f2937;
border-radius: 0.25rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
min-width: 150px;
z-index: 1000;
display: none;
}

body.light .dropdown {
background: #f5f7fa;
}

.dropdown.active {
display: block;
}

.dropdown-item {
padding: 0.5rem 1rem;
color: white;
cursor: pointer;
display: flex;
align-items: center;
}

body.light .dropdown-item {
color: #202124;
}

.dropdown-item:hover {
background: #374151;
}

body.light .dropdown-item:hover {
background: #e0e0e0;
}

.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 2000;
align-items: center;
justify-content: center;
}

.modal.active {
display: flex;
}

.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 9000;
animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

.modal-content {
background: white;
border-radius: 16px;
padding: 1.5rem;
max-width: 600px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
animation: slideUp 0.3s ease;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.dark .modal-content {
background: #1f2937a8;
color: #f9fafb;
}

.modal-content h2 {
font-size: 1.25rem;
margin-bottom: 1rem;
}

.modal-content table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1rem;
}

.modal-content th,
.modal-content td {
padding: 0.5rem;
text-align: left;
border-bottom: 1px solid #4b5563;
}

body.light .modal-content th,
body.light .modal-content td {
border-bottom: 1px solid #d1d5db;
}

.modal-content .effect-buttons {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1rem;
}

.modal-content .effect-buttons button {
padding: 0.5rem 1rem;
border-radius: 0.25rem;
background: #4b5563;
color: white;
border: none;
cursor: pointer;
font-size: 0.9rem;
}

.modal-content .effect-buttons button:hover {
background: #374151;
}

.modal-content .effect-buttons button.active {
background: #facc15;
color: black;
}

.modal-content button.close {
width: 100%;
padding: 0.5rem 1rem;
border-radius: 0.25rem;
background: #dc2626;
color: white;
border: none;
cursor: pointer;
}

.modal-content button.close:hover {
background: #b91c1c;
}

@media (max-width: 640px) {
.modal-content {
width: 95%;
padding: 1rem;
}

.modal-content h2 {
font-size: 1.1rem;
}

.modal-content th,
.modal-content td {
font-size: 0.8rem;
padding: 0.4rem;
}

.modal-content .effect-buttons button {
font-size: 0.8rem;
padding: 0.4rem 0.8rem;
}
}

.effect-details-button {
cursor: pointer;
color: #facc15;
font-weight: bold;
padding: 0 4px;
}

.effect-details-button:hover {
color: #d97706;
}

.disabled-tab {
opacity: 0.5;
pointer-events: none;
}

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

textarea:disabled,
select:disabled,
input[type="range"]:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.max-h-48 {
max-height: 20rem;
}

.arrange-input input[type="text"] {
min-width: 80px;
}

.color-picker-label {
transition: transform 0.3s ease;
}

.color-picker-label.rotate-180 {
transform: rotate(90deg);
}

.color-input {
z-index: 10;
}

.scrollbar-thin::-webkit-scrollbar {
width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
background: #9ca3af;
border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
background: #6b7280;
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb {
background: #4b5563;
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb:hover {
background: #6b7280;
}

@keyframes modalPop {
from {
transform: scale(1);
opacity: 0;
}

to {
transform: scale(1);
opacity: 1;
}
}

.animate-in {
animation: modalPop 0.25s ease-out;
}

.game-blurred {
filter: blur(4px);
pointer-events: none;
}

.race-title {
transition: all 0.2s ease;
}

.race-title:hover {
text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.modal-content {
animation: modalPop 0.25s ease-out;
}

.scrollbar-thin {
scrollbar-width: thin;
}

.scrollbar-thin::-webkit-scrollbar {
width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
background: #a0aec0;
border-radius: 3px;
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb {
background: #4a5568;
}

.slider-green {
-webkit-appearance: none;
height: 6px;
border-radius: 3px;
outline: none;
cursor: pointer;
transition: all 0.2s;
}

body.light .slider-green {
background: #e5e7eb;
}

body.dark .slider-green {
background: #374151;
}

.slider-green:disabled {
opacity: 0.4;
cursor: not-allowed;
}

.slider-green::-webkit-slider-thumb {
-webkit-appearance: none;
width: 18px;
height: 18px;
background: #3b82f6; 
border-radius: 50%;
cursor: pointer;
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); 
transition: all 0.2s ease;
}

.slider-green:hover:not(:disabled)::-webkit-slider-thumb {
background: #2563eb; 
box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3); 
transform: scale(1.15);
}

input[type="checkbox"],
input[type="radio"] {
accent-color: #3b82f6;
cursor: pointer;
transition: transform 0.2s;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
transform: scale(1.1);
}

button[title="Fullscreen"],
button[title="Exit fullscreen"] {
transition: transform 0.2s ease, background-color 0.2s ease;
}

.toast {
position: fixed;
bottom: 2rem;
right: 2rem;
background: #1f2937;
color: white;
padding: 0.5rem 1.5rem;
border-radius: 12px;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
z-index: 9999;
animation: toastSlide 0.3s ease;
font-weight: 500;
}

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

.toast.success {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 9000;
animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

/* Modal Content */
@keyframes popUp {
0% {
transform: scale(0.8);
opacity: 0;
}

100% {
transform: scale(1);
opacity: 1;
}
}

.modal-title {
font-size: 18px;
font-weight: 700;
margin-bottom: 10px;
}

.modal-desc {
font-size: 14px;
color: #555;
margin-bottom: 10px;
}

.share-input {
width: 100%;
padding: 8px;
border: 2px solid #ccc;
border-radius: 6px;
margin-bottom: 10px;
font-size: 13px;
text-align: center;
background: #f9f9f9;
}

.modal-note {
font-size: 12px;
color: #666;
margin-top: 6px;
}

.btn-copy {
background: #28a745;
color: white;
border: none;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
width: 100%;
margin-bottom: 6px;
}

.btn-copy:hover {
background: #23963f;
}

.btn-close {
background: #007bff;
color: white;
border: none;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
width: 100%;
}

.btn-close:hover {
background: #0069d9;
}

.race-track {
min-height: 300px !important;
}

.race-track:fullscreen {
width: 100vw !important;
height: 100vh !important;
max-width: none !important;
}

.race-track:fullscreen .finish-line,
.race-track:fullscreen .start-line {
width: 30px;
background-size: 50px 50px;
}

.race-track:fullscreen .start-line:after {
font-size: 35px;
left: 70px;
}

.race-track:fullscreen .game-mode-display {
bottom: 10px;
right: 10px;
font-size: 1.5rem;
}

.race-track:fullscreen .game-duck-count {
bottom: 60px;
right: 10px;
font-size: 1.5rem;
width: 125px;
}

.race-track:fullscreen .duck-name {
font-size: 1.1rem;
padding: 0px 8px;
border-radius: 8px;
max-width: 150px;
top: -30px;
left: 10px;
}

.race-track:fullscreen button {
font-size: 1.1rem;
padding: 6px 10px;
transform: scale(1.2) translate(-50%, -50%);
font-weight: bold;
}

.race-track:fullscreen .timer {
font-size: 1.5rem;
font-weight: bold;
top: 10px;
right: 80px;
width: 120px;
padding: 0px 10px;
}

.race-track:fullscreen .countdown {
font-size: 10rem;
font-weight: bold;
}

.race-track:fullscreen .duck img {
transform: scale(1.25);
transform-origin: left center;
}

.race-track:fullscreen .fullscreen {
top: 30px;
}

.race-track:fullscreen .settings {
top: 80px;
}

.race-track:fullscreen .custom-race {
top: 130px;
}

.race-track:fullscreen .shuffle-name {
top: 180px;
}

.race-track:fullscreen .sort-az {
top: 230px;
}

.race-track:fullscreen .shuffle-skins {
top: 280px;
}

.race-track:fullscreen .effect-icon {
font-size: 4rem;
margin-left: 10px;
animation: popUp 0.8s ease-in-out forwards;
pointer-events: none;
}

.race-track:fullscreen .death-message {
font-size: 1.3rem;
text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.race-track:fullscreen .blackhole {
transform: scale(1.5);
filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
transition: transform 0.3s ease;
}

.race-track:fullscreen .effect-icon {
font-size: 2rem !important;
transform: scale(1.5);
transition: transform 0.3s ease;
}

.race-track .stop,
.race-track .pause {
padding: 6px 10px;
top: 5px;
}

.race-track .stop {
right: 110px;
}

.race-track .pause {
right: 160px;
}

.race-track .stop svg,
.race-track .pause svg {
width: 20px;
height: 20px;
}

.race-track:fullscreen .stop,
.race-track:fullscreen .pause {
transform: scale(1.25);
top: 13px;
}

.race-track:fullscreen .stop {
right: 215px;
padding: 4px 10px;
}

.race-track:fullscreen .pause {
right: 275px;
padding: 4px 10px;
}

.badge-count {
position: absolute;
right: -4px;
color: #fff;
font-size: 10px;
font-weight: bold;
padding: 0px 8px;
border-radius: 12px;
top: 8px;
}

@keyframes shuffleBounce {
0% {
transform: translate(-50%, -50%) scale(0.5);
opacity: 0;
}
50% {
transform: translate(-50%, -50%) scale(1.3);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(1);
opacity: 0;
}
}

.animate-shuffle {
animation: shuffleBounce 0.7s ease forwards;
}

.toggle-btn {
position: fixed;
bottom: 1rem;
right: 1rem;
color: white;
padding: 0.5rem 1rem;
border-radius: 9999px;
box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
cursor: pointer;
transition: all 0.2s ease;
z-index: 40;
font-weight: 600;
font-size: 0.875rem;
display: flex;
align-items: center;
gap: 0.5rem;
border: none;
}

.toggle-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(59, 130, 246, 0.4);
}

.btn-primary {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: white;
font-weight: 600;
border-radius: 8px;
border: none;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled),
.btn-slate:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled,
.btn-slate:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.duck-rank-badge {
position: absolute;
left: -15px; 
top: 50%;
transform: translateY(-50%);
font-size: 25px;
display: flex;
align-items: center;
justify-content: center;
z-index: 50;
pointer-events: none;
}

.race-track:fullscreen .duck-rank-badge {
left: -25px;
font-size: 50px;
}

.transform-gpu {
transform: translateZ(0);
backface-visibility: hidden;
perspective: 1000;
}

.overflow-y-auto::-webkit-scrollbar {
width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.3);
border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.5);
}


/* 1. Soccer Field*/
.race-track.soccer-field {
background: linear-gradient(to right, #22c55e, #16a34a);
position: relative;
}

.race-track.soccer-field::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
pointer-events: none;
}

.race-track.soccer-field::after {
content: "";
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 2px;
height: 100%;
background: rgba(255, 255, 255, 0.3);
pointer-events: none;
}

/**********************************/
/* 2. Racing Track*/
.race-track.racing-track {
background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
position: relative;
}

.race-track.racing-track::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
background-image: repeating-linear-gradient(
0deg,
transparent,
transparent 19%,
rgba(255, 255, 255, 0.1) 19%,
rgba(255, 255, 255, 0.1) 20%
);
pointer-events: none;
}

.race-track.racing-track::after {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
transform: translateY(-50%);
height: 3px;
background: repeating-linear-gradient(
90deg,
#fbbf24 0px,
#fbbf24 30px,
transparent 30px,
transparent 60px
);
pointer-events: none;
}

/**********************************/
/* 3.  Classic Grass*/
.race-track.classic-grass {
background: repeating-linear-gradient(
90deg,
#15803d 0px,
#15803d 50px,
#166534 50px,
#166534 100px
);
position: relative;
}

/* 4. Basketball Court */
.race-track.basketball-court {
background: linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #c2410c 100%);
position: relative;
}

.race-track.basketball-court::before {
content: "";
position: absolute;
top: 5%;
left: 5%;
right: 5%;
bottom: 5%;
border: 3px solid rgba(255, 255, 255, 0.6);
pointer-events: none;
}

.race-track.basketball-court::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 120px;
height: 120px;
border: 3px solid rgba(255, 255, 255, 0.6);
border-radius: 50%;
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1),
0 0 0 60px rgba(255, 255, 255, 0.05);
pointer-events: none;
}

/* 5. Tennis Court */
.race-track.tennis-court {
background: linear-gradient(to bottom, #7c2d12, #991b1b);
position: relative;
}

.race-track.tennis-court::before {
content: "";
position: absolute;
top: 8%;
left: 10%;
right: 10%;
bottom: 8%;
border: 2px solid rgba(255, 255, 255, 0.7);
pointer-events: none;
box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.1);
}

.race-track.tennis-court::after {
content: "";
position: absolute;
top: 8%;
bottom: 8%;
left: 50%;
transform: translateX(-50%);
width: 2px;
background: rgba(255, 255, 255, 0.7);
pointer-events: none;
box-shadow: -150px 0 0 rgba(255, 255, 255, 0.4),
150px 0 0 rgba(255, 255, 255, 0.4),
0 calc(50% - 4%) 0 100px rgba(255, 255, 255, 0.7);
}

/* 6. Ice Rink */
.race-track.ice-rink {
background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #e0f2fe 100%);
position: relative;
}

.race-track.ice-rink::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 140px;
height: 140px;
border: 4px solid #2563eb;
border-radius: 50%;
opacity: 0.4;
pointer-events: none;
box-shadow: 0 0 0 2px #93c5fd, inset 0 0 20px rgba(37, 99, 235, 0.1);
}

.race-track.ice-rink::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: repeating-linear-gradient(
0deg,
transparent 0,
transparent calc(20% - 1px),
rgba(37, 99, 235, 0.15) calc(20% - 1px),
rgba(37, 99, 235, 0.15) calc(20% + 1px)
),
linear-gradient(
90deg,
transparent 0%,
transparent 15%,
rgba(220, 38, 38, 0.3) 15%,
rgba(220, 38, 38, 0.3) 16%,
transparent 16%,
transparent 30%,
rgba(37, 99, 235, 0.3) 30%,
rgba(37, 99, 235, 0.3) 31%,
transparent 31%,
transparent 69%,
rgba(37, 99, 235, 0.3) 69%,
rgba(37, 99, 235, 0.3) 70%,
transparent 70%,
transparent 84%,
rgba(220, 38, 38, 0.3) 84%,
rgba(220, 38, 38, 0.3) 85%,
transparent 85%
);
pointer-events: none;
}

/* 7. Dance Floor */
.race-track.dance-floor {
background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000000 100%);
position: relative;
overflow: hidden;
}

.race-track.dance-floor::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(
circle at 25% 25%,
rgba(236, 72, 153, 0.6) 0%,
transparent 25%
),
radial-gradient(circle at 75% 30%, rgba(59, 130, 246, 0.6) 0%, transparent 25%),
radial-gradient(circle at 50% 70%, rgba(250, 204, 21, 0.6) 0%, transparent 25%),
radial-gradient(circle at 15% 75%, rgba(139, 92, 246, 0.6) 0%, transparent 25%),
radial-gradient(circle at 85% 80%, rgba(34, 197, 94, 0.6) 0%, transparent 25%);
pointer-events: none;
animation: disco-spin 4s ease-in-out infinite;
filter: blur(20px);
}

.race-track.dance-floor::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(
circle at 60% 50%,
rgba(239, 68, 68, 0.5) 0%,
transparent 20%
),
radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.5) 0%, transparent 20%),
radial-gradient(circle at 70% 75%, rgba(34, 211, 238, 0.5) 0%, transparent 20%);
pointer-events: none;
animation: disco-pulse 3s ease-in-out infinite;
filter: blur(15px);
}

@keyframes disco-spin {
0% {
transform: rotate(0deg) scale(1);
opacity: 0.8;
}
50% {
transform: rotate(180deg) scale(1.1);
opacity: 1;
}
100% {
transform: rotate(360deg) scale(1);
opacity: 0.8;
}
}

@keyframes disco-pulse {
0%,
100% {
transform: scale(1);
opacity: 0.7;
}
50% {
transform: scale(1.15);
opacity: 1;
}
}

/* 8. Space */
.race-track.space-track {
background: radial-gradient(
ellipse at top,
#1e1b4b 0%,
#0f172a 50%,
#000000 100%
);
position: relative;
overflow: hidden;
}

.race-track.space-track::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(circle 3px at 15% 20%, #fbbf24, transparent),
radial-gradient(circle 2px at 45% 15%, #fde047, transparent),
radial-gradient(circle 4px at 75% 25%, #fcd34d, transparent),
radial-gradient(circle 2px at 25% 40%, #fef08a, transparent),
radial-gradient(circle 3px at 60% 35%, #fbbf24, transparent),
radial-gradient(circle 2px at 85% 45%, #fde047, transparent),
radial-gradient(circle 3px at 35% 60%, #fcd34d, transparent),
radial-gradient(circle 4px at 70% 55%, #fbbf24, transparent),
radial-gradient(circle 2px at 20% 75%, #fef08a, transparent),
radial-gradient(circle 3px at 50% 70%, #fde047, transparent),
radial-gradient(circle 2px at 80% 80%, #fcd34d, transparent),
radial-gradient(circle 4px at 40% 85%, #fbbf24, transparent),
radial-gradient(circle 2px at 90% 30%, #fef08a, transparent),
radial-gradient(circle 3px at 10% 50%, #fde047, transparent),
radial-gradient(circle 2px at 65% 90%, #fcd34d, transparent);
background-size: 100% 100%;
pointer-events: none;
animation: stars-twinkle 3s ease-in-out infinite;
}

.race-track.space-track::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(
circle 80px at 15% 25%,
rgba(139, 92, 246, 0.7) 0%,
rgba(139, 92, 246, 0.3) 40%,
transparent 60%
),
radial-gradient(
circle 100px at 85% 70%,
rgba(236, 72, 153, 0.6) 0%,
rgba(236, 72, 153, 0.2) 45%,
transparent 65%
),
radial-gradient(
ellipse 300px 200px at 50% 50%,
rgba(59, 130, 246, 0.25) 0%,
rgba(59, 130, 246, 0.1) 50%,
transparent 70%
),
radial-gradient(
circle 60px at 75% 30%,
rgba(251, 146, 60, 0.8) 0%,
rgba(251, 146, 60, 0.4) 35%,
transparent 55%
);
pointer-events: none;
animation: nebula-flow 15s ease-in-out infinite;
}

@keyframes stars-twinkle {
0%,
100% {
opacity: 0.6;
filter: brightness(1);
}
25% {
opacity: 1;
filter: brightness(1.3);
}
50% {
opacity: 0.7;
filter: brightness(0.9);
}
75% {
opacity: 1;
filter: brightness(1.2);
}
}

@keyframes nebula-flow {
0%,
100% {
transform: scale(1) rotate(0deg);
opacity: 0.8;
}
50% {
transform: scale(1.05) rotate(5deg);
opacity: 1;
}
}

/* 9. Lava */
.race-track.lava {
background: linear-gradient(to bottom, #7c2d12 0%, #991b1b 50%, #7c2d12 100%);
position: relative;
overflow: hidden;
}

.race-track.lava::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(
ellipse 200px 150px at 20% 30%,
rgba(251, 146, 60, 0.8) 0%,
rgba(239, 68, 68, 0.4) 50%,
transparent 70%
),
radial-gradient(
ellipse 250px 180px at 70% 60%,
rgba(252, 211, 77, 0.7) 0%,
rgba(251, 146, 60, 0.4) 50%,
transparent 70%
),
radial-gradient(
ellipse 180px 130px at 40% 80%,
rgba(239, 68, 68, 0.8) 0%,
rgba(185, 28, 28, 0.4) 50%,
transparent 70%
),
radial-gradient(
ellipse 220px 160px at 85% 25%,
rgba(251, 146, 60, 0.7) 0%,
rgba(239, 68, 68, 0.3) 50%,
transparent 70%
);
pointer-events: none;
animation: lava-flow 8s ease-in-out infinite;
}

.race-track.lava::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 100%;
background-image: radial-gradient(
circle 8px at 15% 100%,
rgba(251, 191, 36, 0.9) 0%,
transparent 50%
),
radial-gradient(
circle 6px at 35% 100%,
rgba(251, 146, 60, 0.8) 0%,
transparent 50%
),
radial-gradient(
circle 10px at 55% 100%,
rgba(252, 211, 77, 0.9) 0%,
transparent 50%
),
radial-gradient(
circle 7px at 75% 100%,
rgba(251, 191, 36, 0.8) 0%,
transparent 50%
),
radial-gradient(
circle 9px at 90% 100%,
rgba(251, 146, 60, 0.9) 0%,
transparent 50%
);
background-size: 100% 200%;
background-position: 0 100%;
pointer-events: none;
animation: sparks-rise 3s ease-out infinite;
}

@keyframes lava-flow {
0%,
100% {
transform: translateY(0) scale(1);
opacity: 0.8;
}
33% {
transform: translateY(-3%) scale(1.05);
opacity: 1;
}
66% {
transform: translateY(3%) scale(0.98);
opacity: 0.9;
}
}

@keyframes sparks-rise {
0% {
background-position: 0 100%;
opacity: 1;
}
100% {
background-position: 0 -100%;
opacity: 0;
}
}

/* 10. Cloudy */
.race-track.cloudy {
background: linear-gradient(to bottom, #7dd3fc 0%, #bae6fd 50%, #e0f2fe 100%);
position: relative;
overflow: hidden;
}

.race-track.cloudy::before {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(
ellipse 200px 80px at 15% 30%,
rgba(255, 255, 255, 0.6) 0%,
transparent 50%
),
radial-gradient(
ellipse 160px 65px at 18% 32%,
rgba(255, 255, 255, 0.5) 0%,
transparent 50%
),
radial-gradient(
ellipse 220px 90px at 55% 50%,
rgba(255, 255, 255, 0.6) 0%,
transparent 50%
),
radial-gradient(
ellipse 180px 70px at 58% 52%,
rgba(255, 255, 255, 0.5) 0%,
transparent 50%
),
radial-gradient(
ellipse 190px 75px at 85% 65%,
rgba(255, 255, 255, 0.6) 0%,
transparent 50%
),
radial-gradient(
ellipse 150px 60px at 88% 67%,
rgba(255, 255, 255, 0.5) 0%,
transparent 50%
);
pointer-events: none;
animation: clouds-slow 50s linear infinite;
}

.race-track.cloudy::after {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(
ellipse 250px 100px at 25% 20%,
rgba(255, 255, 255, 0.8) 0%,
transparent 50%
),
radial-gradient(
ellipse 200px 85px at 28% 22%,
rgba(255, 255, 255, 0.7) 0%,
transparent 50%
),
radial-gradient(
ellipse 280px 110px at 70% 70%,
rgba(255, 255, 255, 0.8) 0%,
transparent 50%
),
radial-gradient(
ellipse 220px 95px at 73% 72%,
rgba(255, 255, 255, 0.7) 0%,
transparent 50%
);
pointer-events: none;
animation: clouds-fast 30s linear infinite;
}

@keyframes clouds-slow {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

@keyframes clouds-fast {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

/* 11. Parallax Star*/
.race-track.parallax-star {
background: radial-gradient(
ellipse at center,
#1e1b4b 0%,
#0f172a 50%,
#000000 100%
);
position: relative;
overflow: hidden;
}

.race-track.parallax-star::before {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(circle 2px at 10% 20%, #93c5fd, transparent),
radial-gradient(circle 2px at 30% 40%, #bae6fd, transparent),
radial-gradient(circle 2px at 50% 60%, #93c5fd, transparent),
radial-gradient(circle 2px at 70% 30%, #bae6fd, transparent),
radial-gradient(circle 2px at 85% 70%, #93c5fd, transparent),
radial-gradient(circle 2px at 15% 80%, #bae6fd, transparent),
radial-gradient(circle 2px at 60% 15%, #93c5fd, transparent),
radial-gradient(circle 2px at 40% 85%, #bae6fd, transparent);
background-size: 100% 100%;
pointer-events: none;
animation: parallax-slow 60s linear infinite;
}

.race-track.parallax-star::after {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(circle 4px at 25% 25%, #fde047, transparent),
radial-gradient(circle 3px at 55% 45%, #fef08a, transparent),
radial-gradient(circle 4px at 75% 65%, #fbbf24, transparent),
radial-gradient(circle 3px at 35% 75%, #fde047, transparent),
radial-gradient(circle 4px at 65% 35%, #fef08a, transparent),
radial-gradient(circle 3px at 20% 55%, #fbbf24, transparent),
radial-gradient(circle 4px at 80% 85%, #fde047, transparent),
radial-gradient(circle 3px at 45% 20%, #fef08a, transparent);
background-size: 100% 100%;
pointer-events: none;
animation: parallax-fast 30s linear infinite;
filter: drop-shadow(0 0 3px rgba(253, 224, 71, 0.8));
}

@keyframes parallax-slow {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

@keyframes parallax-fast {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-50%);
}
}

/* 12. Rainbow Gradient Waves */
.race-track.rainbow-waves {
background: linear-gradient(to bottom, #1e293b 0%, #334155 100%);
position: relative;
overflow: hidden;
}

.race-track.rainbow-waves::before {
content: "";
position: absolute;
top: 0;
left: -50%;
width: 200%;
height: 100%;
background: linear-gradient(
90deg,
#ef4444 0%,
#f97316 10%,
#facc15 20%,
#84cc16 30%,
#22c55e 40%,
#14b8a6 50%,
#06b6d4 60%,
#3b82f6 70%,
#6366f1 80%,
#8b5cf6 90%,
#d946ef 100%
);
opacity: 0.6;
pointer-events: none;
animation: wave-flow-1 8s ease-in-out infinite;
clip-path: polygon(
0% 40%,
10% 35%,
20% 38%,
30% 33%,
40% 37%,
50% 32%,
60% 36%,
70% 31%,
80% 35%,
90% 30%,
100% 34%,
100% 60%,
90% 65%,
80% 62%,
70% 67%,
60% 63%,
50% 68%,
40% 64%,
30% 69%,
20% 65%,
10% 70%,
0% 66%
);
}

.race-track.rainbow-waves::after {
content: "";
position: absolute;
top: 0;
left: -50%;
width: 200%;
height: 100%;
background: linear-gradient(
90deg,
#d946ef 0%,
#8b5cf6 10%,
#6366f1 20%,
#3b82f6 30%,
#06b6d4 40%,
#14b8a6 50%,
#22c55e 60%,
#84cc16 70%,
#facc15 80%,
#f97316 90%,
#ef4444 100%
);
opacity: 0.5;
pointer-events: none;
animation: wave-flow-2 10s ease-in-out infinite;
clip-path: polygon(
0% 55%,
10% 50%,
20% 53%,
30% 48%,
40% 52%,
50% 47%,
60% 51%,
70% 46%,
80% 50%,
90% 45%,
100% 49%,
100% 75%,
90% 80%,
80% 77%,
70% 82%,
60% 78%,
50% 83%,
40% 79%,
30% 84%,
20% 80%,
10% 85%,
0% 81%
);
}

@keyframes wave-flow-1 {
0%,
100% {
transform: translateX(0) translateY(0);
}
50% {
transform: translateX(25%) translateY(-3%);
}
}

@keyframes wave-flow-2 {
0%,
100% {
transform: translateX(0) translateY(0);
}
50% {
transform: translateX(-25%) translateY(3%);
}
}

/* 13. Neon City */
.race-track.neon-city {
background: linear-gradient(to bottom, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
position: relative;
overflow: hidden;
}

.race-track.neon-city::before {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(circle 3px at 18% 22%, #ec4899, transparent),
radial-gradient(circle 4px at 35% 42%, #8b5cf6, transparent),
radial-gradient(circle 3px at 52% 62%, #06b6d4, transparent),
radial-gradient(circle 4px at 68% 32%, #ec4899, transparent),
radial-gradient(circle 3px at 82% 72%, #8b5cf6, transparent),
radial-gradient(circle 4px at 25% 82%, #06b6d4, transparent);
background-size: 100% 100%;
pointer-events: none;
animation: parallax-slow 45s linear infinite;
filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.8));
}

.race-track.neon-city::after {
content: "";
position: absolute;
width: 200%;
height: 100%;
background-image: radial-gradient(circle 5px at 22% 28%, #f43f5e, transparent),
radial-gradient(circle 6px at 48% 48%, #a78bfa, transparent),
radial-gradient(circle 5px at 72% 68%, #22d3ee, transparent),
radial-gradient(circle 6px at 38% 78%, #f43f5e, transparent);
background-size: 100% 100%;
pointer-events: none;
animation: parallax-fast 25s linear infinite;
filter: drop-shadow(0 0 8px rgba(244, 63, 94, 1));
}

/* 14. Matrix Rain */
.race-track.matrix-rain {
background: #000000;
position: relative;
overflow: hidden;
}

.race-track.matrix-rain::before {
content: "01010101 11001100 10101010 00110011 11110000 01010101 10011001 11001100 01010101 00110011 10101010 11110000";
position: absolute;
top: -100%;
left: 0;
width: 100%;
height: 200%;
color: #00ff41;
font-family: monospace;
font-size: 14px;
line-height: 20px;
word-wrap: break-word;
opacity: 0.8;
pointer-events: none;
animation: matrix-fall 8s linear infinite;
}

.race-track.matrix-rain::after {
content: "1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0";
position: absolute;
top: -100%;
left: 20%;
width: 100%;
height: 200%;
color: #008f11;
font-family: monospace;
font-size: 18px;
line-height: 24px;
word-wrap: break-word;
opacity: 0.6;
pointer-events: none;
animation: matrix-fall 5s linear infinite;
}

@keyframes matrix-fall {
0% {
transform: translateY(0);
}
100% {
transform: translateY(100%);
}
}

/* 15. Waves Ocean */
.race-track.waves-ocean {
background: linear-gradient(to bottom, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
position: relative;
overflow: hidden;
}

.race-track.waves-ocean::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 300%;
height: 60%;
background: linear-gradient(
to right,
transparent 0%,
rgba(6, 182, 212, 0.4) 25%,
transparent 50%,
rgba(34, 211, 238, 0.4) 75%,
transparent 100%
);
border-radius: 50%;
pointer-events: none;
animation: wave-move 10s ease-in-out infinite;
}

.race-track.waves-ocean::after {
content: "";
position: absolute;
bottom: -10%;
left: 0;
width: 300%;
height: 50%;
background: linear-gradient(
to right,
transparent 0%,
rgba(14, 165, 233, 0.3) 30%,
transparent 60%,
rgba(6, 182, 212, 0.3) 80%,
transparent 100%
);
border-radius: 50%;
pointer-events: none;
animation: wave-move 7s ease-in-out infinite reverse;
}

@keyframes wave-move {
0%,
100% {
transform: translateX(0) translateY(0);
}
50% {
transform: translateX(-33.333%) translateY(-10px);
}
}

/* 16. Sparkle Gitter */
.race-track.sparkle-glitter {
background: linear-gradient(135deg, #581c87 0%, #7e22ce 50%, #a855f7 100%);
position: relative;
overflow: hidden;
}

.race-track.sparkle-glitter::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(circle 2px at 20% 30%, #fef08a, transparent),
radial-gradient(circle 2px at 45% 50%, #fde047, transparent),
radial-gradient(circle 2px at 70% 40%, #fef08a, transparent),
radial-gradient(circle 2px at 30% 70%, #fde047, transparent),
radial-gradient(circle 2px at 80% 60%, #fef08a, transparent);
pointer-events: none;
animation: sparkle-twinkle 2s ease-in-out infinite;
}

.race-track.sparkle-glitter::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(circle 3px at 35% 25%, #f0abfc, transparent),
radial-gradient(circle 3px at 60% 55%, #e879f9, transparent),
radial-gradient(circle 3px at 15% 65%, #f0abfc, transparent),
radial-gradient(circle 3px at 75% 75%, #e879f9, transparent);
pointer-events: none;
animation: sparkle-twinkle 2s ease-in-out infinite 1s;
}

@keyframes sparkle-twinkle {
0%,
100% {
opacity: 0;
transform: scale(0);
}
50% {
opacity: 1;
transform: scale(1);
}
}

/* 17. Fire Embers */
.race-track.fire-embers {
background: linear-gradient(to bottom, #450a0a 0%, #7f1d1d 50%, #991b1b 100%);
position: relative;
overflow: hidden;
}

.race-track.fire-embers::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(circle 4px at 15% 90%, #fbbf24, transparent),
radial-gradient(circle 3px at 30% 85%, #f59e0b, transparent),
radial-gradient(circle 5px at 50% 95%, #fbbf24, transparent),
radial-gradient(circle 4px at 70% 88%, #f59e0b, transparent),
radial-gradient(circle 3px at 85% 92%, #fbbf24, transparent);
pointer-events: none;
animation: embers-rise 8s ease-in infinite;
}

.race-track.fire-embers::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(circle 5px at 25% 95%, #ef4444, transparent),
radial-gradient(circle 4px at 45% 88%, #dc2626, transparent),
radial-gradient(circle 6px at 65% 93%, #ef4444, transparent),
radial-gradient(circle 5px at 80% 90%, #dc2626, transparent);
pointer-events: none;
animation: embers-rise 6s ease-in infinite 1s;
filter: blur(1px);
}

@keyframes embers-rise {
0% {
transform: translateY(0) scale(1);
opacity: 1;
}
100% {
transform: translateY(-120%) scale(0.3);
opacity: 0;
}
}

/* 18. Aurora Borealis */
.race-track.aurora-borealis {
background: linear-gradient(to bottom, #0c4a6e 0%, #082f49 50%, #0f172a 100%);
position: relative;
overflow: hidden;
}

.race-track.aurora-borealis::before {
content: "";
position: absolute;
top: 0;
left: -50%;
width: 200%;
height: 100%;
background: linear-gradient(
90deg,
transparent 0%,
rgba(34, 211, 238, 0.3) 20%,
rgba(96, 165, 250, 0.4) 40%,
rgba(139, 92, 246, 0.3) 60%,
rgba(168, 85, 247, 0.2) 80%,
transparent 100%
);
pointer-events: none;
animation: aurora-wave 15s ease-in-out infinite;
filter: blur(20px);
}

.race-track.aurora-borealis::after {
content: "";
position: absolute;
top: 20%;
left: -50%;
width: 200%;
height: 60%;
background: linear-gradient(
90deg,
transparent 0%,
rgba(167, 243, 208, 0.2) 25%,
rgba(52, 211, 153, 0.3) 50%,
rgba(16, 185, 129, 0.2) 75%,
transparent 100%
);
pointer-events: none;
animation: aurora-wave 12s ease-in-out infinite reverse;
filter: blur(25px);
}

@keyframes aurora-wave {
0%,
100% {
transform: translateX(0) skewX(0deg);
}
25% {
transform: translateX(10%) skewX(-5deg);
}
50% {
transform: translateX(20%) skewX(0deg);
}
75% {
transform: translateX(10%) skewX(5deg);
}
}

/* 19. Floating Bubbles */
.race-track.floating-bubbles {
background: radial-gradient(
ellipse at center,
#fef3c7 0%,
#fde68a 50%,
#fcd34d 100%
);
position: relative;
overflow: hidden;
}

.race-track.floating-bubbles::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(
circle 30px at 20% 80%,
rgba(251, 191, 36, 0.5),
rgba(251, 191, 36, 0.1) 50%,
transparent
),
radial-gradient(
circle 40px at 50% 90%,
rgba(245, 158, 11, 0.5),
rgba(245, 158, 11, 0.1) 50%,
transparent
),
radial-gradient(
circle 25px at 75% 85%,
rgba(251, 191, 36, 0.5),
rgba(251, 191, 36, 0.1) 50%,
transparent
);
pointer-events: none;
animation: bubble-float 6s ease-in-out infinite;
}

.race-track.floating-bubbles::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(
circle 35px at 35% 95%,
rgba(234, 179, 8, 0.4),
rgba(234, 179, 8, 0.1) 50%,
transparent
),
radial-gradient(
circle 45px at 65% 88%,
rgba(202, 138, 4, 0.4),
rgba(202, 138, 4, 0.1) 50%,
transparent
);
pointer-events: none;
animation: bubble-float 8s ease-in-out infinite reverse;
}

@keyframes bubble-float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-100%);
}
}

.race-track.valentine-blackpink {
  /* Nền đen huyền bí + gradient hồng đậm sang trọng */
  background: linear-gradient(135deg,
    #0f0f0f 0%,
    #1a0b1a 30%,
    #2d1129 60%,
    #1a0b1a 100%
  );
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 40px rgba(236, 72, 153, 0.4),
    inset 0 0 80px rgba(100, 20, 80, 0.3);
}

/* Chỉ giữ lại trái tim lớn ở giữa + hiệu ứng nhịp tim + phát sáng hồng */
.race-track.valentine-blackpink::after {
  content: '♥';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  color: #ff2e91;           /* hồng BLACKPINK chính gốc */
  background: radial-gradient(circle at 30% 30%, #ff69b4, transparent 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 0 20px #ff2e91,
    0 0 40px #ff1493,
    0 0 70px #ff1493,
    0 0 100px #ff1493;
  pointer-events: none;
  animation: heartbeat 2.4s ease-in-out infinite;
}

/* Đường kẻ giữa mỏng, hồng neon phát sáng nhẹ (không lòe) */
.race-track.valentine-blackpink .center-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #ff2e91;
  transform: translateX(-50%);
  box-shadow: 0 0 15px #ff2e91, 0 0 30px #ff1493;
  opacity: 0.7;
}

/* Animation trái tim (giữ nguyên, cực ngọt) */
@keyframes heartbeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  20%      { transform: translate(-50%, -50%) scale(1.18); }
  40%      { transform: translate(-50%, -50%) scale(0.95); }
  60%      { transform: translate(-50%, -50%) scale(1.12); }
  80%      { transform: translate(-50%, -50%) scale(0.98); }
}

.race-track.halloween {
  /* Nền đêm ma quái: tím đen + cam máu + chút xanh độc */
  background: linear-gradient(135deg,
    #0c0519 0%,
    #1a002e 30%,
    #2d0b3f 60%,
    #1a002e 100%
  );
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 40px rgba(139, 0, 255, 0.5),
    inset 0 0 80px rgba(0, 0, 0, 0.8);
  animation: halloweenFog 12s ease-in-out infinite;
}

/* Màn sương mù tím + những đốm sáng ma quái lơ lửng */
.race-track.halloween::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle, #9333ea 1px, transparent 2px),
    radial-gradient(circle, #f97316 1.5px, transparent 2px),
    radial-gradient(circle, #22d3ee 1px, transparent 1px);
  background-size: 70px 70px, 100px 100px, 80px 80px;
  background-position: 0 0, 40px 60px, 20px 30px;
  opacity: 0.4;
  pointer-events: none;
  animation: floatingGhosts 18s linear infinite;
}

/* Bí ngô Jack O’Lantern + mắt phát sáng ở giữa */
.race-track.halloween::after {
  content: '🎃';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  filter: drop-shadow(0 0 30px #f97316)
          drop-shadow(0 0 60px #fb923c);
  animation: pumpkinFlicker 3s infinite;
}

/* Đường kẻ giữa biến thành vết máu nhỏ giọt + phát sáng cam */
.race-track.halloween .center-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom,
    transparent 0%,
    #dc2626 15%,
    #f97316 50%,
    #dc2626 85%,
    transparent 100%
  );
  transform: translateX(-50%);
  opacity: 0.7;
  box-shadow: 
    0 0 20px #f97316,
    0 0 40px #ea580c;
  animation: bloodDrip 5s ease-in-out infinite;
}

/* Animation ma mị */
@keyframes halloweenFog {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  50%      { filter: hue-rotate(30deg) brightness(1.2); }
}

@keyframes floatingGhosts {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-100px, 800px); }
}

@keyframes pumpkinFlicker {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.9;
  }
  10%, 30%, 70% { opacity: 0.7; }
}

@keyframes bloodDrip {
  0%, 100% { 
    background-position: 0 0;
    opacity: 0.7;
  }
  50% { 
    background-position: 0 20px;
    opacity: 1;
  }
}

.race-track.christmas-night {
  /* Nền tối sâu thẳm như bầu trời đêm 24/12 */
  background: linear-gradient(135deg,
    #0f172a 0%,    /* xanh đen đêm */
    #1e293b 40%,
    #334155 80%,
    #0f172a 100%
  );
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.8),
    inset 0 0 60px rgba(30, 58, 138, 0.3);
}

/* Tuyết rơi nhẹ nhàng trên nền tối (rất rõ và đẹp) */
.race-track.christmas-night::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle, #fff 1px, transparent 1px),
    radial-gradient(circle, #e0e7ff 1.5px, transparent 1.5px),
    radial-gradient(circle, #c0c9ff 1px, transparent 1px);
  background-size: 60px 60px, 90px 90px, 70px 70px;
  background-position: 0 0, 35px 50px, 15px 30px;
  opacity: 0.6;
  pointer-events: none;
  animation: snowFallSlow 20s linear infinite;
}

/* Quả châu + đèn fairy light ở giữa, phát sáng ấm áp */
.race-track.christmas-night::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 70px;
  color: #fbbf24; /* vàng ấm của đèn Giáng sinh */
  text-shadow: 
    0 0 20px #fef3c7,
    0 0 40px #f59e0b,
    0 0 60px #dc2626,
    0 0 90px #dc2626;
  pointer-events: none;
  animation: fairyLight 6s ease-in-out infinite;
}

/* Thêm dải sáng màu nhẹ chạy dọc như dây đèn trang trí */
.race-track.christmas-night .center-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #ef4444 20%,
    #fbbf24 40%,
    #22c55e 60%,
    #3b82f6 80%,
    transparent 100%
  );
  transform: translateX(-50%);
  opacity: 0.4;
  box-shadow: 0 0 15px currentColor;
  animation: colorPulse 8s infinite;
}

/* Animation nhẹ nhàng */
@keyframes snowFallSlow {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-50px, 1000px); }
}

@keyframes fairyLight {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0.9;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.3) rotate(180deg);
    opacity: 1;
  }
}

@keyframes colorPulse {
  0%   { opacity: 0.4; filter: hue-rotate(0deg); }
  50%  { opacity: 0.7; filter: hue-rotate(180deg); }
  100% { opacity: 0.4; filter: hue-rotate(360deg); }
}