:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-bg: #f8f9fa;
  --dark-bg: #1a1a1a;
  --light-text: #f8f9fa;
  --dark-text: #333;
  --code-bg: #2d2d2d;
  --code-text: #f8f8f2;
  --border-color: #ddd;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Light mode (default) */
body {
  background-color: var(--light-bg);
  color: var(--dark-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode */
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--light-text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.logo span {
  color: var(--secondary-color);
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 1.5rem;
}

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

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

.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--accent-color);
  color: var(--light-text);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #c0392b;
}

main {
  padding: 2rem 0;
}

section {
  margin-bottom: 3rem;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.dark-mode h2 {
  color: var(--secondary-color);
}

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

.feature {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .feature {
  background-color: #2c2c2c;
}

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

.feature h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.dark-mode .feature h3 {
  color: var(--secondary-color);
}

footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 2rem 0;
  margin-top: 2rem;
}

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

.footer-column h3 {
  margin-top: 0;
  color: var(--secondary-color);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-column a {
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Code styling */
pre, code {
  font-family: var(--font-mono);
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: 4px;
}

code {
  padding: 0.2em 0.4em;
  font-size: 0.85em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  position: relative;
}

pre code {
  padding: 0;
  background-color: transparent;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #222;
  padding: 0.5rem 1rem;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.language-label {
  color: #999;
}

.copy-button {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.code-block {
  margin-bottom: 2rem;
}

.code-block pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Interactive tool styling */
.tool-container {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.dark-mode .tool-container {
  background-color: #2c2c2c;
}

.tool-input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-mono);
  resize: vertical;
  min-height: 100px;
}

.dark-mode .tool-input {
  background-color: #333;
  color: var(--light-text);
  border-color: #444;
}

.tool-output {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--code-bg);
  color: var(--code-text);
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  min-height: 40px;
}

.tool-actions {
  display: flex;
  gap: 1rem;
}

/* Enhanced hash generator styling */
.input-type-toggle {
  display: flex;
  margin-bottom: 15px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.input-type-toggle button {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--light-bg);
  cursor: pointer;
  transition: background-color 0.3s;
}

.dark-mode .input-type-toggle button {
  background: var(--dark-bg);
  color: var(--light-text);
}

.input-type-toggle button.active {
  background-color: var(--secondary-color);
  color: white;
}

.file-input-container {
  margin-bottom: 15px;
}

.file-input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  border: 2px dashed var(--border-color);
  border-radius: 4px;
  text-align: center;
}

.dark-mode .file-input-wrapper {
  border-color: #444;
}

.file-select-button {
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
}

.file-info {
  margin-top: 10px;
  font-size: 14px;
}

.file-name {
  font-weight: bold;
  margin-right: 5px;
}

.result-container {
  margin-top: 15px;
}

.result-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.result-wrapper {
  display: flex;
  align-items: center;
}

.hash-result {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px 0 0 4px;
  font-family: var(--font-mono);
  background-color: var(--code-bg);
  color: var(--code-text);
}

.copy-button {
  padding: 12px 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.copy-button:hover {
  background-color: #34495e;
}

.copy-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.copy-button.copied {
  background-color: #27ae60;
}

/* Verification result styling */
.verify-success {
  color: #27ae60;
  font-weight: bold;
}

.verify-error {
  color: #e74c3c;
  font-weight: bold;
}

.verify-warning {
  color: #f39c12;
  font-weight: bold;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  overflow-x: auto;
  display: block;
}

table, th, td {
  border: 1px solid var(--border-color);
}

th {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 0.8rem;
  text-align: left;
}

td {
  padding: 0.8rem;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Dark mode toggle */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
}

.dark-mode-toggle label {
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dark-mode-toggle input {
  display: none;
}

.dark-mode-toggle span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.dark-mode-toggle input:checked + label {
  background-color: var(--secondary-color);
}

.dark-mode-toggle input:checked + label span {
  transform: translateX(20px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav li {
    margin: 0 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .dark-mode-toggle {
    margin-top: 1rem;
    margin-left: 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Syntax highlighting styles */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #708090;
}

.token.punctuation {
  color: #f8f8f2;
}

.token.namespace {
  opacity: 0.7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #f92672;
}

.token.boolean,
.token.number {
  color: #ae81ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a6e22e;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #e6db74;
}

.token.keyword {
  color: #66d9ef;
}

.token.regex,
.token.important {
  color: #fd971f;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Math notation styling */
.math {
  font-family: 'Cambria Math', 'STIX', serif;
}

/* Documentation navigation */
.docs-nav {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 1rem;
}

.docs-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-nav li {
  margin-bottom: 0.5rem;
}

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

.dark-mode .docs-nav a {
  color: var(--light-text);
}

.docs-nav a:hover,
.docs-nav a.active {
  color: var(--secondary-color);
}

.docs-nav .section-title {
  font-weight: bold;
  margin-top: 1rem;
  color: var(--primary-color);
}

.dark-mode .docs-nav .section-title {
  color: var(--secondary-color);
}

.docs-content {
  padding-left: 2rem;
}

/* Documentation grid */
.docs-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }
  
  .docs-nav {
    position: relative;
    top: 0;
  }
  
  .docs-content {
    padding-left: 0;
  }
}

/* Comparison page styling */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.comparison-table {
  min-width: 100%;
  display: table;
  border-collapse: collapse;
}

.comparison-table th {
  white-space: nowrap;
  text-align: center;
}

.comparison-table td {
  text-align: center;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: bold;
}

.chart-container {
  margin: 1.5rem 0;
}

.chart-bar {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chart-label {
  width: 100px;
  font-weight: bold;
  margin-right: 1rem;
}

.chart-value {
  height: 30px;
  background-color: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.use-case-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.use-case-card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark-mode .use-case-card {
  background-color: #2c2c2c;
  border-color: #444;
}

.use-case-card h3 {
  margin-top: 0;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.dark-mode .use-case-card h3 {
  color: var(--secondary-color);
  border-color: #444;
}

.recommended, .acceptable, .avoid {
  margin-bottom: 1rem;
}

.recommended h4 {
  color: #27ae60;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.acceptable h4 {
  color: #f39c12;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.avoid h4 {
  color: #e74c3c;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.use-case-card ul {
  margin: 0 0 0.5rem 0;
  padding-left: 1.5rem;
}

.use-case-card li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.warning-box, .note-box, .cta-box {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.warning-box {
  background-color: rgba(231, 76, 60, 0.1);
  border-left: 4px solid #e74c3c;
}

.dark-mode .warning-box {
  background-color: rgba(231, 76, 60, 0.2);
}

.note-box {
  background-color: rgba(52, 152, 219, 0.1);
  border-left: 4px solid #3498db;
}

.dark-mode .note-box {
  background-color: rgba(52, 152, 219, 0.2);
}

.cta-box {
  background-color: rgba(46, 204, 113, 0.1);
  border-left: 4px solid #2ecc71;
  padding: 1.5rem;
}

.dark-mode .cta-box {
  background-color: rgba(46, 204, 113, 0.2);
}

.warning-box h4, .note-box h4, .cta-box h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

nav a.active {
  color: var(--secondary-color);
  position: relative;
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
}