/* ===== 亿上智方 企业门户样式 ===== */

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --accent2: #f59e0b;
  --dark-bg: #0a0a1a;
  --card-bg: #131338;
  --card-border: #1e1e4a;
  --text: #e8e8f0;
  --text-dim: #8888aa;
  --text-bright: #ffffff;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-rainbow: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd);
  --gradient-dark: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0d0d2b 100%);
}

/* ===== Splash Screen ===== */
.splash-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  background: #050510;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

#splash-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  display: block;
}

.splash-screen.rolling-up {
  animation: rollUp 0.3s ease-in forwards;
  overflow: hidden;
}

@keyframes rollUp {
  0% { height: 100vh; }
  100% { height: 40px; }
}

.splash-screen.shrunk {
  width: 100vw !important;
  height: 40px !important;
  position: fixed;
  z-index: 100;
  pointer-events: none;
}

.splash-screen.shrunk #splash-canvas {
  display: none;
}

.splash-screen.shrunk .splash-label {
  display: flex !important;
}

.splash-label {
  display: none !important;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.7);
  letter-spacing: 4px;
  font-weight: 700;
  background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd);
  background-size: 300% 100%;
  animation: bannerShift 6s linear infinite;
}

@keyframes bannerShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ===== Page Content ===== */
.header {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(79, 70, 229, 0.2);
  padding: 0;
  z-index: 80;
  height: 56px;
  display: flex;
  align-items: center;
  transition: top 0.5s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  height: 100%;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo {
  font-size: 1.3rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-bright);
  background: rgba(79, 70, 229, 0.15);
}

.nav-link.active {
  color: var(--text-bright);
  background: var(--gradient-1);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-sm {
  padding: 5px 14px;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-light);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  padding: 4px 12px;
  background: var(--gradient-1);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
}

.btn-admin {
  background: #2d3436;
  color: white;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
}

.btn-admin:hover {
  background: #636e72;
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: auto;
  padding: 60px 20px 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-dark);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(79,70,229,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(6,182,212,0.06) 0%, transparent 50%);
  animation: heroBgFloat 20s ease-in-out infinite;
}

@keyframes heroBgFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-2%, -1%); }
  66% { transform: translate(1%, 2%); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero-badge {
  display: inline-block;
  padding: 5px 18px;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 30px;
  color: var(--primary-light);
  font-size: 0.78rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 300;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.btn-hero {
  padding: 12px 30px;
  font-size: 0.95rem;
  border-radius: 30px;
  font-weight: 600;
}

.btn-hero-primary {
  background: var(--gradient-1);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5);
}

.btn-hero-secondary {
  background: transparent;
  border: 1px solid var(--primary-light);
  color: var(--primary-light);
}

.btn-hero-secondary:hover {
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-3px);
}

/* ===== Section Styles ===== */
.portal-section {
  padding: 60px 20px;
  position: relative;
}

.portal-section:nth-child(even) {
  background: rgba(19, 19, 56, 0.3);
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(79, 70, 229, 0.12);
  border-radius: 20px;
  color: var(--primary-light);
  font-size: 0.78rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
  line-height: 1.6;
}

/* ===== Dual Engine ===== */
.engine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.engine-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 35px;
  position: relative;
  transition: all 0.4s ease;
  overflow: hidden;
}

.engine-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gradient-1);
}

.engine-card:nth-child(2)::before {
  background: linear-gradient(90deg, #06b6d4, #8b5cf6, #ec4899);
}

.engine-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15);
}

.engine-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 15px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 16px;
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary-light);
}

.engine-card:nth-child(2) .engine-badge {
  background: rgba(6, 182, 212, 0.15);
  color: #48dbfb;
}

.engine-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.engine-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.engine-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.engine-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.engine-features li {
  padding: 6px 0;
  color: var(--text);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.engine-features li::before {
  content: '✓';
  color: #48dbfb;
  font-weight: 700;
  flex-shrink: 0;
}

.engine-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  border: 1px dashed rgba(255,255,255,0.1);
}

/* ===== Core Advantages ===== */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.advantage-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px 24px;
  text-align: center;
  transition: all 0.4s ease;
}

.advantage-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1);
}

.adv-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.adv-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.adv-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ===== Application Scenarios ===== */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scenario-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 35px 28px;
  transition: all 0.4s ease;
}

.scenario-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1);
}

.scenario-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.scenario-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.scenario-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 50px 20px;
  background: linear-gradient(135deg, rgba(79,70,229,0.12) 0%, rgba(6,182,212,0.08) 100%);
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta-phone {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-top: 16px;
  letter-spacing: 2px;
}

/* ===== Footer ===== */
.portal-footer {
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(79, 70, 229, 0.1);
  padding: 30px 20px;
  text-align: center;
}

.portal-footer p {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 4px 0;
}

.portal-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.portal-footer a:hover {
  color: var(--primary-light);
}

/* ===== AI Case Library Section (原有模块保留) ===== */
.module-container {
  display: none;
}

.module-container.active-module {
  display: block;
}

.module-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
}

.module-section h2 {
  color: var(--text-bright);
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* ===== 非首页模块样式覆盖 ===== */
.main {
  padding: 30px 0;
  min-height: 60vh;
}

/* Auth Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

.auth-form h3 {
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.3rem;
}

.form-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  color: var(--text);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: var(--primary);
}

.form-submit {
  width: 100%;
  padding: 12px;
  background: var(--gradient-1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.auth-toggle {
  text-align: center;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.auth-toggle a {
  color: var(--primary-light);
  cursor: pointer;
  text-decoration: underline;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #27ae60;
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .engine-grid {
    grid-template-columns: 1fr;
  }
  .advantages-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scenarios-grid {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .header {
    height: auto;
    min-height: 48px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 2px;
  }
  .nav-link {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .splash-ball-container {
    width: 120px;
    height: 120px;
  }
  .splash-ball {
    width: 120px;
    height: 120px;
  }
  .portal-section {
    padding: 50px 16px;
  }
  .engine-card {
    padding: 28px 22px;
  }
  .module-section {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .nav-link {
    padding: 5px 8px;
    font-size: 0.7rem;
  }
}
