/* =========================================================
   ARQUIVO: assets/css/style.css
   PROJETO: Roleta Premiada
   ========================================================= */

* { box-sizing: border-box; }

body{
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  min-height: 100vh;

  /* espaço pro footer fixo */
  padding-bottom: 60px;
}

@media (max-width: 768px){
  body{ padding-bottom: 90px; }
}

/* =========================================================
   TOPBAR (MOBILE)
   ========================================================= */
.topbar{
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 12px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  align-items: center;
  gap: 10px;
}

.topbar-title{ font-weight: 900; }

/* =========================================================
   BOTÕES
   ========================================================= */
.icon-btn{
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 900;
}

.icon-btn.close{ margin-left: auto; }

.btn{
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 900;
  background: #ffcc00;
  color: #000;
  transition: transform 0.05s ease;
  white-space: nowrap;
}

.btn:active{ transform: scale(0.97); }

.btn.small{ padding: 10px 12px; }

.btn.danger{
  background: #ff5c5c;
  color: #000;
}

.btn.spin{
  margin-top: 18px;
  font-size: 18px;
  padding: 12px 36px;
}

/* =========================================================
   OVERLAY (SIDEBAR MOBILE)
   ========================================================= */
.overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 90;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.app{
  display: flex;
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar{
  width: 380px;
  max-width: 90vw;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  padding: 14px;
  border-right: 1px solid rgba(255,255,255,0.12);
  overflow-y: auto;
}

.sidebar-head{
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar h2{ margin: 0; }

.panel{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.1);
}

.panel h3{ margin: 0 0 10px 0; }

.panel-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* =========================================================
   FORM
   ========================================================= */
.field{ margin-top: 12px; }

label{
  display: block;
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 6px;
}

input, textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  color: #fff;
  outline: none;
}

textarea{ resize: vertical; }

.row{
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.row.wrap{ flex-wrap: wrap; }

.counter{
  margin-top: 10px;
  font-weight: 900;
  opacity: 0.95;
}

/* =========================================================
   LISTAS
   ========================================================= */
.list{
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
  max-height: 32vh;
  overflow-y: auto;
}

.list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.1);
}

.list .name{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list .remove{
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

/* =========================================================
   MAIN
   ========================================================= */
.main{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 14px;
}

.desktop-title{
  margin: 0 0 10px 0;
}

.result{
  margin-top: 14px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.hint{
  margin-top: 8px;
  opacity: 0.8;
  font-size: 13px;
}

.hint.center{
  text-align: center;
  max-width: 520px;
}

/* =========================================================
   ROLETA + ZETA
   ========================================================= */
.wheel-container{
  position: relative;
  width: 420px;
  height: 420px;
  margin-top: 12px;
  overflow: visible; /* essencial */
}

canvas{
  position: relative;
  z-index: 1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
}

/* zeta */
.pointer{
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;

  width: 0;
  height: 0;

  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 40px solid #ffcc00;

  filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
  display: block;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 900px){
  .topbar{ display: flex; }

  .desktop-title{ display: none; }

  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 95;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .sidebar.open{ transform: translateX(0); }

  .overlay.show{ display: block; }

  .wheel-container{
    width: 340px;
    height: 340px;
    overflow: visible;
  }

  canvas{
    width: 340px;
    height: 340px;
  }

  .pointer{ top: -18px; }
}

/* =========================================================
   MODAIS (BASE)
   ========================================================= */
body.modal-open{
  overflow: hidden;
}

/* modal como flex para centralizar */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.modal.show{
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.70);
}

.modal-card{
  position: relative;
  width: min(700px, 92vw);
  max-height: 86vh;
  overflow: auto;

  padding: 14px;
  border-radius: 16px;

  background: rgba(18, 10, 40, 0.97);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);

  z-index: 2;
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-head h3{
  margin: 0;
  font-weight: 900;
}

.modal-sub{
  margin: 10px 0 10px 0;
  opacity: 0.9;
  font-size: 14px;
}

.modal-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.modal-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.modal-list-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
}

.modal-list-name{
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-empty{
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.20);
  border: 1px dashed rgba(255,255,255,0.18);
  opacity: 0.9;
}

/* =========================================================
   MODAL GANHADOR
   ========================================================= */
.winner-card{ text-align: center; }

.winner-name{
  margin: 14px 0 6px 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.winner-timer{
  opacity: 0.85;
  font-weight: 700;
}

/* =========================================================
   FOOTER FIXO
   ========================================================= */
.app-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1500;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 16px;

  background: linear-gradient(135deg, #1a0f3c, #2b1d6f);
  border-top: 1px solid rgba(255,255,255,0.12);

  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.footer-left, .footer-center, .footer-right{
  white-space: nowrap;
}

@media (max-width: 768px){
  .app-footer{
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* botão fullscreen destaque */
#fullscreenToggle{
  font-size: 18px;
  line-height: 1;
}

/* ===============================
   PADRONIZAR BOTÕES DO PAINEL (SIDEBAR)
   - sem mexer no resto do layout
================================ */

/* Painel lateral: todos os botões iguais */
.sidebar .btn {
  width: 100%;
  min-height: 44px;       /* altura padrão */
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Quando estiver em "row wrap", ainda ficam alinhados */
.sidebar .row.wrap .btn {
  flex: 1 1 160px;        /* todos crescem igual e quebram linha bonito */
}

/* Botões pequenos do painel (ex: remover) continuam menores */
.sidebar .btn.small {
  width: auto;
  min-height: 34px;
  padding: 6px 10px;
}

/* Se você tiver botões "danger" com padding diferente, uniformiza também */
.sidebar .btn.danger {
  min-height: 44px;
}