/* KidsUI Playground Styles */

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

html {
  min-height: 100vh;
  background: #e0c3fc;
}

.source-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px 0 32px;
  flex-wrap: wrap;
}

.source-badges a {
  text-decoration: none;
}

.source-badge {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.source-badge:hover {
  transform: scale(1.05);
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: transparent;
  min-height: 100vh;
  padding: 0 24px;
  padding-top: 24px;
  color: #2D2B55;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.75;
  margin-bottom: 48px;
}

section {
  max-width: 720px;
  margin: 0 auto 48px;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  border-bottom: 3px dashed #6C63FF;
  display: inline-block;
  padding-bottom: 4px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

/* Interface Panel Styles */
.interface-panel {
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  margin-top: 8px;
}

.interface-panel h4 {
  margin: 16px 0 12px;
  font-size: 1rem;
  color: #6C63FF;
}

.interface-panel h4:first-child {
  margin-top: 0;
}

.props-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.08);
}

.props-table thead {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15) 0%, rgba(142, 197, 252, 0.2) 100%);
}

.props-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 800;
  color: #2D2B55;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(108, 99, 255, 0.2);
}

.props-table th:first-child {
  border-radius: 12px 0 0 0;
}

.props-table th:last-child {
  border-radius: 0 12px 0 0;
}

.props-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
  transition: background-color 0.2s ease;
}

.props-table tbody tr:hover {
  background: rgba(108, 99, 255, 0.05);
}

.props-table tbody tr:nth-child(even) {
  background: rgba(108, 99, 255, 0.03);
}

.props-table tbody tr:nth-child(even):hover {
  background: rgba(108, 99, 255, 0.08);
}

.props-table tbody tr:last-child td {
  border-bottom: none;
}

.props-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 12px;
}

.props-table tbody tr:last-child td:last-child {
  border-radius: 0 0 12px 0;
}

.props-table td:first-child {
  font-weight: 700;
  color: #6C63FF;
}

.props-table code {
  background: rgba(108, 99, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85em;
  color: #6C63FF;
  border: 1px solid rgba(108, 99, 255, 0.15);
  white-space: nowrap;
}

.props-table td:nth-child(2) {
  color: #5a5a8a;
  font-style: italic;
}

.props-table td:nth-child(3) {
  color: #8888aa;
  font-family: 'Fira Code', monospace;
  font-size: 0.85em;
}

.animation-list {
  margin: 0;
  padding-left: 20px;
}

.animation-list li {
  margin: 6px 0;
}

/* Footer Styles */
.footer {
  text-align: center;
  padding: 24px;
  margin-top: 48px;
  border-top: 2px dashed var(--kids-primary-200, #bae6fd);
}

.footer-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  color: var(--kids-gray-600, #4b5563);
  font-size: 14px;
}

.footer-link {
  color: var(--kids-primary-600, #0284c7);
  text-decoration: none;
  font-weight: 800;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Code Panel Styles */
.code-panel {
  padding: 16px;
  background: #2D2B55;
  border-radius: 12px;
  margin-top: 8px;
  overflow-x: auto;
}

.code-panel pre {
  margin: 0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #f8f8f2;
  background: transparent !important;
  padding: 0;
}

.code-panel code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Override Prism background to match our design */
pre[class*="language-"] {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  body {
    padding: 0 16px;
    padding-top: 24px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  section {
    margin-bottom: 32px;
  }

  section h2 {
    font-size: 1.2rem;
  }

  .row {
    gap: 8px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* Make tables scrollable on mobile */
  .interface-panel {
    padding: 12px;
    overflow-x: hidden;
  }

  .props-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.85rem;
  }

  .props-table th,
  .props-table td {
    padding: 10px 12px;
    white-space: nowrap;
  }

  .props-table th:last-child,
  .props-table td:last-child {
    min-width: 200px;
    white-space: normal;
  }

  .code-panel {
    padding: 12px;
  }

  .code-panel pre,
  .code-panel code {
    font-size: 0.8rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  body {
    padding: 0 12px;
    padding-top: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .props-table {
    font-size: 0.8rem;
  }

  .props-table th,
  .props-table td {
    padding: 8px 10px;
  }

  .animation-list {
    padding-left: 16px;
  }

  .animation-list li {
    font-size: 0.9rem;
  }
}

/* Manual Section Styles */
.manual-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.1);
  border: 2px solid rgba(108, 99, 255, 0.15);
}

.manual-section h2 {
  margin-top: 0;
  border-bottom-color: #FF6B6B;
}

.manual-text {
  color: #f8f8f2;
  margin: 12px 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.manual-section .code-panel {
  background: #1a1a3e;
}

.manual-section .code-panel .manual-text {
  color: #a0a0c0;
}

/* Mobile responsive for manual section */
@media (max-width: 768px) {
  .manual-section {
    padding: 16px;
  }
}
