/* ===== GreatIDE Web · Tema oscuro ===== */
:root {
  --bg-0: #0a0a0a;
  --bg-1: #0f0f0f;
  --bg-2: #141414;
  --bg-3: #1a1a1a;
  --border: #262626;
  --text: #f5f5f5;
  --text-dim: #a0a0a0;
  --text-faint: #6b6b6b;
  --white: #ffffff;
  --danger: #ff4d4f;
  --success: #4ade80;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-0); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; }
a { color: var(--white); text-decoration: none; }
a:hover { opacity: 0.8; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
nav.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(10px); z-index: 100;
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
.brand span { color: var(--text-dim); font-weight: 400; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { padding: 8px 14px; border-radius: 8px; color: var(--text-dim); font-size: 14px; }
.nav-links a:hover { background: var(--bg-3); color: var(--text); }

/* ===== Botones ===== */
.btn {
  display: inline-block; background: var(--white); color: #000; padding: 10px 20px;
  border-radius: 8px; font-weight: 600; font-size: 14px; border: none; cursor: pointer;
}
.btn:hover { opacity: 0.85; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--bg-3); opacity: 1; }
.btn.large { padding: 14px 28px; font-size: 16px; }
.btn.block { display: block; width: 100%; text-align: center; }

/* ===== Hero ===== */
.hero { padding: 100px 0 80px; text-align: center; }
.hero h1 { font-size: 60px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.hero h1 span { color: var(--text-dim); }
.hero p { color: var(--text-dim); font-size: 20px; margin: 20px auto 36px; max-width: 600px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; }

/* ===== Captura del IDE ===== */
.hero-shot { margin-top: 60px; perspective: 1400px; }
.shot-frame {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.03);
  transform: rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  animation: shot-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform;
}
/* Mientras se sigue el cursor, sin transición para que el movimiento sea inmediato */
.shot-frame.tilting { transition: box-shadow 0.4s ease, border-color 0.4s ease; }
.shot-frame:hover {
  box-shadow: 0 50px 120px -25px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.08), 0 0 60px -20px rgba(255,255,255,0.12);
  border-color: #3a3a3a;
}
.shot-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.shot-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.shot-bar span:nth-child(1) { background: #ff5f57; }
.shot-bar span:nth-child(2) { background: #febc2e; }
.shot-bar span:nth-child(3) { background: #28c840; }
.shot-frame img { display: block; width: 100%; height: auto; }

@keyframes shot-in {
  from { opacity: 0; transform: rotateX(10deg) translateY(40px); }
  to   { opacity: 1; transform: rotateX(4deg) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .shot-frame { animation: none; transition: none; transform: none; }
}

/* ===== Features ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px 0 80px; }
.feature { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.feature .ico { font-size: 28px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 14px; }

/* ===== Pricing ===== */
.section-title { text-align: center; padding: 60px 0 10px; }
.section-title h2 { font-size: 40px; font-weight: 800; }
.section-title p { color: var(--text-dim); margin-top: 10px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 40px 0 80px; }
.plan-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px; padding: 28px 22px; display: flex; flex-direction: column; }
.plan-card.featured { border-color: var(--white); }
.plan-card h3 { font-size: 20px; }
.plan-price { font-size: 38px; font-weight: 800; margin: 14px 0 4px; }
.plan-price small { font-size: 14px; color: var(--text-dim); font-weight: 400; }
.plan-card ul { list-style: none; margin: 18px 0; flex: 1; }
.plan-card li { padding: 6px 0; color: var(--text-dim); font-size: 14px; border-bottom: 1px solid var(--border); }
.plan-card li::before { content: '✓ '; color: var(--success); }
.badge { display: inline-block; background: var(--white); color: #000; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; margin-bottom: 8px; align-self: flex-start; }

/* ===== Auth forms ===== */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 73px); padding: 40px 20px; }
.auth-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-dim); margin-bottom: 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 12px; border-radius: 8px; font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--text-faint); }
.form-error { background: rgba(255,77,79,0.1); border: 1px solid var(--danger); color: #ffb3b3; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.form-foot { margin-top: 18px; text-align: center; color: var(--text-dim); font-size: 14px; }

/* ===== Dashboard ===== */
.dash { padding: 50px 0; }
.dash h1 { font-size: 32px; margin-bottom: 6px; }
.dash .muted { color: var(--text-dim); margin-bottom: 30px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.card .label { color: var(--text-dim); font-size: 13px; }
.card .value { font-size: 32px; font-weight: 800; margin-top: 6px; }
.usage-bar { height: 10px; background: var(--bg-3); border-radius: 5px; overflow: hidden; margin-top: 14px; }
.usage-bar .fill { height: 100%; background: var(--white); }

/* ===== Cupones ===== */
.coupon-box { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 30px; }
.coupon-redeem, .coupon-status { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.coupon-redeem h2, .coupon-status h2 { font-size: 18px; margin-bottom: 4px; }
.coupon-form { display: flex; gap: 10px; }
.coupon-form input { flex: 1; background: var(--bg-3); border: 1px solid var(--border); color: var(--text); padding: 11px 14px; border-radius: 8px; font-size: 14px; font-family: var(--font); text-transform: uppercase; letter-spacing: 1px; }
.coupon-form input:focus { outline: none; border-color: var(--white); }
.coupon-msg { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.coupon-msg.ok { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.35); }
.coupon-msg.err { background: rgba(255,77,79,0.12); color: var(--danger); border: 1px solid rgba(255,77,79,0.35); }
.coupon-stat { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.coupon-stat .label { color: var(--text-dim); font-size: 13px; }
.coupon-stat .value { font-size: 22px; font-weight: 800; }
.coupon-stat .value.sm { font-size: 14px; font-weight: 600; }

/* ===== Registro de solicitudes ===== */
.log-table { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.log-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.log-table th { text-align: left; padding: 14px 18px; color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.log-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.log-table tbody tr:last-child td { border-bottom: none; }
.log-table tbody tr:hover { background: var(--bg-2); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--bg-3); color: var(--text-dim); border: 1px solid var(--border); }
.tag-premium { background: rgba(74,222,128,0.12); color: var(--success); border-color: rgba(74,222,128,0.35); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.pager .pager-info { color: var(--text-dim); font-size: 13px; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.ghost.disabled { opacity: 0.4; pointer-events: none; }

/* ===== Authorize ===== */
.authorize-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 73px); padding: 40px 20px; }
.authorize-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 440px; text-align: center; }
.authorize-card .ico { font-size: 40px; margin-bottom: 16px; }

/* ===== Footer / misc ===== */
footer.site { border-top: 1px solid var(--border); padding: 30px 0; color: var(--text-faint); text-align: center; font-size: 13px; }
.error-page { text-align: center; padding: 120px 20px; }
.error-page h1 { font-size: 80px; }

@media (max-width: 860px) {
  .features, .plans, .cards { grid-template-columns: 1fr; }
  .coupon-box { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
}

/* ============================================================
   PREMIUM POLISH · refinamientos visuales (capa aditiva)
   ============================================================ */
:root {
  --accent: #6c8cff;                      /* acento frío sutil */
  --accent-soft: rgba(108,140,255,0.16);
  --ring: rgba(108,140,255,0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 14px 40px -16px rgba(0,0,0,0.7);
  --shadow-lg: 0 30px 80px -25px rgba(0,0,0,0.85);
}

/* Fondo con resplandor ambiental + render nítido */
body {
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(255,255,255,0.055), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(108,140,255,0.06), transparent 55%),
    var(--bg-0);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); }

/* Transiciones suaves en elementos interactivos */
a, .btn, .feature, .plan-card, .card, .nav-links a, .field input,
.coupon-form input, .log-table tbody tr, .tag {
  transition: background .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), box-shadow .25s var(--ease),
              transform .2s var(--ease), opacity .2s ease;
}

/* Nav glassy más fina */
nav.topnav {
  background: rgba(10,10,10,0.62);
  border-bottom-color: rgba(255,255,255,0.06);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.nav-links a:hover { transform: translateY(-1px); }

/* Hero: título con degradado y mejor balance */
.hero h1 {
  background: linear-gradient(180deg, #ffffff 28%, #9b9b9b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero h1 span {
  -webkit-text-fill-color: var(--text-faint);
  color: var(--text-faint);
}

/* Botones premium */
.btn {
  background: linear-gradient(180deg, #ffffff, #e8e8e8);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 6px 22px -10px rgba(255,255,255,0.3);
}
.btn:hover {
  opacity: 1; transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 12px 30px -10px rgba(255,255,255,0.4);
}
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: rgba(255,255,255,0.025);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255,255,255,0.07); transform: translateY(-1px); }

/* Tarjetas con elevación y borde con luz */
.feature, .plan-card, .card, .auth-card, .authorize-card,
.coupon-redeem, .coupon-status, .log-table {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    var(--bg-1);
  border-color: rgba(255,255,255,0.07);
  box-shadow: var(--shadow-sm);
}
.feature:hover, .card:hover, .plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: var(--shadow-md);
}
.feature .ico {
  display: inline-flex; width: 50px; height: 50px;
  align-items: center; justify-content: center;
  border-radius: 14px; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* Plan destacado: anillo de acento con glow */
.plan-card.featured {
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 22px 60px -26px rgba(108,140,255,0.45);
}
.plan-card.featured:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 30px 76px -26px rgba(108,140,255,0.55);
}

/* Inputs con foco premium */
.field input:focus, .coupon-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Tabla de registro: filas con hover suave */
.log-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Captura del IDE: borde con luz */
.shot-frame { border-color: rgba(255,255,255,0.08); }

/* Scrollbar refinada */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 7px; border: 3px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }
::-webkit-scrollbar-track { background: transparent; }
