/* 自定义变量 */
:root {
  --color-primary: #165DFF;
  --color-secondary: #36CBCB;
  --color-success: #00B42A;
  --color-warning: #FF7D00;
  --color-danger: #F53F3F;
  --color-dark: #1D2129;
  --color-dark-light: #4E5969;
  --color-light-bg: #F2F3F5;
  --color-dark-bg: #272E3B;
}

/* 自定义动画 */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes float-x {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); }
}

@keyframes wave {
  0%, 100% { transform: rotate(-10deg) scaleY(0.9); opacity: 0.7; }
  50% { transform: rotate(10deg) scaleY(1.1); opacity: 0.5; }
}

.animate-float-y {
  animation: float-y 6s ease-in-out infinite;
}

.animate-float-x {
  animation: float-x 8s ease-in-out infinite;
}

.animate-wave {
  animation: wave 4s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 自定义实用类 */
.content-auto {
  content-visibility: auto;
}

.input-focus {
  transition: all 0.3s ease;
}

.input-focus:focus {
  outline: none;
  ring-width: 2px;
  ring-color: rgba(22, 93, 255, 0.3);
  border-color: var(--color-primary);
  transform: scale(1.02);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: rgba(22, 93, 255, 0.9);
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: white;
  color: var(--color-dark-light);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  transform: scale(1.02);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.card-shadow {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.bg-pattern {
  background-image: 
    radial-gradient(rgba(22, 93, 255, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(54, 203, 203, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, transparent 24%, rgba(22, 93, 255, 0.01) 25%, rgba(22, 93, 255, 0.01) 26%, transparent 27%, transparent 74%, rgba(54, 203, 203, 0.01) 75%, rgba(54, 203, 203, 0.01) 76%, transparent 77%);
  background-size: 24px 24px, 48px 48px, 96px 96px;
  background-position: 0 0, 12px 12px, 0 0;
}

.bg-enhanced {
  background: 
    linear-gradient(135deg, rgba(22, 93, 255, 0.02) 0%, transparent 50%, rgba(54, 203, 203, 0.02) 100%),
    linear-gradient(45deg, #f8fafc 0%, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%, #f8fafc 100%);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.3), rgba(54, 203, 203, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.subtle-shadow {
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(22, 93, 255, 0.05);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .logo-mobile {
    width: 18rem;
    height: 3.5rem;
  }
}

@media (max-width: 480px) {
  .logo-mobile {
    width: 16rem;
    height: 3rem;
  }
  .card-mobile {
    max-width: calc(100vw - 2rem);
  }
}

/* 颜色实用类 */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-dark { color: var(--color-dark); }
.text-dark-light { color: var(--color-dark-light); }

.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-success { background-color: var(--color-success); }
.bg-warning { background-color: var(--color-warning); }
.bg-danger { background-color: var(--color-danger); }

/* 边框颜色 */
.border-danger { border-color: var(--color-danger); }
.border-primary { border-color: var(--color-primary); }

/* 背景透明度 */
.bg-danger\/10 { background-color: rgba(245, 63, 63, 0.1); }
.bg-danger\/20 { background-color: rgba(245, 63, 63, 0.2); }
.bg-success\/10 { background-color: rgba(0, 180, 42, 0.1); }
.bg-success\/20 { background-color: rgba(0, 180, 42, 0.2); }
.bg-primary\/2 { background-color: rgba(22, 93, 255, 0.02); }
.bg-primary\/3 { background-color: rgba(22, 93, 255, 0.03); }
.bg-secondary\/2 { background-color: rgba(54, 203, 203, 0.02); }
.bg-secondary\/3 { background-color: rgba(54, 203, 203, 0.03); }
.border-danger\/20 { border-color: rgba(245, 63, 63, 0.2); }
.border-success\/20 { border-color: rgba(0, 180, 42, 0.2); }

/* 文本透明度 */
.text-danger\/80 { color: rgba(245, 63, 63, 0.8); }
.text-danger\/60 { color: rgba(245, 63, 63, 0.6); }
.text-success\/80 { color: rgba(0, 180, 42, 0.8); }
.text-primary\/80 { color: rgba(22, 93, 255, 0.8); }

/* 渐变中间色 */
.via-primary\/8 { --tw-gradient-via: rgba(22, 93, 255, 0.08) var(--tw-gradient-via-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }
.via-secondary\/8 { --tw-gradient-via: rgba(54, 203, 203, 0.08) var(--tw-gradient-via-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }
.via-primary\/3 { --tw-gradient-via: rgba(22, 93, 255, 0.03) var(--tw-gradient-via-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }
.via-secondary\/3 { --tw-gradient-via: rgba(54, 203, 203, 0.03) var(--tw-gradient-via-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to); }

/* Inter字体 */
.font-inter { font-family: 'Inter', system-ui, sans-serif; }

/* 缺少的基础Tailwind类 */
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(1rem * var(--tw-space-x-reverse));
  margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.h-4 { height: 1rem; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.p-8 { padding: 2rem; }
.rounded { border-radius: 0.25rem; }
.form-group { /* Empty for semantic purposes */ } 

.form-hint {
    font-size: 0.8rem;
    color: #165DFF;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.form-hint:hover {
    text-decoration: underline;
    color: #0E42D2;
}