/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import "tabs.css";

/*
  始终为垂直滚动条预留位置，避免页面切换时（短页 ↔ 长页）
  滚动条出现/消失造成的 ~15px 水平抖动 navbar 与居中内容的位置漂移。
*/
html {
  scrollbar-gutter: stable;
}

/* ========================================
   Landing Page
   ======================================== */

.landing-hero {
  background: #0B0F1A;
}

.landing-footer {
  background: #0B0F1A;
}

.landing-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
}

.landing-input-glow {
  transition: box-shadow 0.5s ease;
}

.landing-input-glow:focus-within {
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.25),
    0 0 60px -15px rgba(16, 185, 129, 0.15);
}

/* --- Floating orbs --- */
@keyframes lp-float-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.08); }
  66%       { transform: translate(-20px, 20px) scale(0.94); }
}
@keyframes lp-float-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-35px, 25px) scale(1.12); }
  70%       { transform: translate(22px, -18px) scale(0.9); }
}
.lp-orb-1 { animation: lp-float-orb-1 14s ease-in-out infinite; }
.lp-orb-2 { animation: lp-float-orb-2 18s ease-in-out infinite; }

/* --- Hero entrance --- */
@keyframes lp-hero-in {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
.lp-hero-line-1 { animation: lp-hero-in 0.7s cubic-bezier(0.2, 0, 0.2, 1) 0.1s  both; }
.lp-hero-line-2 { animation: lp-hero-in 0.7s cubic-bezier(0.2, 0, 0.2, 1) 0.25s both; }
.lp-hero-sub    { animation: lp-hero-in 0.7s cubic-bezier(0.2, 0, 0.2, 1) 0.4s  both; }
.lp-hero-form   { animation: lp-hero-in 0.7s cubic-bezier(0.2, 0, 0.2, 1) 0.55s both; }
.lp-hero-trust  { animation: lp-hero-in 0.6s cubic-bezier(0.2, 0, 0.2, 1) 0.75s both; }

/* --- Scroll reveal --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.2, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.32s; }
.reveal-delay-4 { transition-delay: 0.48s; }
.reveal-delay-5 { transition-delay: 0.64s; }

/* --- Step number spin-pop --- */
.lp-step-num {
  opacity: 0;
  transform: scale(0.5) rotate(-20deg);
  transition: opacity 0.5s ease,
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-step-num.revealed {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* --- Step connecting line draw --- */
.lp-step-line {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}
.lp-step-line.revealed {
  transform: scaleX(1);
}

/* --- Pro card glow pulse --- */
@keyframes lp-pro-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  50%       { box-shadow: 0 0 35px -6px rgba(16, 185, 129, 0.3),
                          inset 0 0 20px -10px rgba(16, 185, 129, 0.05); }
}
.lp-pro-card { animation: lp-pro-glow 3.5s ease-in-out infinite; }

/* --- Pain point icon hover bounce --- */
.lp-pain-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-pain-card:hover .lp-pain-icon {
  transform: scale(1.2) rotate(-8deg);
}

/* --- Button shimmer sweep --- */
.lp-btn-shimmer {
  position: relative;
  overflow: hidden;
}
.lp-btn-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-100%);
}
.lp-btn-shimmer:hover::after {
  animation: lp-btn-shine 0.55s ease;
}
@keyframes lp-btn-shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(200%); }
}

/* --- Channel badge wave-in --- */
.lp-channel-badge {
  opacity: 0;
  transform: translateY(10px) scale(0.88);
  transition: opacity 0.4s ease,
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-channel-badge.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --- Pain points slide carousel --- */
.lp-slide-wrapper {
  display: grid;
}
.lp-slide-wrapper > * {
  grid-area: 1 / 1;
}

@keyframes lp-slide-show-1 {
  0%, 42%  { opacity: 1; }
  52%, 92% { opacity: 0; }
  100%     { opacity: 1; }
}
@keyframes lp-slide-show-2 {
  0%, 42%  { opacity: 0; }
  52%, 92% { opacity: 1; }
  100%     { opacity: 0; }
}
.lp-slide-1 { animation: lp-slide-show-1 10s ease-in-out infinite; }
.lp-slide-2 { animation: lp-slide-show-2 10s ease-in-out infinite; }

@keyframes lp-pill-1 {
  0%, 42%  { width: 1.5rem; opacity: 1; }
  52%, 92% { width: 0.4rem; opacity: 0.35; }
  100%     { width: 1.5rem; opacity: 1; }
}
@keyframes lp-pill-2 {
  0%, 42%  { width: 0.4rem; opacity: 0.35; }
  52%, 92% { width: 1.5rem; opacity: 1; }
  100%     { width: 0.4rem; opacity: 0.35; }
}
.lp-pill-1 { animation: lp-pill-1 10s ease-in-out infinite; }
.lp-pill-2 { animation: lp-pill-2 10s ease-in-out infinite; }

/* --- Browser error mock --- */
.lp-browser-mock {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.13), 0 6px 20px rgba(0,0,0,0.08);
}

