/* ==========================================================
   STYLE.CSS — Modern Premium (Glassmorphism)
   Unificado com tema dark via .dark
========================================================== */

/* ---------- Root variables (cores e sombras) ---------- */
:root {
  --bg: #eef0f37a;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #4258ff;
  --pill-radius: 4px;
  --shadow-strong: 0 8px 22px rgba(0,0,0,0.06);
  --shadow-soft: 0 2px 6px rgba(0,0,0,0.04);

  --max-width-card: 520px;
  --content-width: 420px;
  --gap: 14px;
}

/* Tema Dark variables sobrescreve as do :root */
.dark {
  --bg: #0e1217;
  --card: #141a22;
  --muted: #a5aab4;
  --accent: #4b8bff;
  --pill-radius: 4px;
  --shadow-strong: 0 8px 22px rgba(0,0,0,0.55);
  --shadow-soft: 0 2px 6px rgba(0,0,0,0.35);
}

/* ---------- Reset global ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f9faff 0%, #dfe6ff 100%);
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Modo dark */
.dark body {
  background: linear-gradient(180deg, #0b0f14 0%, #131a25 100%);
  color: #f3f4f6;
}

/* ---------- Page layout ---------- */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 18px 90px;
}

.card {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  align-items: center;

  /* entrada suave */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease-out forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Top simulation bar (small) ---------- */
.top-sim {
  width: 100%;
  max-width: var(--content-width);
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}
.top-sim .bar {
  width: 72%;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

/* Modo dark top bar */
.dark .top-sim .bar {
  background: rgba(255, 255, 255, 0.08);
  color: #b5bcd1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- Profile card (glass) ---------- */
.profile-area {
  width: 100%;
  padding: 32px 22px 40px;
  border-radius: 22px;

  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.35);

  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-strong), var(--shadow-soft);
}

/* Modo dark profile card */
.dark .profile-area {
  background: rgba(20, 24, 32, 0.75);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-strong);
}

/* Avatar com borda degradê */
.avatar {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  overflow: hidden;
  padding: 5px;
  background: linear-gradient(135deg, #4258ff, #8ca6ff) padding-box,
    linear-gradient(135deg, #fff, #e4e7ff) border-box;
  border: 3px solid transparent;
  margin-top: -6px;
}

/* Avatar modo dark */
.dark .avatar {
  background: linear-gradient(135deg, #4b8bff, #6fa9ff) padding-box,
    linear-gradient(135deg, #2e3c55, #10141a) border-box;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Nome e subtítulo */
.username {
  margin-top: 12px;
  font-weight: 700;
  font-size: 23px;
  color: #1f2bd6;
  text-align: center;l
}

/* Nome modo dark */
.dark .username {
  color: #ffffff;
}

.subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: #1f2bd6;
  text-align: center;
  line-height: 1.3;
  max-width: 80%;
}

/* Subtítulo modo dark */
.dark .subtitle {
  color: #d5ddff;
}

/* ---------- Social icons (top) ---------- */
.icon-btn img,
.icon-btn .icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  display: block;
}

.icons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-strong), var(--shadow-soft);
  transition: transform 0.25s cubic-bezier(0.21, 1.02, 0.73, 1),
    box-shadow 0.25s ease;
}
.icon-btn:hover {
  transform: translateY(-3px);
}

/* Modo dark ícones sociais */
.dark .icon-btn {
  background: #1a212d;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.dark .icon-btn:hover {
  transform: translateY(-4px);
  background: #243043;
}

/* ---------- Links / Buttons ---------- */
.links {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.link-pill {
  width: 100%;
  padding: 16px 20px;
  font-weight: 600;
  border-radius: var(--pill-radius);

  background: rgba(255, 255, 255, 0.7);
  color: #1f2bd6;

  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-strong), var(--shadow-soft);

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  transition: transform 0.25s cubic-bezier(0.21, 1.02, 0.73, 1),
    box-shadow 0.25s ease, background 0.3s ease;
}
.link-pill:hover {
  background: #eef1ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(34, 58, 239, 0.15);
}
.link-pill:active {
  transform: scale(0.97);
}

/* Modo dark botões */
.dark .link-pill {
  background: #1a212d;
  color: #dbe4ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.dark .link-pill:hover {
  background: #253043;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
}

/* 3 pontinhos à direita */
.dots {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
}

/* Modo dark pontinhos */
.dark .dots {
  color: #8590a6;
}

/* ---------- Bottom bar ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}

.bottom-inner {
  max-width: 980px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.bot-pill {
  width: calc(100% - 48px);
  max-width: 420px;
  padding: 12px 20px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.18);
}

/* Modo dark bottom bar */
.dark .bottom-bar {
  background: rgba(0, 0, 0, 0.3);
}
.dark .bot-pill {
  background: #111827;
  color: #e5e7eb;
}

/* ---------- Misc / accessibility ---------- */
button {
  border: 0;
  background: none;
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Responsividade ---------- */
@media (min-width: 900px) {
  .wrap {
    align-items: center;
    padding: 40px;
  }
  .card {
    max-width: var(--max-width-card);
  }
  .profile-area {
    padding: 40px;
  }
  .avatar {
    width: 140px;
    height: 140px;
  }
  .username {
    font-size: 26px;
  }
  .subtitle {
    font-size: 15px;
  }
  .links {
    gap: 20px;
  }
}

/* ==========================================================
   THEME SWITCH (estilo iPhone)
========================================================== */

.theme-toggle {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
  padding-right: 6px;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #08306b;/* cor do botao dark and light*/
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white; /*Botao tema dark e light*/
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: #111827;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
}

body.login-page-body {
    display: block !important;
}

.modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    padding: 32px 28px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: modalFade 0.35s ease;
}

.modal-box.success h3 {
    color: #1e7e34;
    font-size: 22px;
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 15px;
    color: #555;
    margin-bottom: 24px;
}

.modal-box button {
    background: #0a58ca;
    color: #fff;
    border: none;
    padding: 12px 34px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
}

.modal-box button:hover {
    background: #084298;
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.modal-open {
    overflow: hidden;
}
