* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.form-control.input.dark-mode {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}
.form-control.input {
    height: 35px;
    font-size: 16px;
    border-radius: 4px;
}
.flatpickr-input.flatpickr-mobile {
    height: 35px;
}

body {
    font-family: 'Inter', sans-serif;
    width: 250px;
    height: 650px;
    overflow: hidden;
    position: relative;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .prize-row {
    border-bottom-color: #444;
}

/* body.dark-mode .odd-line {
    background-color: #2d2d2d;
} */

body.dark-mode #search-date,
body.dark-mode #search-region {
    background-color: #333;
    color: #fff;
    border: 1px solid #FFFFFF;
}

body.dark-mode #search-date::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
body.dark-mode #search-date::-webkit-input-placeholder {
    color: #fff;
}
body.dark-mode .search-input {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

body.dark-mode .no-results {
    color: #ccc;
}

.container {
    height: 100%;
    overflow-y: auto;
    background-color: #232C2B;
    border: 1px solid #232C2B;
    border-radius: 10px;
    color: #fff;
}

.date-region {
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    text-align: center;
}

.search-section {
    margin-bottom: 15px;
}

#search-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.flatpickr-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0.6;
    border-radius: 10px;
}

.flatpickr-wrapper::before {
    content: "";
    position: absolute;
    right: 8px;
    top: 16%;
    width: 24px;
    height: 26px;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="23" viewBox="0 0 22 23" fill="none"><path d="M19.3 2.71997H18.14V4.56998C18.14 5.24998 17.59 5.79999 16.91 5.79999C16.23 5.79999 15.68 5.24998 15.68 4.56998V2.71997H5.47V4.56998C5.47 5.24998 4.91999 5.79999 4.23999 5.79999C3.55999 5.79999 3.01001 5.24998 3.01001 4.56998V2.71997H1.85001C0.830006 2.71997 0 3.54998 0 4.56998V8.39996H21.13V4.56998C21.13 3.54998 20.3 2.71997 19.28 2.71997H19.3Z" fill="white"/><path d="M4.29987 0H4.21988C3.75596 0 3.37988 0.376077 3.37988 0.839996V4.61002C3.37988 5.07394 3.75596 5.45001 4.21988 5.45001H4.29987C4.76378 5.45001 5.13986 5.07394 5.13986 4.61002V0.839996C5.13986 0.376077 4.76378 0 4.29987 0Z" fill="white"/><path d="M16.96 0H16.88C16.4161 0 16.04 0.376077 16.04 0.839996V4.61002C16.04 5.07394 16.4161 5.45001 16.88 5.45001H16.96C17.4239 5.45001 17.8 5.07394 17.8 4.61002V0.839996C17.8 0.376077 17.4239 0 16.96 0Z" fill="white"/><path d="M20.11 20.7201C20.11 21.1601 19.75 21.5301 19.3 21.5301H1.85999C1.41999 21.5301 1.04999 21.1701 1.04999 20.7201V8.82007H0.0100098V20.7201C0.0100098 21.7401 0.839985 22.5701 1.85999 22.5701H19.3C20.32 22.5701 21.15 21.7401 21.15 20.7201V8.82007H20.11V20.7201Z" fill="white"/><path d="M6.00992 10.0601H3.80991C3.30733 10.0601 2.8999 10.4675 2.8999 10.9701V11.9201C2.8999 12.4227 3.30733 12.8301 3.80991 12.8301H6.00992C6.5125 12.8301 6.91989 12.4227 6.91989 11.9201V10.9701C6.91989 10.4675 6.5125 10.0601 6.00992 10.0601Z" fill="white"/><path d="M11.6901 10.0601H9.49008C8.9875 10.0601 8.58008 10.4675 8.58008 10.9701V11.9201C8.58008 12.4227 8.9875 12.8301 9.49008 12.8301H11.6901C12.1927 12.8301 12.6001 12.4227 12.6001 11.9201V10.9701C12.6001 10.4675 12.1927 10.0601 11.6901 10.0601Z" fill="white"/><path d="M17.36 10.0601H15.16C14.6574 10.0601 14.25 10.4675 14.25 10.9701V11.9201C14.25 12.4227 14.6574 12.8301 15.16 12.8301H17.36C17.8626 12.8301 18.27 12.4227 18.27 11.9201V10.9701C18.27 10.4675 17.8626 10.0601 17.36 10.0601Z" fill="white"/><path d="M6.00992 13.7H3.80991C3.30733 13.7 2.8999 14.1074 2.8999 14.61V15.5599C2.8999 16.0625 3.30733 16.4699 3.80991 16.4699H6.00992C6.5125 16.4699 6.91989 16.0625 6.91989 15.5599V14.61C6.91989 14.1074 6.5125 13.7 6.00992 13.7Z" fill="white"/><path d="M11.6901 13.7H9.49008C8.9875 13.7 8.58008 14.1074 8.58008 14.61V15.5599C8.58008 16.0625 8.9875 16.4699 9.49008 16.4699H11.6901C12.1927 16.4699 12.6001 16.0625 12.6001 15.5599V14.61C12.6001 14.1074 12.1927 13.7 11.6901 13.7Z" fill="white"/><path d="M17.36 13.7H15.16C14.6574 13.7 14.25 14.1074 14.25 14.61V15.5599C14.25 16.0625 14.6574 16.4699 15.16 16.4699H17.36C17.8626 16.4699 18.27 16.0625 18.27 15.5599V14.61C18.27 14.1074 17.8626 13.7 17.36 13.7Z" fill="white"/><path d="M6.00992 17.3301H3.80991C3.30733 17.3301 2.8999 17.7375 2.8999 18.2401V19.1901C2.8999 19.6926 3.30733 20.1001 3.80991 20.1001H6.00992C6.5125 20.1001 6.91989 19.6926 6.91989 19.1901V18.2401C6.91989 17.7375 6.5125 17.3301 6.00992 17.3301Z" fill="white"/><path d="M11.6901 17.3301H9.49008C8.9875 17.3301 8.58008 17.7375 8.58008 18.2401V19.1901C8.58008 19.6926 8.9875 20.1001 9.49008 20.1001H11.6901C12.1927 20.1001 12.6001 19.6926 12.6001 19.1901V18.2401C12.6001 17.7375 12.1927 17.3301 11.6901 17.3301Z" fill="white"/><path d="M17.36 17.3301H15.16C14.6574 17.3301 14.25 17.7375 14.25 18.2401V19.1901C14.25 19.6926 14.6574 20.1001 15.16 20.1001H17.36C17.8626 20.1001 18.27 19.6926 18.27 19.1901V18.2401C18.27 17.7375 17.8626 17.3301 17.36 17.3301Z" fill="white"/></svg>');
}