@keyframes lp-shield-shake {
  0%, 75%, 100% { transform: rotate(0deg); }
  77%  { transform: rotate(-5deg) scale(1.06); }
  79%  { transform: rotate(5deg)  scale(1.06); }
  81%  { transform: rotate(-4deg); }
  83%  { transform: rotate(4deg); }
  85%  { transform: rotate(-2deg); }
  87%  { transform: rotate(2deg); }
  89%  { transform: rotate(0deg); }
}

.lp-error-shield {
  animation: lp-shield-shake 5s ease-in-out infinite;
  animation-delay: 1.5s;
  transform-origin: center bottom;
  display: inline-block;
}

/* --- Notification cards (slide from right) --- */
.lp-notif-card {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.5s ease,
              transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.lp-notif-card.revealed {
  opacity: 1;
  transform: translateX(0);
}

@keyframes lp-live-dot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(0.6); }
}
.lp-live-dot   { animation: lp-live-dot 2s ease-in-out infinite; }
.lp-live-dot-2 { animation: lp-live-dot 2s ease-in-out 0.3s  infinite; }
.lp-live-dot-3 { animation: lp-live-dot 2s ease-in-out 0.6s  infinite; }

/* ========================================
   End Landing Page
   ======================================== */

/*
  登录/找回密码页面自定义样式
  注：颜色全部基于 DaisyUI 主题变量，跟随 okuptime 主题（深色 + emerald）
*/
.login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

.login-form-container {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: color-mix(in oklch, var(--color-base-100) 85%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-base-content) 8%, transparent);
  box-shadow: 0 8px 32px color-mix(in oklch, black 30%, transparent);
  position: relative;
  z-index: 20;
}

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

.login-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--color-primary) 15%, transparent);
}

.login-button {
  background: var(--color-primary);
  color: var(--color-primary-content);
  transition: all 0.3s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px color-mix(in oklch, var(--color-primary) 30%, transparent);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.login-form-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Flash 消息动画效果 */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.flash-message {
  animation: slideInDown 0.4s ease-out;
  transition: all 0.3s ease;
}

.flash-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flash-message.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.flash-success {
  background-color: color-mix(in oklch, var(--color-success) 10%, var(--color-base-100));
  border-left: 4px solid var(--color-success);
}

.flash-error {
  background-color: color-mix(in oklch, var(--color-error) 10%, var(--color-base-100));
  border-left: 4px solid var(--color-error);
}

.flash-warning {
  background-color: color-mix(in oklch, var(--color-warning) 10%, var(--color-base-100));
  border-left: 4px solid var(--color-warning);
}

/* 信息消息样式 */
.flash-info {
  background-color: color-mix(in oklch, var(--color-info) 10%, var(--color-base-100));
  border-left: 4px solid var(--color-info);
}

.login-page .hidden.lg\\:flex {
  animation: slideInLeft 0.8s ease-out;
}

/* 桌面端标题：移动端隐藏，桌面端显示 */
.desktop-title {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-title {
    display: block;
  }
}

.desktop-title h2,
.desktop-title p {
  color: white;
}

.desktop-title p {
  opacity: 0.8;
}

/* 确保移动端标题显示 */
.mobile-title {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-title {
    display: none !important;
  }
}

/* 响应式优化 */
@media (max-width: 1024px) {
  .login-form-container {
    margin: 1rem;
    padding: 2rem;
  }
}

.input-icon {
  color: color-mix(in oklch, var(--color-base-content) 40%, transparent);
  transition: color 0.3s ease;
}

.login-input:focus + .input-icon {
  color: var(--color-primary);
}

.custom-checkbox {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid color-mix(in oklch, var(--color-base-content) 25%, transparent);
  border-radius: 0.25rem;
  background: var(--color-base-200);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.custom-checkbox:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-primary-content);
  font-size: 0.75rem;
  font-weight: bold;
}

