@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;700&display=swap');

:root{
    --whellWidth: 600px;
    --itemWidth: 200px;
    --clr-1: #49469D;
    --clr-2: #037AE0;
    --clr-3: #3EC2CF;
    --clr-4: #4AB969;
    --clr-5: #A6CE39;
    --clr-6: #FDBA4D;
    --clr-7: #F28322;
    --clr-8: #FF4D3B;
    --clr-9: #FF417B;
    --clr-10: #B12C88;
    --clr-text: #303238;

}

body{
    font-family: 'Rajdhani', sans-serif !important;
    background: #000;
    color: var(--clr-text);
    overflow-y: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 50px;
}

.black-friday-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #ff0000, #ff4500, #ff8c00);
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.bf-title {
  font-size: 2.5em;
  font-weight: 900;
  color: #fff;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
  animation: pulse 2s ease-in-out infinite;
}

.bf-subtitle {
  font-size: 1.2em;
  font-weight: 600;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 5px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container{
    max-width: 1440px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 100px 15px 0 15px;
    box-sizing: border-box;
    width: 100%;
}

.wheel{
  position: relative; 
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  margin-bottom: 30px;
}

.wheel-inner{
  width: var(--whellWidth);
  height: var(--whellWidth);
  background: rgba(0 0 0 /.1);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background-color: #fff;
  outline: solid 10px #fff;
  box-shadow: 0 29px 50px rgb(0 0 0 / .3);
  
}
.wheel-inner::before{
    content:"";
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0, 0, 0, 1) 100%);
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: multiply;   
}


.wheel-item{
    width: var(--itemWidth);
    height: var(--whellWidth);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: absolute;
    clip-path: polygon(96% 0, 50% 48%, 4% 0);
}
.wheel-item.one{
    left: calc(50% - (var(--itemWidth) / 2));
    background:var(--clr-1);
    transform: rotate(calc(36deg * 1 - 18deg));
}
.wheel-item.two{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-2);
    transform: rotate(calc(36deg * 2 - 18deg));
}
.wheel-item.three{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-3);
    transform: rotate(calc(36deg * 3 - 18deg));
}
.wheel-item.four{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-4);
    transform: rotate(calc(36deg * 4 - 18deg));
}
.wheel-item.five{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-5);
    transform: rotate(calc(36deg * 5 - 18deg));
}
.wheel-item.six{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-6);
    transform: rotate(calc(36deg * 6 - 18deg));
}
.wheel-item.seven{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-7);
    transform: rotate(calc(36deg * 7 - 18deg));
}
.wheel-item.eight{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-8);
    transform: rotate(calc(36deg * 8 - 18deg));
}
.wheel-item.nine{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-9);
    transform: rotate(calc(36deg * 9 - 18deg));
}
.wheel-item.ten{
    left: calc(50% - (var(--itemWidth) / 2));
    background: var(--clr-10);
    transform: rotate(calc(36deg * 10 - 18deg));
}
.wheel-item .text{
    transform: rotate(-90deg) translateX(-100%);
    color: #fff;
    max-width: 40%;
    position: relative;
    z-index: 200;
 
}

.spin{
    width: 150px;
    height: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 0;
    font-size: 2em;
    font-weight: bold;
    background-color: #fff;
    box-shadow: 0 10px 15px rgb(0 0 0 /.15);
    color: var(--clr-text);
    transition:  cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s transform;
    cursor: pointer;
}
.spin:hover{
    transform: translate(-50%, -50%) scale(1.05);
}
.spin:disabled {
  cursor: not-allowed;
}

.marker{
    width: 50px;
    height: 35px;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 35% 100%, 0% 50%);
    background: #fff;
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    box-shadow: 0 10px 15px rgb(0 0 0 /1);
}

