/**
 * Verify Page Styles - Discord Official Style
 *
 * Colors (Discord 2024):
 * - Blurple: #5865F2
 * - Green: #23A559
 * - Red: #DA373C
 * - Background: #313338
 * - Background Secondary: #2B2D31
 * - Background Tertiary: #1E1F22
 * - Text Primary: #F2F3F5
 * - Text Muted: #B5BAC1
 * - Border: #3F4147
 */

/* ========================================
   CSS Variables
   ======================================== */

:root {
  --discord-blurple: #5865F2;
  --discord-blurple-hover: #4752C4;
  --discord-green: #23A559;
  --discord-red: #DA373C;
  --discord-bg: #313338;
  --discord-bg-secondary: #2B2D31;
  --discord-bg-tertiary: #1E1F22;
  --discord-text: #F2F3F5;
  --discord-text-muted: #B5BAC1;
  --discord-text-link: #00A8FC;
  --discord-input-bg: #1E1F22;
  --discord-border: #3F4147;
}

/* ========================================
   Base & Reset
   ======================================== */

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

html {
  background: var(--discord-bg);
}

body {
  font-family: 'Inter', "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--discord-bg);
  color: var(--discord-text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.375;
}

.hidden {
  display: none !important;
}

/* ========================================
   Container & Card
   ======================================== */

.discord-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.discord-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--discord-bg-secondary);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
}

@media (max-width: 520px) {
  .discord-container {
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .discord-card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 20px;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .discord-card-inner {
    width: 100%;
    max-width: 320px;
  }

}

/* ========================================
   Header
   ======================================== */

.discord-header {
  text-align: center;
  margin-bottom: 24px;
}

/* Rivvo Logo */
.rivvo-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto 12px;
}

.rivvo-logo-circle {
  width: 80px;
  height: 80px;
  background: var(--discord-bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rivvo-logo img {
  width: 36px;
  height: auto;
  object-fit: contain;
}

.rivvo-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--discord-text-muted);
  letter-spacing: 0;
}

.rivvo-text strong {
  font-weight: 700;
  color: var(--discord-text);
}

/* Discord Badge */
.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--discord-blurple);
  border-radius: 20px;
  margin-bottom: 12px;
}

.discord-badge svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.discord-badge span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}


/* ========================================
   Form Elements
   ======================================== */

.discord-form-group {
  margin-bottom: 16px;
  position: relative;
  z-index: 100;
}

.discord-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--discord-text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.discord-input {
  width: 100%;
  height: 54px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--discord-text);
  background: var(--discord-input-bg);
  border: none;
  border-radius: 8px;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.discord-input:focus {
  box-shadow: 0 0 0 1px var(--discord-blurple), 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.discord-input::placeholder {
  color: #72767D;
}

/* Phone input wrapper */
.discord-phone-input-wrapper {
  display: flex;
  gap: 8px;
  position: relative;
}

.discord-country-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 54px;
  padding: 0 14px;
  background: var(--discord-input-bg);
  border: none;
  border-radius: 8px;
  color: var(--discord-text);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
  min-width: 85px;
}

.discord-country-selector:hover {
  background: #3B3D44;
}

.discord-chevron {
  width: 16px;
  height: 16px;
  color: var(--discord-text-muted);
}

.discord-phone-input {
  flex: 1;
}

/* Dropdown */
.discord-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--discord-bg-tertiary);
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
  z-index: 9999;
}

.discord-dropdown-options {
  padding: 6px;
}

.discord-dropdown-options button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--discord-text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}

.discord-dropdown-options button:hover {
  background: rgba(88, 101, 242, 0.12);
  color: var(--discord-text);
}

.discord-dropdown-options button.selected,
.discord-dropdown-options button[data-selected="true"] {
  background: rgba(88, 101, 242, 0.2);
  color: var(--discord-text);
}

/* Code input */
.discord-code-input {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.5em;
  font-variant-numeric: tabular-nums;
}

.discord-code-input::placeholder {
  letter-spacing: 0.3em;
}

/* ========================================
   Checkbox
   ======================================== */

.discord-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  cursor: pointer;
}

