:root {
  --bg: #120e1a;
  --panel: #1c1626;
  --panel-hover: #241c33;
  --line: #332b44;

  --text: #e8e6f0;
  --muted: #8b83a3;

  --purple: #a374ff;
  --purple-soft: #2a2140;

  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1150px;
  margin: auto;
  padding: 25px 20px 70px;
}

/* =========================
   HEADER
========================= */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--purple);
  color: var(--bg);

  border-radius: 10px;

  font-size: 18px;
  font-weight: bold;
}

.brand h1 {
  font-size: 19px;
  letter-spacing: 0.5px;
}

.brand span,
.preview-brand span {
  color: var(--purple);
}

.login-link {
  border: 1px solid var(--line);
  padding: 10px 17px;
  border-radius: 8px;

  font-size: 14px;
  transition: 0.2s;
}

.login-link:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
}

/* =========================
   HERO
========================= */

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;

  align-items: center;

  padding: 90px 0 100px;
}

.badge {
  display: inline-block;

  background: var(--purple-soft);
  color: var(--purple);

  padding: 8px 13px;
  border-radius: 20px;

  font-size: 13px;

  margin-bottom: 20px;

  border: 1px solid var(--line);
}

.hero h2 {
  font-size: 56px;
  line-height: 1.05;
  margin-bottom: 22px;
}

.hero h2 span {
  color: var(--purple);
}

.hero p {
  color: var(--muted);

  max-width: 500px;

  font-size: 17px;
  line-height: 1.7;

  margin-bottom: 30px;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 20px;
  border-radius: 9px;

  font-weight: bold;
  font-size: 14px;

  transition: 0.2s;
}

.primary {
  background: var(--purple);
  color: var(--bg);
}

.primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.secondary {
  border: 1px solid var(--line);
}

.secondary:hover {
  background: var(--purple-soft);
}

/* =========================
   PREVIEW
========================= */

.preview {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 18px;

  padding: 22px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding-bottom: 18px;

  border-bottom: 1px solid var(--line);
}

.preview-brand {
  font-weight: bold;
  font-size: 15px;
}

.status {
  font-size: 12px;
  color: #7ee787;
}

.email-box {
  margin-top: 20px;
}

.email-box p {
  color: var(--muted);
  font-size: 12px;

  margin-bottom: 8px;
}