.wheel-info {
  margin-top: 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 24px 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--clr-text);
  text-align: left;
}
#wheel-info strong {
  color: var(--clr-1);
}
#historico-lista, #resgate-lista {
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
}
#historico-lista li, #resgate-lista li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#historico-lista li:last-child, #resgate-lista li:last-child {
  border-bottom: none;
}
.resgatar-btn {
  background: var(--clr-2);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 12px;
  transition: background 0.2s;
}
.resgatar-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.fade-in {
  animation: fadeIn 0.7s;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.resultado-box, .historico-box {
  background: #2a1840;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  padding: 32px 24px 24px 24px;
  margin: 0 auto 32px auto;
  max-width: 420px;
  color: #fff;
  border: 1px solid #6d4bb6;
  text-align: center;
  margin-top: 30px;
}
.historico-box {
    margin-top: 30px;
}
.resultado-box{
    text-align: center;
}
.resultado-box h2 {
  font-size: 1.5em;
  margin-bottom: 12px;
  color: #fff;
}
.resultado-premio {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 24px;
  color: #fff;
}
.resultado-btn {
  background: linear-gradient(90deg, #a259e6, #f24e9c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
}
.resultado-btn:disabled {
  background: #888;
  cursor: not-allowed;
}
.resultado-box small {
  color: #ccc;
  display: block;
  margin-top: 16px;
}
.historico-box h3, .historico-tentativas h3 {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 24px;
  color: #fff;
  text-align: center;
  letter-spacing: 1px;
}
.historico-table {
  width: 100%;
  border-collapse: collapse;
  background: #23113a;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
  font-size: 1.08em;
}
.historico-table th, .historico-table td {
  padding: 14px 8px;
  text-align: center;
  color: #fff;
}
.historico-table th {
  background: #3a2560;
  font-weight: 700;
  font-size: 1.08em;
  letter-spacing: 0.5px;
  text-align: center;
}
.historico-table td {
  background: #23113a;
  vertical-align: baseline;
}
.historico-table tr:nth-child(even) td {
  background: #2a1840;
}
.historico-table tr {
  border-bottom: 1px solid #3a2560;
}
.historico-table tr:last-child {
  border-bottom: none;
}
.historico-premio-tente {
  color: #f24e9c;
  font-weight: bold;
}


/* Media query para dispositivos móveis */
@media screen and (max-width: 768px) {
  :root {
    --whellWidth: 400px;
    --itemWidth: 133px;
  }
  
  .wheel-inner {
    box-shadow: 0 15px 30px rgb(0 0 0 / .2);
  }
  
  .spin {
    width: 100px;
    height: 100px;
    font-size: 1.5em;
  }
  
  .marker {
    width: 35px;
    height: 25px;
  }
  
  .wheel-item .text {
    font-size: 0.9em;
  }
  
  .historico-table {
    font-size: 0.95em;
  }
  
  .container {
    padding: 0 10px;
    padding-top: 50px !important;
  }
  
  .wheel {
    margin-top: 30px;
    margin-bottom: 20px;
  }
  
  .wheel-info {
    padding: 20px;
    margin-top: 20px;
    max-width: 90%;
  }
  
  .black-friday-header {
    padding: 15px;
  }
  
  .bf-title {
    font-size: 1.8em;
  }
  
  .bf-subtitle {
    font-size: 1em;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --whellWidth: 300px;
    --itemWidth: 100px;
  }
  
  .wheel-inner {
    box-shadow: 0 10px 20px rgb(0 0 0 / .2);
  }
  
  .spin {
    width: 80px;
    height: 80px;
    font-size: 1.2em;
  }
  
  .marker {
    width: 25px;
    height: 20px;
  }
  
  .wheel-item .text {
    font-size: 0.8em;
    max-width: 50%;
  }
  
  .resultado-box, .historico-box {
    padding: 20px 16px;
    max-width: 90%;
    margin-top: 15px;
    margin-bottom: 15px;
  }
  
  .resultado-premio {
    font-size: 1.5em;
  }
  
  .resultado-btn {
    padding: 10px 24px;
    font-size: 1em;
  }
  
  .historico-table {
    overflow-x: auto;
    display: block;
    width: 100%;
  }
  
  .historico-table th, .historico-table td {
    padding: 10px 6px;
    font-size: 0.9em;
    white-space: nowrap;
  }
  
  .container {
    padding: 0 8px;
    padding-top: 45px !important;
  }
  
  .wheel {
    margin-top: 20px;
    margin-bottom: 15px;
  }
  
  .black-friday-header {
    padding: 12px;
  }
  
  .bf-title {
    font-size: 1.5em;
  }
  
  .bf-subtitle {
    font-size: 0.9em;
  }
}

@media screen and (max-width: 360px) {
  :root {
    --whellWidth: 260px;
    --itemWidth: 85px;
  }
  
  .spin {
    width: 70px;
    height: 70px;
    font-size: 1em;
  }
  
  .wheel-item .text {
    font-size: 0.7em;
  }
  
  .black-friday-header {
    padding: 10px;
  }
  
  .bf-title {
    font-size: 1.3em;
  }
  
  .bf-subtitle {
    font-size: 0.8em;
  }
  
  .container {
    padding-top: 100px !important;
  }
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 25px;
  right: 30px;
  border-radius: 12px;
  background: #fff;
  padding: 20px 35px 20px 25px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #4070f4;
  overflow: hidden;
  transform: translateX(calc(100% + 30px));
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.35);
  z-index: 9999;
}

.toast.active {
  transform: translateX(0%);
}

.toast .toast-content {
  display: flex;
  align-items: center;
}

.toast-content .check {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  width: 35px;
  background-color: #4070f4;
  color: #fff;
  font-size: 20px;
  border-radius: 50%;
}

.toast-content .message {
  display: flex;
  flex-direction: column;
  margin: 0 20px;
}

.message .text {
  font-size: 16px;
  font-weight: 400;
  color: #666666;
}

.message .text.text-1 {
  font-weight: 600;
  color: #333;
}

.toast .close {
  position: absolute;
  top: 10px;
  right: 15px;
  padding: 5px;
  cursor: pointer;
  opacity: 0.7;
}

.toast .close:hover {
  opacity: 1;
}

.toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: #ddd;
}

.toast .progress:before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: #4070f4;
}

.toast.active .progress:before {
  animation: progress 3s linear forwards;
}

.toast.toast-error {
  border-left-color: #ff3b30;
}

.toast.toast-error .check {
  background-color: #ff3b30;
}

.toast.toast-error .progress:before {
  background-color: #ff3b30;
}

@keyframes progress {
  100% {
    right: 100%;
  }
}