#search-date, .flatpickr-input {
    padding: 10px;
    padding-left: 10px !important; /* Space for the icon */
    font-size: 15px !important;
    background-color: #f0f0f0;
    height: 40px;
    width: 100%;
    line-height: 20px; /* Adjust line-height to vertically center text */
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0.5;
    border-radius: 10px;
}

#search-region {
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="9" height="8" viewBox="0 0 9 8" fill="none"><path d="M4.25 7.18652L8.36362 0.0615234H0.136379L4.25 7.18652Z" fill="%23111111"/></svg>'); */
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px; /* Make space for the arrow */
    height: 40px;
    width: 100%;
    background-color: #232C2B;
    color: #fff;
    border: 1px solid #FFFFFF;
    border-radius: 10px;
    outline: none;
}

#search-region::-ms-expand {
    display: none;
}

/* body.dark-mode #search-region {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="9" height="8" viewBox="0 0 9 8" fill="none"><path d="M4.25 7.18652L8.36362 0.0615234H0.136379L4.25 7.18652Z" fill="white"/></svg>');
} */

.search-inputs {
    display: flex;
    align-items: stretch;
    margin-bottom: 8px;
    justify-content: flex-start;
    width: 100%;
}
.input-group {
    display: flex;
    gap: 4px;
    margin-right:10px;
    align-items: stretch;
}
.search-input {
    display: flex;
    width: 100%;
    padding: 8px;
    align-items: center;
    gap: 1px;
    border-radius: 4px;
    border: 1px solid #fff;
    background: #232C2B;
    max-width: 50px;
    font-size: 16px;
    color: #FFFFFF;
    outline: none;
}

