/* Kontext LoRA Guru - Main Styles */
/* 绿色自然风配色方案 */

:root {
  --primary: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --secondary: #6b7280;
  --background: #f0fdf4;
  --surface: #ffffff;
  --text: #064e3b;
  --text-light: #065f46;
  --text-muted: #6b7280;
  --border: #d1fae5;
  --shadow: rgba(6, 78, 59, 0.1);
  --accent: #34d399;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text);
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.5rem;
  color: var(--text);
}

h3 {
  font-size: 1.875rem;
  color: var(--text-light);
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-large {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  background: linear-gradient(135deg, var(--background) 0%, rgba(16, 185, 129, 0.05) 100%);
  text-align: center;
}

.hero h1 {
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-light);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(5, 150, 105, 0.35);
}

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

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

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -3px var(--shadow);
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* iframe Container */
.iframe-container {
  position: relative;
  width: 100%;
  max-width: 850px;
  margin: 2rem auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -3px var(--shadow);
}

.iframe-container iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* Features Section */
.features {
  background: var(--surface);
}

.feature-item {
  text-align: center;
  padding: 2rem 1rem;
}

.feature-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  color: white;
}

/* Statistics */
.stats {
  background: var(--primary);
  color: white;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Content Sections */
.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.content-section ul {
  list-style: none;
  padding-left: 0;
}

.content-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
}

.content-section li:before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Footer */
footer {
  background: var(--text);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: 0.25rem 0;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero {
    padding: 6rem 0 4rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav ul {
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .iframe-container {
    max-width: 100%;
    margin: 1rem auto;
  }
  
  .iframe-container iframe {
    height: 300px;
  }
  
  .grid {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .iframe-container iframe {
    height: 250px;
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus States */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  header,
  footer,
  .iframe-container {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}