/* ===== COLORES Y FUENTES ===== */
:root {
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --secondary: #06B6D4;
  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== HEADER ===== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #F8FAFC 0%, #E0E7FF 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 40px 20px;
  margin-bottom: 30px;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-lg);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.logo-section h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.95;
  font-weight: 300;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== SEARCH SECTION ===== */
.search-section {
  margin-bottom: 30px;
}

.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

#searchInput {
  flex: 1;
  min-width: 250px;
  padding: 12px 20px;
  font-size: 1em;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-dark);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.btn-search {
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-search:active {
  transform: translateY(0);
}

/* ===== FILTERS ===== */
.filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.filter-btn {
  padding: 10px 20px;
  background: white;
  color: var(--text-dark);
  border: 2px solid var(--border);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

/* ===== RESULTS AREA ===== */
.results-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* ===== CONCEPT CARDS ===== */
.concept-card {
  background: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border-left: 5px solid var(--primary);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: auto;
}

.concept-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-left-width: 7px;
}

.card-header {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border);
}

.icon {
  font-size: 2.5em;
  min-width: 60px;
  text-align: center;
}

.card-header h3 {
  color: var(--primary);
  font-size: 1.3em;
  margin: 0;
  flex: 1;
}

.card-body {
  padding: 20px;
  flex-grow: 1;
  overflow: visible;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.definition {
  color: var(--text-light);
  font-size: 0.95em;
  margin-bottom: 15px;
  line-height: 1.5;
}

.definition strong {
  color: var(--primary);
  font-weight: 600;
}

/* ===== EXAMPLE SECTION ===== */
.example-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  width: 100%;
}

@media (max-width: 600px) {
  .example-section {
    grid-template-columns: 1fr;
  }
}

.code-example {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.code-example h4 {
  font-size: 0.85em;
  color: var(--primary);
  margin: 0 0 8px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-example code {
  display: block;
  background: #1F2937;
  color: #10B981;
  padding: 10px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-width: 100%;
}

.code-example pre {
  margin: 0;
  padding: 0;
}

/* ===== WELCOME MESSAGE ===== */
.welcome-message {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(6, 182, 212, 0.05));
  border: 2px solid var(--primary);
  border-radius: 15px;
  padding: 60px 40px;
  text-align: center;
  margin: 40px 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.welcome-message h2 {
  color: var(--primary);
  font-size: 2em;
  margin-bottom: 15px;
}

.welcome-message p {
  color: var(--text-light);
  font-size: 1.1em;
}

/* ===== NO RESULTS ===== */
.no-results {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(249, 115, 115, 0.05));
  border: 2px solid var(--danger);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.no-results p:first-child {
  color: var(--danger);
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 10px;
}

.no-results p:last-child {
  color: var(--text-light);
  font-size: 1em;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 2em;
  }

  .results-area {
    grid-template-columns: 1fr;
  }

  .search-container {
    flex-direction: column;
  }

  #searchInput {
    min-width: 100%;
  }

  .filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .welcome-message {
    padding: 40px 20px;
  }

  .welcome-message h2 {
    font-size: 1.5em;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}
  