.search-btn {
    display: flex;
    width: 38px;
    padding: 10px 0;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
    border: none;
    color: black;
    stroke-width: 0.28px;
    stroke: #000;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="334" height="49" viewBox="0 0 334 49" fill="none"><path d="M0.140137 0.140015H332.94V39.83C332.94 44.63 329.04 48.53 324.24 48.53H8.84013C4.04013 48.53 0.140137 44.63 0.140137 39.83V0.140015Z" fill="url(%23paint0_linear_210_3062)" stroke="black" stroke-width="0.28" stroke-miterlimit="10"/><defs><linearGradient id="paint0_linear_210_3062" x1="0.140137" y1="24.33" x2="332.94" y2="24.33" gradientUnits="userSpaceOnUse"><stop stop-color="%23AAFFD5"/><stop offset="1" stop-color="%233FE1FF"/></linearGradient></defs></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
.results-section {
    font-size: 12px;
}

.prize-row {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid #E0E0E0;
    gap: 16px;
}

.prize-row.loading {
    padding-top: 12px;
    padding-bottom: 12px;
}

.prize-numbers.loading {
    gap: 6px 15px;
}

.prize-label {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px; 
    width: 50px;
}

.prize-numbers {
    flex: 1;
    text-align: right;
    font-size: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 15px;
    justify-content: flex-start;
}

.odd-line {
    background-color: #232C2B;
}
.special-prize .number.init-rolling {
    font-weight: 600 !important;
}
.special-prize .number {
    font-size: 20px;
    font-weight: 400;
    width: 90px;
}
.special-prize .prize-number {
    width: 90px;
}
.first-prize {
    font-size: 14px;
    font-weight: 400;
}

.number {
    display: inline-block;
    letter-spacing: 1px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

body .number .highlight {
    color: #ff5722;
    text-decoration: underline;
}

body.dark-mode .number .highlight {
    color: #B6407D;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Corner number badges */
.corner-number {
    position: absolute;
    width: 30px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.corner-number.top-right {
    top: -10px;
    right: 20px;
    border-radius: 0 0 8px 8px;
}

.corner-number.middle-right {
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    border-radius: 8px 0 0 8px;
}

.corner-number.bottom-right {
    bottom: -10px;
    right: 20px;
    border-radius: 8px 8px 0 0;
}
#search-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

#search-date {
    display: flex;
    padding: 8px 8px 8px 12px;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;
    border-radius: 4px;
    background: var(--On-Surface-On-Neutral-Alpha-10, rgba(0, 0, 0, 0.10));
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    min-width: 0;
    padding: 8px 8px 8px 12px;
    width: 100%;
    border-radius: 10px;
    background-color: #232C2B;
    color: #fff;
    border: 1px solid #FFFFFF;
    outline: none;
}

/* Hide default date picker arrow in light mode */
#search-date::-webkit-calendar-picker-indicator {
    opacity: 0.7;
    cursor: pointer;
}

#search-section {
    display: flex;
    padding: 0 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
}

/* Flatpickr base styles */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    z-index: 9999 !important;
    max-width: 250px !important;
    border: 1px solid #e6e5e5 !important;
}

.flatpickr-calendar .flatpickr-weekdays,
.flatpickr-calendar .flatpickr-rContainer,
.flatpickr-calendar .flatpickr-days {
    max-width: 100% !important;
}

.flatpickr-calendar .dayContainer {
    max-width: 100% !important;
    min-width: 100% !important;
}

.flatpickr-calendar .flatpickr-day {
    font-size: 12px !important;
    line-height: 34px !important;
    min-width: 30px !important;
    max-width: 36px !important;
    height: 36px !important;
}

