/* Custom styles for sicher website */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.navbar-brand {
  font-weight: bold;
  color: #2c3e50 !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
}

.btn-primary {
  background-color: #3498db;
  border-color: #3498db;
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

.code-with-copy {
  position: relative;
}

.code-with-copy .btn-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0.7;
}

.code-with-copy:hover .btn-copy {
  opacity: 1;
}

/* Error message styling */
.cell-output-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.cell-output-error pre {
  background-color: transparent;
  border: none;
  color: #721c24;
  margin: 0;
}

/* Success message styling */
.cell-output-stdout {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.cell-output-stdout pre {
  background-color: transparent;
  border: none;
  color: #155724;
  margin: 0;
}

/* Code block styling */
.cell-output-display pre,
.cell-output-stderr pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

/* Table styling */
.table {
  margin-bottom: 1rem;
}

.table th {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  font-weight: 600;
}

/* Alert styling */
.alert {
  border-radius: 0.375rem;
  padding: 1rem;
  margin: 1rem 0;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Custom feature highlights */
.feature-highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  text-align: center;
}

.feature-highlight h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-highlight p {
  margin-bottom: 0;
  opacity: 0.9;
}

/* Code example styling */
.code-example {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
}

.code-example::before {
  content: "💡 Example";
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  background-color: white;
  padding: 0.25rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

/* Error example styling */
.error-example {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
}

.error-example::before {
  content: "⚠️ Error Example";
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  background-color: white;
  padding: 0.25rem 0.75rem;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #721c24;
}

/* Responsive design */
@media (max-width: 768px) {
  .feature-highlight {
    padding: 1.5rem;
  }

  .code-example,
  .error-example {
    padding: 1rem;
  }

  .navbar-nav {
    text-align: center;
  }

  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }
}

/* Syntax highlighting improvements */
.sourceCode {
  background-color: #f8f9fa !important;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

.sourceCode .kw { /* keywords */
  color: #d73a49;
  font-weight: bold;
}

.sourceCode .dt { /* data types */
  color: #6f42c1;
}

.sourceCode .st { /* strings */
  color: #032f62;
}

.sourceCode .co { /* comments */
  color: #6a737d;
  font-style: italic;
}

.sourceCode .fu { /* functions */
  color: #005cc5;
}

.sourceCode .dv { /* numbers */
  color: #005cc5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Print styles */
@media print {
  .navbar,
  .code-tools,
  .btn-copy {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .code-example,
  .error-example {
    border: 2px solid #000;
    break-inside: avoid;
  }
}