/* Main styles for Fibonacci Algorithm Comparison */

:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #34495e;
  --light-color: #ecf0f1;
  --text-color: #2c3e50;
  --section-padding: 40px;
  --section-margin: 20px;
  --border-radius: 8px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f9f9f9;
  padding-top: 60px;
}

header {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
}

nav ul li {
  margin: 5px 10px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--border-radius);
  transition: background 0.3s;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.section {
  background: white;
  margin: var(--section-margin) 0;
  padding: var(--section-padding);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.section h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light-color);
  padding-bottom: 10px;
}

.section h3 {
  color: var(--dark-color);
  margin: 20px 0 10px;
}

.text-content {
  max-width: 800px;
  margin: 0 auto;
}

.text-content p, .text-content ul, .text-content ol {
  margin-bottom: 15px;
}

.text-content ul, .text-content ol {
  padding-left: 20px;
}

.chart-container {
  width: 100%;
  margin: 30px auto;
  height: 400px;
}

.math-block {
  margin: 20px 0;
  padding: 15px;
  background: var(--light-color);
  border-radius: var(--border-radius);
  overflow-x: auto;
}

pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 15px 0;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

.visual-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px auto;
  max-width: 600px;
}

.controls {
  margin-top: 15px;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin: 0 5px;
  transition: background 0.3s;
}

button:hover {
  background-color: #2980b9;
}

#reset-spiral {
  background-color: var(--dark-color);
}

#reset-spiral:hover {
  background-color: #2c3e50;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9em;
}

table th, table td {
  padding: 12px 15px;
  text-align: right;
}

table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

table tr {
  border-bottom: 1px solid #dddddd;
}

table tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

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

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

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  nav ul {
    flex-direction: column;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .section {
    padding: 20px;
  }
}