/* Custom flatpickr dark theme overrides */
body.dark-mode .flatpickr-calendar {
    background: #444  !important;
    border: 1px solid #555 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border: 1px solid #525252 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-months {
    color: #fff !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-weekdays {
    background: #444 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-weekday {
    color: #ccc !important;
    background: transparent !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day {
    color: #fff !important;
    background: transparent !important;
    border: none !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day:hover {
    background: #444 !important;
    color: #fff !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day.selected,
body.dark-mode .flatpickr-calendar .flatpickr-day.today.selected {
    background: #007bff !important;
    color: #fff !important;
    border: none !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day.today {
    background: #444 !important;
    color: #fff !important;
    border: 1px solid #666 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-prev-month,
body.dark-mode .flatpickr-calendar .flatpickr-next-month,
body.dark-mode .flatpickr-calendar .flatpickr-current-month,
body.dark-mode .flatpickr-calendar .flatpickr-month {
    color: #ccc !important;
    fill: #ccc !important;
    background-color: #444 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-prev-month:hover,
body.dark-mode .flatpickr-calendar .flatpickr-next-month:hover {
    color: #fff !important;
    fill: #fff !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-month {
    color: #fff !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #444 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: #444 !important;
    color: #fff !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-current-month input.cur-year {
    background: #444 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-current-month .numInputWrapper:hover {
    background: #444 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-days {
    border: 1px solid #555 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day.flatpickr-disabled,
body.dark-mode .flatpickr-calendar .flatpickr-day.flatpickr-disabled:hover {
    color: #666 !important;
    background: transparent !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day.nextMonthDay,
body.dark-mode .flatpickr-calendar .flatpickr-day.prevMonthDay {
    color: #666 !important;
}

body.dark-mode .flatpickr-calendar .flatpickr-day.inRange {
    color: #fff !important;
}

/* Loading spinner */
.lds-default,
.lds-default div {
  box-sizing: border-box;
}
.lds-default {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 25px;
  top: 3px;
}
.lds-default div {
  position: absolute;
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 50%;
  animation: lds-default 1.2s linear infinite;
}
.lds-default div:nth-child(1) {
  animation-delay: 0s;
  top: 9.25px;
  left: 16.5px;
}
.lds-default div:nth-child(2) {
  animation-delay: -0.1s;
  top: 5.5px;
  left: 15.5px;
}
.lds-default div:nth-child(3) {
  animation-delay: -0.2s;
  top: 2.75px;
  left: 12.75px;
}
.lds-default div:nth-child(4) {
  animation-delay: -0.3s;
  top: 1.75px;
  left: 9.25px;
}
.lds-default div:nth-child(5) {
  animation-delay: -0.4s;
  top: 2.75px;
  left: 5.5px;
}
.lds-default div:nth-child(6) {
  animation-delay: -0.5s;
  top: 5.5px;
  left: 2.75px;
}
.lds-default div:nth-child(7) {
  animation-delay: -0.6s;
  top: 9.25px;
  left: 1.75px;
}
.lds-default div:nth-child(8) {
  animation-delay: -0.7s;
  top: 12.75px;
  left: 2.75px;
}
.lds-default div:nth-child(9) {
  animation-delay: -0.8s;
  top: 15.5px;
  left: 5.5px;
}
.lds-default div:nth-child(10) {
  animation-delay: -0.9s;
  top: 16.5px;
  left: 9.25px;
}
.lds-default div:nth-child(11) {
  animation-delay: -1s;
  top: 15.5px;
  left: 12.75px;
}
.lds-default div:nth-child(12) {
  animation-delay: -1.1s;
  top: 12.75px;
  left: 15.5px;
}
@keyframes lds-default {
  0%, 20%, 80%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
}

.number-spinning,
.init-rolling {
    position: relative;
    display: inline-block;
    font-weight: bold;
    font-size: 16px;
    color: #222;
}

/* Dark mode - màu cầu vồng sáng hơn */
body.dark-mode .number-spinning,
body.dark-mode .init-rolling {
    color: #fff;
}

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

@keyframes scaleBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.prize-number {
    width: 45px;
    text-align: left;
}

.first-prize .prize-number {
    width: 60px;
}
.digit-span {
    display: inline-block;
    width: 1ch;
    text-align: center;
}

.init-rolling-planb {
    font-weight: bold;
    font-size: 16px;
    width: 55px;
}
.rolling-plan-b {
    font-weight: bold;
    font-size: 16px;
    width: 55px;
}