.login-link {
  position: relative;
  transition: color 0.3s ease;
}

.login-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.login-link:hover::after {
  width: 100%;
}

/* 淡入动画 */
.animate-fade-in {
  animation: fadeInUp 0.8s ease-out;
}

/* Line clamp 样式支持 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* HTTPS证书过期状态背景色样式 */
.certificate-expiry-bg {
  position: relative;
  transition: all 0.3s ease;
}

/*
  使用 DaisyUI 语义色变量（--color-error/warning/success）+ color-mix 派生背景与阴影，
  保证切换主题（含暗色）时整体跟随，不再有硬编码 hex 色穿帮。
*/
.certificate-expired {
  background-color: color-mix(in oklch, var(--color-error) 6%, var(--color-base-100));
  border-left: 4px solid var(--color-error);
  box-shadow: 0 1px 3px color-mix(in oklch, var(--color-error) 10%, transparent);
}

.certificate-expired:hover {
  background-color: color-mix(in oklch, var(--color-error) 10%, var(--color-base-100));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--color-error) 15%, transparent);
}

.certificate-expiring {
  background-color: color-mix(in oklch, var(--color-warning) 6%, var(--color-base-100));
  border-left: 4px solid var(--color-warning);
  box-shadow: 0 1px 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
}

.certificate-expiring:hover {
  background-color: color-mix(in oklch, var(--color-warning) 10%, var(--color-base-100));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--color-warning) 15%, transparent);
}

.certificate-normal {
  background-color: color-mix(in oklch, var(--color-success) 6%, var(--color-base-100));
  border-left: 4px solid var(--color-success);
  box-shadow: 0 1px 3px color-mix(in oklch, var(--color-success) 10%, transparent);
}

.certificate-normal:hover {
  background-color: color-mix(in oklch, var(--color-success) 10%, var(--color-base-100));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in oklch, var(--color-success) 15%, transparent);
}

/* 状态指示器动画 */
.status-indicator {
  position: relative;
  overflow: hidden;
}

.status-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.certificate-expired .status-indicator::before {
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--color-error) 12%, transparent), transparent);
}

.certificate-expiring .status-indicator::before {
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--color-warning) 12%, transparent), transparent);
}

.certificate-normal .status-indicator::before {
  background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--color-success) 12%, transparent), transparent);
}

/* 悬停时显示光泽效果 */
.certificate-expiry-bg:hover .status-indicator::before {
  left: 100%;
}

/* 响应式优化 */
@media (max-width: 640px) {
  .certificate-expired,
  .certificate-expiring,
  .certificate-normal {
    border-left-width: 3px;
  }
}

/* 高亮动画样式：基于 DaisyUI info 色，主题切换时跟随 */
@keyframes highlight-pulse {
  0% {
    background-color: color-mix(in oklch, var(--color-info) 10%, transparent);
    box-shadow: 0 0 0 0 color-mix(in oklch, var(--color-info) 40%, transparent);
  }
  50% {
    background-color: color-mix(in oklch, var(--color-info) 20%, transparent);
    box-shadow: 0 0 0 8px color-mix(in oklch, var(--color-info) 10%, transparent);
  }
  100% {
    background-color: color-mix(in oklch, var(--color-info) 10%, transparent);
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes highlight-glow {
  0%, 100% {
    border-color: color-mix(in oklch, var(--color-info) 30%, transparent);
  }
  50% {
    border-color: color-mix(in oklch, var(--color-info) 80%, transparent);
  }
}

.highlight-updated {
  animation: highlight-pulse 2s ease-in-out, highlight-glow 2s ease-in-out;
  border: 2px solid color-mix(in oklch, var(--color-info) 30%, transparent);
  border-radius: 8px;
}

.highlight-updated.animation-complete {
  background-color: color-mix(in oklch, var(--color-info) 5%, transparent);
  border-color: color-mix(in oklch, var(--color-info) 20%, transparent);
  transition: all 0.3s ease;
}