.discord-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 1px solid var(--discord-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.discord-checkbox:hover {
  border-color: var(--discord-text-muted);
}

.discord-checkbox:checked {
  background: var(--discord-blurple);
  border-color: var(--discord-blurple);
}

.discord-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.discord-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.5);
}

.discord-checkbox-label {
  font-size: 14px;
  color: var(--discord-text-muted);
  user-select: none;
}

/* ========================================
   Buttons
   ======================================== */

.discord-button {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.17s ease, opacity 0.17s ease;
}

.discord-button-primary {
  background: var(--discord-blurple);
  color: #fff;
}

.discord-button-primary:hover:not(:disabled) {
  background: var(--discord-blurple-hover);
}

.discord-button-primary:active:not(:disabled) {
  background: #3C45A5;
}

.discord-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.discord-text-button {
  background: none;
  border: none;
  color: var(--discord-text-link);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}

.discord-text-button:hover {
  text-decoration: underline;
}

.discord-text-button:disabled {
  color: var(--discord-text-muted);
  cursor: not-allowed;
}

/* ========================================
   Spinner
   ======================================== */

.discord-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Alert & Messages
   ======================================== */

.discord-alert-container {
  min-height: 20px;
  margin-bottom: 12px;
}

.discord-alert {
  font-size: 14px;
  color: var(--discord-red);
  transition: opacity 0.2s ease;
}

.discord-alert.success {
  color: var(--discord-green);
}

.discord-alert.info {
  color: var(--discord-text-link);
}

.discord-help-text {
  font-size: 13px;
  color: var(--discord-text-muted);
  text-align: center;
  margin-top: 12px;
}

/* ========================================
   Verification Step
   ======================================== */

.discord-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--discord-text-link);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.discord-back-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--discord-text-muted);
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 10;
}

.discord-back-icon:hover {
  color: var(--discord-text);
  background: rgba(255, 255, 255, 0.06);
}

.discord-back-icon svg {
  width: 20px;
  height: 20px;
}

.discord-back-link:hover {
  text-decoration: underline;
}

.discord-back-link svg {
  width: 16px;
  height: 16px;
}

.discord-verification-header {
  text-align: center;
  margin-bottom: 24px;
}

.discord-verification-sent {
  font-size: 16px;
  color: var(--discord-text-muted);
  margin-bottom: 4px;
}

.discord-phone-display {
  font-size: 16px;
  font-weight: 600;
  color: var(--discord-text);
}

.discord-resend-text {
  font-size: 14px;
  color: var(--discord-text-muted);
  text-align: center;
  margin-top: 16px;
}

/* ========================================
   Agreement Step
   ======================================== */

.discord-step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--discord-text);
  margin-bottom: 4px;
  text-align: center;
}

.discord-step-subtitle {
  font-size: 14px;
  color: var(--discord-text-muted);
  margin-bottom: 20px;
  text-align: center;
}

.discord-agreement-list {
  margin-bottom: 20px;
}

.discord-agreement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  flex: 1;
}

.discord-agreement-all {
  background: rgba(88, 101, 242, 0.15);
  border: 2px solid rgba(88, 101, 242, 0.5);
  border-radius: 10px;
  padding: 16px 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.15);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.discord-agreement-all:hover {
  border-color: rgba(88, 101, 242, 0.7);
  background: rgba(88, 101, 242, 0.2);
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.25);
}

.discord-agreement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--discord-border);
}

.discord-agreement-row:last-child {
  border-bottom: none;
}

.discord-agreement-checkbox {
  display: none;
}

.discord-agreement-checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--discord-border);
  border-radius: 4px;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.discord-agreement-checkbox:checked + .discord-agreement-checkmark {
  background: var(--discord-blurple);
  border-color: var(--discord-blurple);
}

.discord-agreement-checkbox:checked + .discord-agreement-checkmark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

.discord-agreement-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--discord-text);
}

.discord-agreement-main {
  font-weight: 600;
  display: block;
  width: 100%;
}

.discord-agreement-desc {
  font-size: 13px;
  color: var(--discord-text-muted);
  font-weight: 400;
}

