/* OneComme OSC Router User Guide - Styles */

:root {
  --primary-color: #4a90e2;
  --secondary-color: #7b68ee;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --dark-bg: #1e1e1e;
  --light-bg: #f5f5f5;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #ddd;
  --code-bg: #f4f4f4;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #fff;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.header-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  transition: background 0.3s;
  font-size: 0.9rem;
}

.header-links a:hover {
  background: rgba(255,255,255,0.3);
}

/* Navigation */
nav {
  background: var(--light-bg);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 120px;
  z-index: 999;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

nav a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 0;
  display: block;
}

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

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem 4rem;
}

section {
  margin-bottom: 4rem;
  scroll-margin-top: 200px;
}

section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-color);
}

section h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 2rem 0 1rem;
}

section h4 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin: 1.5rem 0 0.75rem;
}

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

/* Step Cards */
.step-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-number {
  background: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
}

.step-content {
  padding-left: 56px;
}

.step-content p {
  margin-bottom: 0.75rem;
}

.step-content ul,
.step-content ol {
  margin: 0.75rem 0;
  padding-left: 2rem;
  color: var(--text-light);
}

.step-content li {
  margin-bottom: 0.5rem;
}

/* Screenshot Placeholder */
.screenshot-placeholder {
  background: var(--code-bg);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.screenshot-placeholder p {
  color: var(--text-light);
  font-style: italic;
  margin: 0;
}

.screenshot-placeholder .caption {
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--text-dark);
}

/* Screenshot (when real images are added) */
.screenshot,
img.screenshot {
  max-width: 100%;
  height: auto;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
  box-shadow: var(--shadow);
  object-fit: contain;
}

/* For very large screenshots, limit max height */
img.screenshot {
  max-height: 800px;
  object-fit: contain;
  background: var(--light-bg);
}

.screenshot-caption {
  background: var(--light-bg);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
}

/* Info Boxes */
.info-box {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.info-box.note {
  background: #e3f2fd;
  border-color: var(--primary-color);
}

.info-box.warning {
  background: #fff3e0;
  border-color: var(--warning-color);
}

.info-box.success {
  background: #e8f5e9;
  border-color: var(--success-color);
}

.info-box.danger {
  background: #ffebee;
  border-color: var(--danger-color);
}

.info-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Code Blocks */
code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--danger-color);
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-dark);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: var(--primary-color);
  color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: var(--light-bg);
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
  font-weight: 500;
}

.button:hover {
  background: var(--secondary-color);
}

.button.secondary {
  background: var(--light-bg);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.button.secondary:hover {
  background: var(--border-color);
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin: 0.5rem 0;
  color: rgba(255,255,255,0.7);
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 1rem;
  }

  nav {
    top: 100px;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  section h3 {
    font-size: 1.2rem;
  }

  .step-content {
    padding-left: 0;
  }

  .step-header {
    flex-direction: column;
    align-items: flex-start;
  }

  main {
    padding: 0 1rem 2rem;
  }

  .header-content,
  .nav-content {
    padding: 0 1rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}
