/* Lucid Poker Account Styles */
/* Modern design matching LoginView.axaml aesthetic */

:root {
  --primary-purple: #8b3a96;
  --dark-purple: #5c2261;
  --bg-dark: #1a1a1a;
  --bg-card: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-dim: rgba(255, 255, 255, 0.5);
  --error-color: #ff4444;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d0d0d 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px var(--shadow-color);
}

/* Header Section */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 4px;
}

.header-text .tagline {
  font-size: 15px;
  color: var(--text-dim);
}

/* Error Message */
.error-message {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid var(--error-color);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--error-color);
  text-align: center;
  display: none;
}

.error-message.visible {
  display: block;
}

/* Buttons */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #000000;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-icon {
  width: 20px;
  height: 20px;
}

.test-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.test-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 6px;
  color: var(--text-dim);
  font-size: 12px;
}

.test-login-divider::before,
.test-login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border-color);
}

.field-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.text-field {
  height: 44px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 15px;
  padding: 0 14px;
}

.text-field:focus {
  border-color: var(--primary-purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 58, 150, 0.18);
}

.test-login-btn {
  margin-top: 8px;
  background: var(--primary-purple);
  color: var(--text-primary);
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading State */
.loading-container {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 58, 150, 0.2);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.8s linear infinite;
}

.loading-container p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 600px) {
  .card {
    padding: 32px 24px;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .header-text h1 {
    font-size: 24px;
  }

  .logo {
    width: 56px;
    height: 56px;
  }
}

/* Plan picker on the sign-in card */
.plan-section {
  margin-bottom: 24px;
}

.plan-section-label {
  margin-bottom: 12px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-hint {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-24 {
  margin-top: 24px;
}

.mb-16 {
  margin-bottom: 16px;
}

/* Turnstile CAPTCHA */
#turnstile-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 24px;
  min-height: 65px;
}

#turnstile-container:empty {
  display: none;
}

/* Cardle adoption sign-in */
.cardle-adopt-page {
  background: #030304;
  color: #f0f0f4;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  padding: 0;
}

/* 317px carousel + a body wide enough for Turnstile's 300px minimum. */
.cardle-adopt-page .container {
  max-width: 675px;
}

.cardle-adopt-card {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #1f1f29;
  border: 1px solid #252531;
  border-radius: 24px;
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.36);
}

.cardle-adopt-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 56px 28px 28px;
}

.cardle-adopt-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cardle-adopt-close::before {
  position: absolute;
  inset: -13px;
  content: "";
}

.cardle-adopt-close span,
.cardle-adopt-close span::after {
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #aaaac0;
  content: "";
}

.cardle-adopt-close span {
  transform: rotate(45deg);
}

.cardle-adopt-close span::after {
  left: 0;
  top: 0;
  transform: rotate(90deg);
}

.cardle-adopt-close:hover span,
.cardle-adopt-close:hover span::after {
  background: #f0f0f4;
}

.cardle-adopt-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  color: #f0f0f4;
}

.cardle-adopt-logo img {
  width: 28px;
  height: 28px;
}

.cardle-adopt-logo span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.cardle-adopt-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.cardle-adopt-header h1 {
  margin: 0;
  color: #f0f0f4;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.cardle-adopt-header p {
  margin: 0;
  color: #8d8daa;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.cardle-carousel {
  position: relative;
  flex: 0 0 317px;
  width: 317px;
  min-height: 442px;
  overflow: hidden;
  background: #030304;
}

.cardle-carousel::before,
.cardle-carousel::after {
  position: absolute;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  content: "";
}

.cardle-carousel::before {
  top: -161px;
  left: -175px;
  width: 445px;
  height: 318px;
  background-image: url("../assets/cardle-carousel/glow-top.svg");
}

.cardle-carousel::after {
  bottom: -234px;
  left: -138px;
  width: 592px;
  height: 496px;
  background-image: url("../assets/cardle-carousel/glow.svg");
}

