/* public/css/auth.css
   Clipsify Authentication & Login Stylesheet — Premium Dark Gold Theme
   Pixel-perfect alignment matching the Clipsify reference layout:
   Full-width top navigation, centered card with glowing gold border, icon-aligned inputs,
   and clean full-width bottom footer.
*/

:root {
  --auth-bg: #000000;
  --auth-surface: #050505;
  --auth-surface-raised: #0a0a0a;

  --auth-border: #1d1d1d;
  --auth-border-gold: rgba(184, 134, 11, 0.55);
  --auth-border-focus: #c9a227;

  --auth-text: #f5f5f5;
  --auth-text-muted: #858585;
  --auth-text-faint: #555555;

  --auth-accent: #c9a227;
  --auth-accent-hover: #d4af37;
  --auth-accent-glow: rgba(201, 162, 39, 0.14);

  --auth-btn-gold-start: #c9a227;
  --auth-btn-gold-end: #a67c00;
  --auth-btn-gold-hover: #d4af37;

  --auth-success: #22c55e;
  --auth-success-bg: rgba(34, 197, 94, 0.1);
  --auth-success-border: rgba(34, 197, 94, 0.25);

  --auth-danger: #ef4444;
  --auth-danger-bg: rgba(239, 68, 68, 0.1);
  --auth-danger-border: rgba(239, 68, 68, 0.25);

  --auth-radius: 20px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.auth-body {
  min-height: 100vh;
  background: var(--auth-bg);
  background-image: 
    radial-gradient(ellipse 65% 45% at 50% -5%, rgba(245, 158, 11, 0.08), transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(245, 158, 11, 0.03), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.03), transparent 45%);
  color: var(--auth-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* -------------------------------------------------------------------------- */
/* Top Navigation Bar — Clean Full Width                                     */
/* -------------------------------------------------------------------------- */

.auth-top-nav {
  width: 100%;
  padding: 16px 36px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 10;
}

.auth-top-nav-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.auth-brand:hover {
  opacity: 0.9;
}

.auth-brand-logo-img {
  height: 52px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.auth-top-action {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-top-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--auth-text-muted);
}

.auth-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--auth-accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  line-height: 1.2;
}

.auth-pill-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--auth-accent-hover);
  color: var(--auth-accent-hover);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------------- */
/* Main Container & Card — Centered                                           */
/* -------------------------------------------------------------------------- */

.auth-container {
  width: 100%;
  max-width: 440px;
  padding: 16px 20px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 5;
}

.auth-card {
  width: 100%;
  min-height: 540px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border-gold);
  border-radius: var(--auth-radius);
  padding: 38px 34px 34px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.95),
    0 0 32px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card-top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.auth-back-link {
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-back-link:hover {
  color: var(--auth-accent);
}

.auth-back-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Eyebrow, Headings & Subtitle */
.auth-eyebrow {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--auth-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.auth-title {
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: #ffffff;
  line-height: 1.2;
}

.auth-title-highlight {
  color: var(--auth-accent);
}

.auth-subtitle {
  text-align: center;
  font-size: 13.5px;
  color: var(--auth-text-muted);
  line-height: 1.45;
  margin: 0 0 26px;
}

/* -------------------------------------------------------------------------- */
/* Form Controls & Inputs                                                     */
/* -------------------------------------------------------------------------- */

.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  stroke: var(--auth-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  z-index: 2;
}

.auth-input {
  width: 100%;
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  padding: 0 14px;
  color: #ffffff;
  font-size: 13.5px;
  height: 46px;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-input-wrap.has-left-icon .auth-input {
  padding-left: 42px;
}

.auth-input-wrap.has-toggle .auth-input {
  padding-right: 42px;
}

.auth-input:hover:not(:disabled) {
  border-color: #383842;
}

.auth-input:focus {
  background: #15151a;
  border-color: var(--auth-border-focus);
  box-shadow: 0 0 0 2px var(--auth-accent-glow);
}

.auth-input::placeholder {
  color: var(--auth-text-faint);
}

.auth-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  color: var(--auth-text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  min-width: 30px;
  min-height: 30px;
  z-index: 3;
}

.auth-pwd-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.auth-pwd-toggle:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 1px;
}

.auth-pwd-toggle svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------------- */
/* Options Row: Remember Me & Forgot Password                                 */
/* -------------------------------------------------------------------------- */

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
  font-size: 13px;
}

.auth-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a1a1aa;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.auth-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid #3f3f46;
  background: #121216;
  accent-color: var(--auth-accent);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.auth-forgot-link {
  color: var(--auth-accent);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Gold Primary Submit Button                                                 */
/* -------------------------------------------------------------------------- */

.auth-btn-submit {
  width: 100%;
  padding: 0 18px;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--auth-btn-gold-start) 0%, var(--auth-btn-gold-end) 100%);
  color: #0b0b0e;
  border: none;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.auth-btn-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--auth-btn-gold-hover) 0%, var(--auth-accent) 100%);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.auth-btn-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-btn-arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.auth-btn-submit:hover .auth-btn-arrow {
  transform: translateX(2px);
}

/* -------------------------------------------------------------------------- */
/* Divider                                                                    */
/* -------------------------------------------------------------------------- */

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--auth-text-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--auth-border);
}