.email-row {
  background: var(--purple-soft);

  border-radius: 10px;

  padding: 13px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.email-row span {
  color: var(--purple);
  font-family: monospace;

  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row button {
  background: var(--purple);

  border: none;

  padding: 8px 12px;

  border-radius: 7px;

  cursor: pointer;

  font-weight: bold;
}

.code-card {
  margin-top: 20px;

  border: 1px solid var(--line);

  border-radius: 12px;

  padding: 18px;
}

.code-header {
  display: flex;
  justify-content: space-between;

  font-size: 12px;

  color: var(--muted);
}

.code {
  text-align: center;

  font-size: 42px;

  letter-spacing: 10px;

  color: var(--purple);

  font-family: monospace;

  font-weight: bold;

  padding: 25px 0;
}

.copy-code {
  width: 100%;

  background: var(--purple-soft);

  color: var(--purple);

  border: 1px solid var(--line);

  padding: 11px;

  border-radius: 8px;

  cursor: pointer;

  font-weight: bold;
}

.copy-code:hover {
  border-color: var(--purple);
}

/* =========================
   PLANES
========================= */

.plans {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;

  align-items: stretch;
}

.plan {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 15px;

  padding: 28px;

  position: relative;
}

.plan:hover {
  border-color: #5b4a78;
}

.plan.featured {
  border: 1px solid var(--purple);

  transform: translateY(-10px);

  box-shadow: 0 20px 50px rgba(163, 116, 255, 0.12);
}

.popular {
  position: absolute;

  top: -13px;
  left: 50%;

  transform: translateX(-50%);

  background: var(--purple);

  color: var(--bg);

  padding: 6px 12px;

  border-radius: 20px;

  font-size: 10px;

  font-weight: bold;

  white-space: nowrap;
}

.plan-name {
  color: var(--purple);

  font-weight: bold;

  margin-bottom: 15px;
}

.plan h3 {
  font-size: 38px;

  margin-bottom: 8px;
}

.plan h3 small {
  font-size: 13px;

  color: var(--muted);
}

.plan p {
  color: var(--muted);

  font-size: 13px;

  margin-bottom: 25px;
}

.plan ul {
  list-style: none;

  margin-bottom: 28px;
}

.plan li {
  font-size: 13px;

  margin-bottom: 13px;

  color: #c9c4dc;
}

.plan-button {
  display: block;

  text-align: center;

  border: 1px solid var(--line);

  padding: 12px;

  border-radius: 8px;

  font-size: 13px;

  font-weight: bold;

  transition: 0.2s;
}

.plan-button:hover {
  background: var(--purple-soft);
}

.primary-plan {
  background: var(--purple);

  color: var(--bg);

  border-color: var(--purple);
}

.primary-plan:hover {
  opacity: 0.9;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 850px) {

  main {
    grid-template-columns: 1fr;
    gap: 40px;

    padding: 60px 0;
  }

  .hero h2 {
    font-size: 45px;
  }

  .plans {
    grid-template-columns: 1fr;
  }

  .plan.featured {
    transform: none;
  }

}

@media (max-width: 500px) {

  .container {
    padding: 20px 15px 50px;
  }

  .hero h2 {
    font-size: 38px;
  }

  .email-row {
    flex-direction: column;
    align-items: stretch;
  }

  .email-row button {
    width: 100%;
  }

  .code {
    font-size: 30px;
    letter-spacing: 6px;
  }

}
/* =========================
   REGISTRO / LOGIN
========================= */

.auth-page {
  min-height: 100vh;
  background: var(--bg);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px 20px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  margin-bottom: 30px;
}

.auth-brand h1 {
  font-size: 22px;
}

.auth-brand span {
  color: var(--purple);
}

.auth-card {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 18px;

  padding: 32px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.auth-header {
  text-align: center;

  margin-bottom: 30px;
}

.auth-header h2 {
  font-size: 28px;

  margin-bottom: 8px;
}

.auth-header p {
  color: var(--muted);

  font-size: 14px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
}

.auth-card label {
  font-size: 13px;

  color: var(--text);

  margin-bottom: 8px;
  margin-top: 16px;
}

.auth-card input {
  width: 100%;

  background: var(--purple-soft);

  border: 1px solid var(--line);

  color: var(--text);

  padding: 13px;

  border-radius: 9px;

  outline: none;

  font-size: 14px;

  transition: 0.2s;
}

.auth-card input:focus {
  border-color: var(--purple);

  box-shadow: 0 0 0 3px rgba(163, 116, 255, 0.1);
}

.auth-card input::placeholder {
  color: var(--muted);
}

.auth-button {
  width: 100%;

  margin-top: 25px;

  background: var(--purple);

  color: var(--bg);

  border: none;

  padding: 14px;

  border-radius: 9px;

  font-size: 14px;

  font-weight: bold;

  cursor: pointer;

  transition: 0.2s;
}

.auth-button:hover {
  transform: translateY(-2px);

  opacity: 0.9;
}

.auth-divider {
  display: flex;
  align-items: center;

  gap: 12px;

  margin: 25px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";

  flex: 1;

  height: 1px;

  background: var(--line);
}

.auth-divider span {
  color: var(--muted);

  font-size: 12px;
}

.auth-footer {
  text-align: center;

  color: var(--muted);

  font-size: 14px;
}

.auth-footer a {
  color: var(--purple);

  font-weight: bold;
}

.auth-benefits {
  display: flex;
  flex-direction: column;

  align-items: center;

  gap: 10px;

  margin-top: 25px;

  color: var(--muted);

  font-size: 12px;
}

.auth-benefits span::first-letter {
  color: var(--purple);
}

@media (max-width: 500px) {

  .auth-card {
    padding: 25px 20px;
  }

}
.forgot-password {
  text-align: right;
  margin-top: 10px;
}

.forgot-password a {
  color: var(--purple);
  font-size: 12px;
}

.code-login {
  width: 100%;

  background: var(--purple-soft);
  color: var(--text);

  border: 1px solid var(--line);

  padding: 13px;

  border-radius: 9px;

  font-size: 14px;

  font-weight: bold;

  cursor: pointer;

  transition: 0.2s;
}

.code-login:hover {
  border-color: var(--purple);
  background: #33264d;
}
/* =========================
   DASHBOARD
========================= */

.dashboard-page {
  min-height: 100vh;
  background: var(--bg);
}

.dashboard {
  width: 100%;
  min-height: 100vh;
}

/* Header */

.dashboard-header {
  max-width: 1200px;
  margin: auto;

  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line);
}

.dashboard-brand {
  margin-bottom: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-email {
  color: var(--muted);
  font-size: 13px;
}

.logout-button {
  background: transparent;
  color: var(--text);

  border: 1px solid var(--line);

  padding: 10px 14px;
  border-radius: 8px;

  cursor: pointer;
}

.logout-button:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}


/* Contenido */

.dashboard-content {
  max-width: 1200px;
  margin: auto;

  padding: 60px 20px;
}

.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 30px;

  margin-bottom: 40px;
}

.welcome-small {
  color: var(--purple);

  font-size: 11px;
  font-weight: bold;

  letter-spacing: 1px;

  margin-bottom: 10px;
}

.dashboard-welcome h2 {
  font-size: 34px;

  margin-bottom: 10px;
}

.dashboard-welcome h2 span {
  color: var(--purple);
}

.dashboard-welcome > div > p:last-child {
  color: var(--muted);
}

.create-email-button,
.small-create-button {
  background: var(--purple);
  color: var(--bg);

  border: none;

  padding: 13px 18px;
  border-radius: 9px;

  font-weight: bold;

  cursor: pointer;
}

.create-email-button:hover,
.small-create-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}