.cardle-carousel-track {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cardle-carousel-track::-webkit-scrollbar {
  display: none;
}

.cardle-carousel-slide {
  display: flex;
  flex: 0 0 100%;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 18px 18px 60px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.cardle-carousel-tag {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 12px;
  border-radius: 1000px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.264px;
  white-space: nowrap;
}

.cardle-carousel-tag img {
  display: block;
}

.cardle-carousel-tag-new {
  color: #ceabd9;
  background: #361439;
}

.cardle-carousel-tag-max {
  color: #f0f0f4;
  background: #52aa29;
}

.cardle-carousel-tag-outline {
  padding: 2px 10px;
  color: #c7c7d6;
  border: 2px solid #8d8daa;
}

.cardle-carousel-viz {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.cardle-carousel-viz img {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.36));
}

.cardle-carousel-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.cardle-carousel-caption h2 {
  color: #f0f0f4;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.cardle-carousel-caption p {
  color: #aaaac0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.cardle-carousel-controls {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.cardle-carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 1000px;
  background: #1f1f29;
  pointer-events: auto;
}

.cardle-carousel-dot {
  position: relative;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: #44445a;
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.cardle-carousel-dot::before {
  position: absolute;
  inset: -8px -4px;
  content: "";
}

.cardle-carousel-dot[aria-current] {
  width: 24px;
  background: #893c95;
}

.cardle-carousel-arrows {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.cardle-carousel-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aaaac0;
  cursor: pointer;
}

.cardle-carousel-arrow:hover {
  color: #f0f0f4;
}

.cardle-carousel-arrow svg {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cardle-carousel-dot:focus-visible,
.cardle-carousel-arrow:focus-visible,
.cardle-adopt-close:focus-visible {
  outline: 2px solid #a564b8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cardle-carousel-dot {
    transition: none;
  }
}

.cardle-adopt-page .button-group {
  gap: 8px;
  width: 100%;
  overflow: hidden;
}

.cardle-adopt-page .btn {
  height: 40px;
  gap: 8px;
  padding: 0 12px;
  color: #361439;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10000px;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.18);
}

.cardle-adopt-page .btn:hover:not(:disabled) {
  transform: none;
  background: #f7f1f9;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.22);
}

.cardle-adopt-page .btn:focus-visible {
  outline: none;
  box-shadow:
    0 4px 7px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(137, 60, 149, 0.45);
}

.cardle-adopt-page .btn-icon {
  width: 20px;
  height: 20px;
}

.cardle-adopt-page .btn:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.cardle-adopt-page .spinner {
  width: 18px;
  height: 18px;
}

.cardle-adopt-page .error-message {
  width: 100%;
  margin-bottom: 0;
  color: #ff8a8a;
  background: rgba(170, 41, 41, 0.14);
  border-color: rgba(170, 41, 41, 0.8);
}

.cardle-adopt-page #turnstile-container {
  min-height: 0;
  margin-bottom: 0;
}

.cardle-adopt-page #turnstile-container:empty {
  display: none;
}

.cardle-adopt-page .test-login-form {
  width: 100%;
  margin-top: 0;
}

.cardle-adopt-page .test-login-divider {
  color: #717193;
}

.cardle-adopt-page .cardle-adopt-terms {
  width: 100%;
  margin: 0;
  color: #717193;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.cardle-adopt-terms a {
  color: #aaaac0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cardle-adopt-terms a:hover {
  color: #f0f0f4;
}

@media (max-width: 699px) {
  .cardle-adopt-page {
    align-items: flex-start;
  }

  .cardle-adopt-page .container {
    max-width: none;
  }

  .cardle-adopt-card {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: #030304;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cardle-adopt-close {
    top: 14px;
  }

  .cardle-adopt-logo {
    display: none;
  }

  .cardle-adopt-body {
    flex: none;
    gap: 12px;
    padding: 18px 20px 22px;
  }

  .cardle-adopt-header {
    gap: 6px;
  }

  .cardle-adopt-header h1 {
    font-size: 18px;
  }

  .cardle-carousel {
    flex: none;
    width: 100%;
    min-height: 0;
    height: 276px;
  }

  .cardle-carousel::before {
    top: -138px;
    left: -176px;
    width: 448px;
    height: 272px;
  }

  .cardle-carousel::after {
    top: 64px;
    bottom: auto;
    left: -138px;
    width: calc(100% + 276px);
    height: 404px;
  }

  .cardle-carousel-slide {
    align-items: center;
    padding: 14px 32px 52px;
  }

  .cardle-carousel-tag {
    align-self: flex-start;
    margin-left: -12px;
  }

  .cardle-carousel-viz {
    padding: 8px 0;
  }

  .cardle-carousel-viz img {
    width: auto;
    max-width: 100%;
  }

  .cardle-carousel-caption {
    align-items: center;
    padding: 0;
    text-align: center;
  }

  .cardle-carousel-caption h2 {
    font-size: 14px;
  }

  .cardle-carousel-caption p {
    font-size: 12px;
    line-height: 1.2;
  }

  .cardle-carousel-controls {
    bottom: 8px;
    justify-content: center;
  }

  .cardle-carousel-arrows {
    display: none;
  }
}