.discord-badge-required {
  font-size: 11px;
  font-weight: 600;
  color: var(--discord-blurple);
  background: rgba(88, 101, 242, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.discord-badge-optional {
  font-size: 11px;
  font-weight: 600;
  color: var(--discord-text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.discord-agreement-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--discord-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.discord-agreement-link:hover {
  color: var(--discord-text);
}

.discord-agreement-link svg {
  width: 18px;
  height: 18px;
}

.discord-agreement-divider {
  height: 1px;
  background: var(--discord-border);
  margin: 8px 0;
}

/* ========================================
   reCAPTCHA
   ======================================== */

.discord-recaptcha {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ========================================
   Scrollbar
   ======================================== */

.discord-dropdown::-webkit-scrollbar {
  width: 8px;
}

.discord-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.discord-dropdown::-webkit-scrollbar-thumb {
  background: var(--discord-bg-secondary);
  border-radius: 4px;
}

.discord-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--discord-border);
}

/* ========================================
   Autofill
   ======================================== */

.discord-input:-webkit-autofill,
.discord-input:-webkit-autofill:hover,
.discord-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--discord-input-bg) inset !important;
  -webkit-text-fill-color: var(--discord-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Page Load Animation */
.discord-card {
  opacity: 0;
  animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

.discord-header {
  opacity: 0;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

.rivvo-logo-circle {
  opacity: 0;
  animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
}

.rivvo-text {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

.discord-badge {
  opacity: 0;
  animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
}

/* Agreement Step Animation */
#agreementStep .discord-step-title {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.35s;
}

#agreementStep .discord-step-subtitle {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

#agreementStep .discord-agreement-all {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.45s;
}

#agreementStep .discord-agreement-divider {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
  animation-delay: 0.5s;
}

#agreementStep .discord-agreement-row:nth-child(3) {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.55s;
}

#agreementStep .discord-agreement-row:nth-child(4) {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.6s;
}

#agreementStep .discord-agreement-row:nth-child(5) {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.65s;
}

#agreementStep #agreementContinueBtn {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.7s;
}

/* Step Transition Animation */
.step-exit {
  animation: stepExit 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.step-enter {
  animation: stepEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stepExit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

@keyframes stepEnter {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Back Transition (reverse direction) */
.step-exit-back {
  animation: stepExitBack 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.step-enter-back {
  animation: stepEnterBack 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stepExitBack {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes stepEnterBack {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Phone Auth Section Internal Animations */
#phoneInputStep .discord-form-group,
#phoneInputStep .discord-alert-container,
#phoneInputStep .discord-button,
#phoneInputStep .discord-help-text {
  opacity: 0;
}

#phoneAuthSection:not(.hidden) #phoneInputStep .discord-form-group {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

#phoneAuthSection:not(.hidden) #phoneInputStep .discord-alert-container {
  animation: fadeIn 0.3s ease-out forwards;
  animation-delay: 0.15s;
}

#phoneAuthSection:not(.hidden) #phoneInputStep .discord-button {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

#phoneAuthSection:not(.hidden) #phoneInputStep .discord-help-text {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.25s;
}

/* Verification Step Internal Animations */
#codeVerificationStep .discord-back-link,
#codeVerificationStep .discord-verification-header,
#codeVerificationStep .discord-form-group,
#codeVerificationStep .discord-button,
#codeVerificationStep .discord-resend-text {
  opacity: 0;
}

#codeVerificationStep:not(.hidden) .discord-back-link {
  animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

#codeVerificationStep:not(.hidden) .discord-verification-header {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.15s;
}

#codeVerificationStep:not(.hidden) .discord-form-group {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

#codeVerificationStep:not(.hidden) .discord-button {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.25s;
}

#codeVerificationStep:not(.hidden) .discord-resend-text {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
}