/* Estadísticas */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 18px;

  margin-bottom: 45px;
}

.stat-card {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 14px;

  padding: 22px;

  display: flex;
  align-items: center;

  gap: 15px;
}

.stat-icon {
  width: 45px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--purple-soft);

  border-radius: 10px;

  font-size: 20px;
}

.stat-card p {
  color: var(--muted);

  font-size: 12px;

  margin-bottom: 5px;
}

.stat-card h3 {
  font-size: 22px;
}

.stat-card h3 span {
  color: var(--muted);

  font-size: 13px;
}


/* Direcciones */

.dashboard-section {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 18px;

  overflow: hidden;
}

.section-header {
  padding: 22px 25px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line);
}

.section-header h2 {
  font-size: 18px;

  margin-bottom: 5px;
}

.section-header p {
  color: var(--muted);

  font-size: 13px;
}

.small-create-button {
  padding: 10px 14px;

  font-size: 12px;
}


/* Estado vacío */

.empty-state {
  text-align: center;

  padding: 70px 20px;
}

.empty-icon {
  font-size: 45px;

  margin-bottom: 15px;
}

.empty-state h3 {
  font-size: 20px;

  margin-bottom: 10px;
}

.empty-state p {
  color: var(--muted);

  font-size: 14px;

  margin-bottom: 25px;
}

.create-first-button {
  width: auto;

  padding-left: 20px;
  padding-right: 20px;
}


/* Responsive */

@media (max-width: 750px) {

  .dashboard-header {
    padding: 15px;
  }

  .user-email {
    display: none;
  }

  .dashboard-content {
    padding: 40px 15px;
  }

  .dashboard-welcome {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;

    gap: 15px;
  }

}
/* =========================
   DIRECCIONES DE CORREO
========================= */

.email-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 25px;

  border-bottom: 1px solid var(--line);
}

.email-item:last-child {
  border-bottom: none;
}

.email-item-info {
  display: flex;
  align-items: center;

  gap: 15px;
}

.email-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--purple-soft);

  border-radius: 10px;
}

.email-item-info strong {
  display: block;

  margin-bottom: 5px;
}

.email-item-info small {
  color: var(--muted);
}

.copy-email-button {
  background: transparent;

  color: var(--text);

  border: 1px solid var(--line);

  padding: 9px 14px;

  border-radius: 8px;

  cursor: pointer;
}

.copy-email-button:hover {
  border-color: var(--purple);
}


/* =========================
   MODAL CREAR DIRECCIÓN
========================= */

.modal {
  position: fixed;

  inset: 0;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.7);

  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-box {
  position: relative;

  width: 100%;
  max-width: 480px;

  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 18px;

  padding: 30px;
}

.modal-box h2 {
  font-size: 24px;

  margin-bottom: 8px;
}

.modal-box > p {
  color: var(--muted);

  font-size: 14px;

  margin-bottom: 25px;
}

.modal-close {
  position: absolute;

  top: 15px;
  right: 18px;

  background: transparent;

  color: var(--muted);

  border: none;

  font-size: 28px;

  cursor: pointer;
}

.email-input-group {
  display: flex;

  align-items: center;

  margin-top: 8px;
}

.email-input-group input {
  flex: 1;

  min-width: 0;

  background: var(--purple-soft);

  border: 1px solid var(--line);

  color: var(--text);

  padding: 13px;

  border-radius: 9px 0 0 9px;

  outline: none;
}

.email-input-group input:focus {
  border-color: var(--purple);
}

.email-input-group span {
  background: var(--purple-soft);

  border: 1px solid var(--line);
  border-left: none;

  color: var(--muted);

  padding: 13px;

  border-radius: 0 9px 9px 0;

  font-size: 13px;
}

.input-help {
  color: var(--muted);

  font-size: 11px;

  margin-top: 8px;
  margin-bottom: 20px;
}


