#roleta-container {
    text-align: center;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

#roleta-wheel {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto 30px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* 1) usamos a variável --i para girar cada fatia */
.roleta-sections {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible; /* para as legendas poderem “sair” da área circular */
}
.roleta-section {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 0;
  left: 50%;
  transform-origin: 0% 100%;           /* pivô no centro da roleta */
  transform: rotate(calc(var(--i) * 36deg)); /* 360° ÷ 10 = 36° por fatia */
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  /* retire aqui TODO qualquer nth-child que gire a seção */
}

/* 2) legenda posicionada radialmente em uma única linha */
.roleta-section span {
  position: absolute;
  top: 50%;                             /* centro vertical da fatia */
  left: 100%;                           /* parte externa da fatia */
  transform-origin: left center;
  /* cancelar a rotação da .roleta-section e girar +18° (metade de 36) */
  transform: rotate(calc(18deg - var(--i) * 36deg));
  white-space: nowrap;                  /* não quebra linha */
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  font-size: 14px;
  margin-left: 10px;                    /* afasta do círculo central */
}

.roleta-section:nth-child(1) {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    transform: rotate(0deg);
}

.roleta-section:nth-child(2) {
    background: linear-gradient(135deg, #4ECDC4, #26A69A);
    transform: rotate(36deg);
}

.roleta-section:nth-child(3) {
    background: linear-gradient(135deg, #45B7D1, #2196F3);
    transform: rotate(72deg);
}

.roleta-section:nth-child(4) {
    background: linear-gradient(135deg, #96CEB4, #4CAF50);
    transform: rotate(108deg);
}

.roleta-section:nth-child(5) {
    background: linear-gradient(135deg, #FFEAA7, #FFC107);
    transform: rotate(144deg);
}

.roleta-section:nth-child(6) {
    background: linear-gradient(135deg, #DDA0DD, #9C27B0);
    transform: rotate(180deg);
}

.roleta-section:nth-child(7) {
    background: linear-gradient(135deg, #FAD390, #FF9800);
    transform: rotate(216deg);
}

.roleta-section:nth-child(8) {
    background: linear-gradient(135deg, #F8B500, #FF5722);
    transform: rotate(252deg);
}

.roleta-section:nth-child(9) {
    background: linear-gradient(135deg, #6C5CE7, #673AB7);
    transform: rotate(288deg);
}

.roleta-section:nth-child(10) {
    background: linear-gradient(135deg, #A29BFE, #3F51B5);
    transform: rotate(324deg);
}

.roleta-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2C3E50, #34495E);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.roleta-pointer {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #2C3E50;
    transform: translateX(-50%);
    z-index: 11;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#roleta-form {
    margin-top: 30px;
}

#user-email {
    width: 250px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-right: 10px;
    outline: none;
    transition: border-color 0.3s;
}

#user-email:focus {
    border-color: #4ECDC4;
}

#spin-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4ECDC4, #26A69A);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#spin-btn:active {
    transform: translateY(0);
}

#spin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#loading {
    margin-top: 20px;
    font-size: 18px;
    color: #666;
}

#result-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-content h3 {
    color: #4ECDC4;
    font-size: 24px;
    margin-bottom: 20px;
}

.popup-content p {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

#countdown {
    font-weight: bold;
    color: #FF6B6B;
}

@media (max-width: 480px) {
    #roleta-wheel {
        width: 300px;
        height: 300px;
    }
    
    #user-email {
        width: 200px;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    #roleta-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
  .roleta-section span {
    font-size: 12px;
    margin-left: 6px;
  }
}