/* 现代化设计风格 */

/* 主色调变量 */
:root {
  --primary-color: #4361ee;
  --primary-light: #4895ef;
  --primary-dark: #3a56d4;
  --secondary-color: #f8f9fa;
  --accent-color: #06d6a0;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --divider-color: #dee2e6;
  --success-color: #06d6a0;
  --error-color: #ef476f;
  --warning-color: #ffd166;
  --info-color: #118ab2;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: var(--text-primary);
  /* 不设置固定高度，让内容自然撑开 */
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 为Bootstrap Flex布局优化的样式 */
header {
  flex: 0 0 auto;
}

.main-content {
  flex: 1 0 auto;
  padding: 0;
  margin: 0;
}

footer {
  flex: 0 0 auto;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  min-height: 80vh;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="90" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.1;
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 2rem 0;
}

/* Hero Image */
.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Feature Card */
.feature-card {
  transition: all 0.3s ease;
  border-radius: 16px;
  background: white;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  height: 100%;
  padding: 1.5rem;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.floating-circle {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.display-2 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .display-2 {
    font-size: 2.5rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .py-7 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .mb-6 {
    margin-bottom: 2rem;
  }
}

/* Stat Card */
.stat-card {
  border-radius: 16px;
  transition: all 0.3s ease;
  background: white;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  padding: 1rem;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Background gradient class */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* Section padding utilities */
.py-7 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.py-5 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.mb-6 {
  margin-bottom: 3.5rem;
}

.mb-7 {
  margin-bottom: 5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .hero-section {
    min-height: auto;
    padding: 4rem 0;
  }
  
  .min-vh-75 {
    min-height: 60vh;
  }
}

/* Features Section */
.features-section {
  background-color: #f8f9fa;
}

/* Stats Section */
.stats-section {
  background-color: #f0f4f8;
}

/* Auth Page Styles - Modern gradient backgrounds */
.auth-icon {
  transition: transform 0.3s ease;
}

.auth-icon:hover {
  transform: scale(1.1);
}

.input-group-text {
  border-radius: 8px 0 0 8px !important;
  border-right: none;
}

.form-control-lg {
  border-radius: 0 8px 8px 0 !important;
  padding: 1rem 1.25rem;
}

.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Modern button styles */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.2px;
  border: none;
}

.btn-md {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-success:hover {
  background-color: #05c18d;
  border-color: #05c18d;
}

.btn-danger {
  background-color: var(--error-color);
  border-color: var(--error-color);
}

.btn-danger:hover {
  background-color: #d93b64;
  border-color: #d93b64;
}

.btn-outline-light {
  border-color: rgba(255,255,255,0.3);
  color: white;
}

.btn-outline-light:hover {
  background-color: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: white;
}

/* Card styles */
.card {
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

.card-body {
  padding: 1.5rem;
}

/* Navigation styles */
.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  background-color: var(--primary-color) !important;
  margin-bottom: 0;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

.nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: white !important;
}

/* Form styles */
.form-control {
  border-radius: 8px;
  border: 1px solid var(--divider-color);
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
}

/* Footer styles */
.footer {
  background-color: #f8f9fa;
  padding: 1.5rem 0 0 0;
  color: var(--text-secondary);
  width: 100%;
  z-index: 1000;
  position: relative;
}

/* Footer link styles */
.footer a {
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary-color) !important;
  text-decoration: underline;
}

/* Footer section headers */
.footer h5 {
  color: var(--text-primary);
  position: relative;
}

.footer h5::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer .row > div {
    margin-bottom: 1.5rem;
  }
  
  .footer .row > div:last-child {
    margin-bottom: 0;
  }
  
  .hero-section .container {
    padding: 3rem 1rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .btn:not(:last-child) {
    margin-right: 0;
  }
}

/* Animation effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

/* Icon rotation effect */
.icon-rotate {
  transition: transform 0.3s ease;
}

.icon-rotate:hover {
  transform: rotate(15deg);
}

/* User Center styles */
.user-center-card {
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  border: none;
}

.user-center-card .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  padding: 1.5rem;
}

.user-center-card .card-body {
  padding: 2rem;
}

.avatar-preview {
  transition: all 0.3s ease;
}

.avatar-preview:hover {
  transform: scale(1.05);
}

.form-control-lg {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
}

.btn-user-center {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.btn-user-center:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}