:root {
  --primary-color: #000000;
  --secondary-color: #ffffff;
  --accent-color: #6366f1;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--secondary-color);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo:hover .logo-img {
  opacity: 0.8;
  transition: opacity 0.3s;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 3px;
  padding: 0.25rem;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-color);
  transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 0;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 56px;
    display: flex !important;
    flex-direction: column;
    background-color: var(--secondary-color);
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 999;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 0.2rem 0;
    width: 100%;
  }
  
  .nav-menu a {
    display: block;
    padding: 0.4rem 1rem;
    width: 100%;
    font-size: 0.9rem;
  }
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--secondary-color);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.feature-card {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

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

.feature-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.feature-link:hover {
  text-decoration: underline;
}

/* Content Sections */
.content-section {
  padding: 4rem 0;
}

.content-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.content-section h3 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.8;
}

.content-section ul, .content-section ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.content-section a {
  color: var(--accent-color);
  text-decoration: none;
}

.content-section a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: var(--primary-color);
  color: var(--secondary-color);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--secondary-color);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 1;
}

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

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
}

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

/* Related Links */
.related-links {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 3rem;
}

.related-links h3 {
  margin-bottom: 1rem;
}

.related-links ul {
  list-style: none;
  margin-left: 0;
}

.related-links li {
  margin-bottom: 0.5rem;
}

/* Interactive Components */
.interactive-tool {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.interactive-tool h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--secondary-color);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #4f46e5;
}

.btn-primary:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

.result-box {
  background: var(--secondary-color);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: none;
}

.result-box.show {
  display: block;
}

.loading {
  display: none;
  text-align: center;
  padding: 1rem;
  color: var(--text-light);
}

.loading.show {
  display: block;
}

.error-message {
  display: none;
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.error-message.show {
  display: block;
}

/* Upscaling Calculator */
.upscaling-calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.calculator-inputs {
  display: flex;
  gap: 1rem;
}

.calculator-inputs input {
  flex: 1;
}

.calculator-results {
  background: var(--secondary-color);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  color: var(--text-light);
}

.result-value {
  font-weight: 700;
  color: var(--primary-color);
}

.upscale-warning {
  display: none;
  background: #fff3cd;
  color: #856404;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Recommendation Card */
.recommendation-card {
  background: var(--secondary-color);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.recommendation-card h3 {
  margin-top: 0;
  color: var(--accent-color);
}

.recommendation-reason {
  margin: 1rem 0;
  line-height: 1.8;
}

.recommendation-workflow {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.recommendation-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-color);
  font-weight: 600;
}

.copy-prompt-btn {
  background: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.copy-prompt-btn:hover {
  background: #333;
}

/* Responsive */
@media (max-width: 768px) {
  /* Mobile menu toggle button */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Hero section adjustments */
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  /* Grid adjustments */
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .content-section h2 {
    font-size: 2rem;
  }
  
  .upscaling-calculator {
    grid-template-columns: 1fr;
  }
  
  .calculator-inputs {
    flex-direction: column;
  }
}
