/* Main Styles for DataFrame Documentation */
:root {
  --primary-color: #4a6fa5;
  --secondary-color: #9aceff;
  --accent-color: #ff6b6b;
  --background-color: #f8f9fa;
  --code-background: #272822;
  --text-color: #333;
  --light-text: #6c757d;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --radius: 4px;
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

li {
  margin-left: 10px;
}

ul li{ 
  margin-left: 20px;
}

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

/* Header Styles */
header {
  background-color: var(--primary-color);
  padding: 20px 0;
  color: white;
  box-shadow: 0 4px 6px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: white;
}

.logo-text {
  letter-spacing: 1px;
}

.logo-icon {
  font-size: 1.8rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: all var(--transition-speed) ease;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content Styles */
main {
  padding: 30px 0;
  min-height: calc(100vh - 180px);
}

.page-title {
  margin-bottom: 30px;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

/* Grid Layout for Index */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background-color: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 5px var(--shadow-color);
  padding: 20px;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-left: 4px solid var(--primary-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 50%, rgba(74, 111, 165, 0.1) 50%);
  background-size: 200% 200%;
  background-position: 0 0;
  transition: background-position var(--transition-speed) ease;
}

.card:hover::before {
  background-position: 100% 100%;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  color: white;
  margin-right: 5px;
  margin-bottom: 5px;
}

.tag-core { background-color:blue; }
.tag-process { background-color:rgb(134, 134, 249); }
.tag-flow { background-color:#04fa8b; }
.tag-create { background-color:#e39000; }
.tag-manip { background-color:#c0c783; }
.tag-group { background-color:#f90612; }
.tag-format { background-color:#e300bd; }

.card-description {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--light-text);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--light-text);
  transition: color var(--transition-speed);
}

.modal-close:hover {
  color: var(--danger-color);
}

.modal-body {
  padding: 20px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-color);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

/* Code Blocks */
pre {
  background-color: var(--code-background);
  color: white;
  padding: 15px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 15px 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  position: relative;
}

code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  background-color: #f0f0f0;
  padding: 2px 5px;
  border-radius: 3px;
}

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

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  background-color: #373832;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #b3b3b3;
}

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

.copy-button {
  background: none;
  border: none;
  color: #b3b3b3;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition-speed);
}

.copy-button:hover {
  color: white;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

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

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--primary-color);
}

tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Function Signature */
.function-signature {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 15px 0;
}

/* Parameters Section */
.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.params-table th,
.params-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.params-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--primary-color);
}

.param-name {
  font-family: 'Fira Code', monospace;
  color: var(--primary-color);
  font-weight: 500;
}

.param-type {
  font-family: 'Fira Code', monospace;
  color: var(--info-color);
  font-size: 0.9em;
}

.param-default {
  font-family: 'Fira Code', monospace;
  color: var(--light-text);
  font-size: 0.9em;
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 20px 0;
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: color var(--transition-speed);
}

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

.copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Search Box */
.search-container {
  margin: 20px 0;
  position: relative;
}

.search-box {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search-box:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
  
  header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  nav ul {
    gap: 10px;
  }
  
  .modal {
    width: 95%;
  }
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animated Elements */
.animate-fade-in {
  animation: fadeIn var(--transition-speed) ease forwards;
}

.animate-slide-up {
  animation: slideInUp var(--transition-speed) ease forwards;
}

/* Delay Classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Highlight Animation */
@keyframes highlight {
  0% {
    background-color: rgba(255, 107, 107, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

.highlight {
  animation: highlight 2s ease;
}

/* Function Categories */
.category-container {
  margin-bottom: 40px;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

/* Documentation Page Specific */
.doc-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.back-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color var(--transition-speed);
}

.back-button:hover {
  background-color: #3a598c;
}

.doc-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  flex-grow: 1;
}

.doc-section {
  margin-bottom: 30px;
}

.doc-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--primary-color);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

/* Related Functions */
.related-functions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.related-function {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--background-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all var(--transition-speed);
  border: 1px solid var(--border-color);
}

.related-function:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Code syntax highlighting */
.hljs-keyword { color: #f92672; }
.hljs-built_in { color: #66d9ef; }
.hljs-type { color: #66d9ef; }
.hljs-literal { color: #ae81ff; }
.hljs-number { color: #ae81ff; }
.hljs-string { color: #e6db74; }
.hljs-comment { color: #75715e; }
.hljs-operator { color: #f92672; }
.hljs-function { color: #a6e22e; }
.hljs-class { color: #a6e22e; }
.hljs-variable { color: #f8f8f2; }
.hljs-params { color: #fd971f; }