/* Button Press Animation */
.discord-button:active:not(:disabled) {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Checkbox Animation */
.discord-agreement-checkmark {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.discord-agreement-checkbox:checked + .discord-agreement-checkmark {
  animation: checkPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes checkPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Input Focus Animation */
.discord-input {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.discord-input:focus {
  transform: translateY(-1px);
}

/* Success Animation */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(35, 165, 89, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(35, 165, 89, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(35, 165, 89, 0);
  }
}

.discord-button.success {
  background: var(--discord-green) !important;
  animation: successPulse 0.6s ease-out;
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Marketing Info Popup
   ======================================== */

.discord-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.discord-popup-overlay.popup-show {
  opacity: 1;
  visibility: visible;
}

.discord-popup-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.discord-popup-content {
  position: relative;
  background: var(--discord-bg-secondary);
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.discord-popup-overlay.popup-show .discord-popup-content {
  transform: scale(1) translateY(0);
}

.discord-popup-header {
  padding: 16px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.discord-popup-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--discord-text);
  margin: 0;
}

.discord-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--discord-text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.discord-popup-close:hover {
  color: var(--discord-text);
  background: rgba(255, 255, 255, 0.06);
}

.discord-popup-close svg {
  width: 18px;
  height: 18px;
}

.discord-popup-body {
  padding: 16px;
}

.discord-popup-text {
  font-size: 14px;
  color: var(--discord-text-muted);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.discord-popup-text strong {
  color: var(--discord-text);
  font-weight: 600;
}

.discord-popup-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.discord-popup-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--discord-text);
}

.discord-popup-benefit-icon {
  width: 18px;
  height: 18px;
  color: var(--discord-green);
  flex-shrink: 0;
}

.discord-popup-note {
  font-size: 12px;
  color: var(--discord-text-muted);
  margin: 0;
}

.discord-popup-footer {
  padding: 12px 16px 16px;
}

.discord-popup-confirm {
  width: 100%;
  height: 40px;
  background: var(--discord-blurple);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.discord-popup-confirm:hover {
  background: var(--discord-blurple-hover);
}

/* Mobile */
@media (max-width: 520px) {
  .discord-popup-content {
    width: calc(100% - 32px);
    max-width: none;
    margin: 16px;
  }
}

/* ========================================
   Result Screens (Error & Success)
   ======================================== */

/* Badge Variants */
.discord-badge-success {
  background: rgba(35, 165, 89, 0.15);
  color: var(--discord-green);
}

.discord-badge-success svg {
  width: 14px;
  height: 14px;
}

/* Result Screen Container */
.discord-result-screen {
  text-align: center;
  padding: 32px 0 16px;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Centered Result Screen (for error) */
.discord-result-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 48px 24px;
}

/* Result Icon */
.discord-result-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-result-icon svg {
  width: 40px;
  height: 40px;
}

.discord-result-icon-error {
  background: linear-gradient(135deg, rgba(218, 55, 60, 0.2) 0%, rgba(218, 55, 60, 0.1) 100%);
  border: 2px solid rgba(218, 55, 60, 0.3);
  color: var(--discord-red);
  animation: iconShake 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.discord-result-icon-success {
  background: linear-gradient(135deg, rgba(35, 165, 89, 0.2) 0%, rgba(35, 165, 89, 0.1) 100%);
  border: 2px solid rgba(35, 165, 89, 0.3);
  color: var(--discord-green);
  animation: iconPopSuccess 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Result Title */
.discord-result-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--discord-text);
  margin-bottom: 12px;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

/* Result Message */
.discord-result-message {
  font-size: 14px;
  color: var(--discord-text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 24px;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

/* Result Button */
.discord-result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.discord-result-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-button-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Result Help Text */
.discord-result-help {
  font-size: 12px;
  color: var(--discord-text-muted);
  margin-top: 16px;
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

/* Success Screen Specific */
@keyframes iconPopSuccess {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  50% {
    transform: scale(1.15) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Success checkmark animation */
.discord-result-icon-success svg path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: checkDraw 0.5s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Error Screen Specific */
@keyframes iconShake {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  40% {
    opacity: 1;
    transform: scale(1.1);
  }
  50% {
    transform: scale(1) translateX(-3px);
  }
  60% {
    transform: scale(1) translateX(3px);
  }
  70% {
    transform: scale(1) translateX(-2px);
  }
  80% {
    transform: scale(1) translateX(2px);
  }
  100% {
    transform: scale(1) translateX(0);
  }
}