@media (max-width: 500px) {

  .email-item {
    padding: 18px 15px;
  }

  .email-item strong {
    font-size: 13px;
  }

  .modal-box {
    padding: 25px 20px;
  }

  .email-input-group {
    flex-direction: column;

    align-items: stretch;
  }

  .email-input-group input {
    border-radius: 9px;
  }

  .email-input-group span {
    border-left: 1px solid var(--line);

    border-radius: 9px;

    margin-top: 8px;
  }

}
/* =========================
   BANDEJA DE ENTRADA
========================= */

.email-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.open-inbox-button {
  background: var(--purple);
  color: var(--bg);

  border: none;

  padding: 9px 14px;
  border-radius: 8px;

  cursor: pointer;

  font-weight: bold;
}

.open-inbox-button:hover {
  opacity: 0.9;
}

.back-button {
  display: inline-block;

  color: var(--muted);

  margin-bottom: 35px;

  text-decoration: none;
}

.back-button:hover {
  color: var(--purple);
}

.inbox-header {
  margin-bottom: 30px;
}

.inbox-header h2 {
  font-size: 30px;

  margin-bottom: 8px;
}

.inbox-header > div > p:last-child {
  color: var(--muted);
}

.inbox-section {
  background: var(--panel);

  border: 1px solid var(--line);

  border-radius: 18px;

  overflow: hidden;
}

@media (max-width: 600px) {

  .email-item {
    flex-direction: column;
    align-items: flex-start;

    gap: 15px;
  }

  .email-actions {
    width: 100%;
  }

  .email-actions button {
    flex: 1;
  }

}
/* =========================
   ARREGLO TARJETA DIRECCIONES
========================= */

/* Hacer más ancho el contenedor */
.dashboard-section {
  width: 100%;
  max-width: 900px;
}

/* Cada dirección */
.email-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 20px 25px;
}

/* Información del correo */
.email-item-info {
  display: flex;
  align-items: center;

  gap: 15px;

  flex: 1;
  min-width: 0;
}

/* Evitar que el correo se salga */
.email-item-info strong {
  display: block;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Contenedor de botones */
.email-actions {
  display: flex;
  align-items: center;

  gap: 10px;

  flex-shrink: 0;
}

/* Botón abrir bandeja */
.open-inbox-button {
  white-space: nowrap;

  min-width: 130px;
}

/* Botón copiar */
.copy-email-button {
  white-space: nowrap;

  min-width: 80px;
}


/* =========================
   CELULARES
========================= */

@media (max-width: 700px) {

  .dashboard-section {
    max-width: 100%;
  }

  .email-item {
    flex-direction: column;

    align-items: stretch;

    gap: 18px;
  }

  .email-item-info {
    width: 100%;
  }

  .email-item-info strong {
    white-space: normal;

    overflow: visible;
    text-overflow: initial;

    word-break: break-word;
  }

  .email-actions {
    width: 100%;
  }

  .open-inbox-button,
  .copy-email-button {
    flex: 1;

    min-width: 0;
  }

}
/* =========================
   MENSAJES DE LA BANDEJA
========================= */

.message-item {
  display: flex;
  align-items: flex-start;

  gap: 15px;

  padding: 20px 25px;

  border-bottom: 1px solid var(--line);

  cursor: pointer;

  transition: 0.2s;
}

.message-item:last-child {
  border-bottom: none;
}

.message-item:hover {
  background: var(--purple-soft);
}

.message-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--purple-soft);

  border-radius: 10px;

  flex-shrink: 0;
}

.message-info {
  flex: 1;
  min-width: 0;
}

.message-info strong {
  display: block;

  margin-bottom: 4px;
}

.message-info h3 {
  font-size: 15px;

  margin-bottom: 6px;
}

.message-info p {
  color: var(--muted);

  font-size: 13px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-date {
  color: var(--muted);

  font-size: 12px;

  white-space: nowrap;
}


/* CELULAR */

@media (max-width: 600px) {

  .message-item {
    padding: 18px 15px;
  }

  .message-date {
    display: none;
  }

}
/* ==========================================
   BOTÓN MEJORAR PLAN
========================================== */

.upgrade-button {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}


/* ==========================================
   TARJETA DEL PLAN ACTUAL
========================================== */

.current-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 28px;
  padding: 24px;

  border-radius: 16px;
}


.current-plan-info {
  display: flex;
  align-items: center;
  gap: 16px;
}


.current-plan-icon {
  font-size: 32px;
}


.current-plan-info p {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
}


.current-plan-info h2 {
  margin: 0 0 5px;
}


.current-plan-info span {
  font-size: 14px;
}


.current-plan-button {
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}


@media (max-width: 700px) {

  .user-menu {
    flex-wrap: wrap;
  }

  .upgrade-button {
    padding: 8px 12px;
  }

  .current-plan-card {
    flex-direction: column;
    align-items: flex-start;
  }

}