.auth-divider span {
  padding: 0 12px;
}

/* -------------------------------------------------------------------------- */
/* Social OAuth Grid (2 equal columns matching form width)                   */
/* -------------------------------------------------------------------------- */

.auth-oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.auth-btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  height: 44px;
  width: 100%;
  min-width: 0;
  border-radius: 9px;
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-border);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.auth-btn-oauth:hover {
  background: #17171e;
  border-color: #383842;
  color: var(--auth-accent-hover);
  transform: translateY(-1px);
}

.auth-btn-oauth:active {
  transform: translateY(1px);
}

.auth-btn-discord,
.auth-btn-google {
  /* Common class compatibility */
}

.auth-btn-google svg,
.auth-btn-discord svg {
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* OTP Confirmation UI                                                       */
/* -------------------------------------------------------------------------- */

.auth-mail-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.15);
  color: var(--auth-accent);
}

.auth-mail-dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--auth-accent);
  border: 2px solid var(--auth-surface);
  box-shadow: 0 0 8px var(--auth-accent);
}

.auth-email-highlight {
  color: var(--auth-accent);
  font-weight: 700;
  display: inline-block;
  margin: 2px 0;
  word-break: break-all;
}

.auth-otp-digit-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.auth-otp-digit,
.auth-input-otp {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  font-family: inherit;
  caret-color: var(--auth-accent);
  box-sizing: border-box;
}

.auth-otp-digit:focus,
.auth-input-otp:focus {
  background: #15151a;
  border-color: var(--auth-border-focus);
  box-shadow: 
    0 0 0 2px var(--auth-accent-glow),
    0 0 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.auth-otp-digit:hover:not(:focus),
.auth-input-otp:hover:not(:focus) {
  border-color: #383842;
}

.auth-otp-info-block {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--auth-text-muted);
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--auth-accent);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-link-btn:hover:not(:disabled) {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

.auth-link-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-otp-timer {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--auth-text-faint);
}

.auth-timer-val {
  color: var(--auth-accent);
  font-weight: 700;
  font-family: ui-monospace, monospace;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--auth-border);
  font-size: 12px;
  color: var(--auth-text-faint);
}

.auth-security-note svg {
  width: 15px;
  height: 15px;
  stroke: var(--auth-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Bottom Page Footer — Constrained 1200px Centered Container                */
/* -------------------------------------------------------------------------- */

.auth-footer {
  width: 100%;
  padding: 18px 36px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--auth-text-faint);
  box-sizing: border-box;
  z-index: 10;
}

.auth-footer-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.auth-footer-copy {
  color: var(--auth-text-faint);
}

.auth-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-footer-link {
  color: var(--auth-text-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-footer-link:hover {
  color: var(--auth-accent-hover);
}

/* -------------------------------------------------------------------------- */
/* Alerts & Banners                                                           */
/* -------------------------------------------------------------------------- */

.auth-alert {
  display: none;
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  animation: auth-fade-in 0.2s ease;
}

.auth-alert.is-error {
  display: block;
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
  border: 1px solid var(--auth-danger-border);
}

.auth-alert.is-success {
  display: block;
  background: var(--auth-success-bg);
  color: var(--auth-success);
  border: 1px solid var(--auth-success-border);
}

/* -------------------------------------------------------------------------- */
/* Switch link styles                                                         */
/* -------------------------------------------------------------------------- */

.auth-switch-text {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--auth-text-muted);
}

.auth-switch-link {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch-link:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Animations & Transitions                                                   */
/* -------------------------------------------------------------------------- */

@keyframes auth-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------------------- */
/* Responsive Adaptation                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 540px) {
  .auth-top-nav,
  .auth-footer {
    padding: 16px 20px;
  }

  .auth-top-text {
    display: none;
  }

  .auth-brand-logo-img {
    height: 55px;
    width: auto;
    max-width: 130px;
  }

  .auth-container {
    padding: 12px 14px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .auth-oauth-grid {
    grid-template-columns: 1fr;
  }

  .auth-otp-digit-group {
    gap: 6px;
  }

  .auth-otp-digit,
  .auth-input-otp {
    width: 44px;
    height: 52px;
    font-size: 20px;
  }

  .auth-footer {
    padding-bottom: 20px;
  }

  .auth-footer-inner {
    flex-direction: column-reverse;
    gap: 12px;
    text-align: center;
  }

  .auth-footer-links {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  body.auth-body {
    padding: 0;
  }
}

@media (max-width: 360px) {
  .auth-otp-digit,
  .auth-input-otp {
    width: 38px;
    height: 48px;
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-btn-oauth,
  .auth-btn-submit,
  .auth-input,
  .auth-otp-digit,
  .auth-input-otp,
  .auth-pill-btn,
  .auth-alert {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Discord Setup Badge & Hints */
.auth-discord-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.auth-discord-badge-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5865F2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-discord-badge-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-discord-badge-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-discord-badge-tag {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.auth-discord-badge-sub {
  font-size: 12px;
  color: #8c93a8;
}

.auth-input-hint {
  display: block;
  font-size: 11.5px;
  color: #858585;
  margin-top: 6px;
}


