/* Wiki Page Styles - Gold Theme */

.wiki-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 80vh;
}

/* Updated header with gold gradient instead of purple */
.wiki-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px 20px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  border-radius: 20px;
  color: white;
  box-shadow: 0 10px 40px rgba(210, 155, 97, 0.3);
}

.wiki-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 15px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
  font-family: "Prata", serif;
}

.wiki-subtitle {
  font-size: 1.3rem;
  margin: 0 0 10px 0;
  opacity: 0.95;
  font-weight: 500;
}

.wiki-description {
  font-size: 1rem;
  opacity: 0.85;
  font-style: italic;
}

/* Search Container */
.search-container {
  max-width: 800px;
  margin: 0 auto 60px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-radius: 50px;
  overflow: hidden;
  background: white;
  padding: 8px;
}

.search-input {
  flex: 1;
  padding: 18px 25px;
  border: none;
  font-size: 1.1rem;
  outline: none;
  background: transparent;
  color: #333;
}

.search-input::placeholder {
  color: #999;
}

/* Updated button with gold gradient */
.search-btn {
  padding: 18px 35px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(210, 155, 97, 0.4);
}

.search-icon {
  font-size: 1.2rem;
}

.search-info {
  text-align: center;
  color: #666;
  font-size: 0.95rem;
}

/* Results Section */
.results-section {
  animation: fadeIn 0.5s ease;
}

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

.results-heading {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
  font-weight: 700;
  font-family: "Prata", serif;
}

/* Updated results count with gold gradient */
.results-count {
  padding: 15px 25px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  border-radius: 10px;
  margin-bottom: 30px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.3);
}

/* Updated no results with beige gradient */
.no-results {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #f5f3f0 0%, #e4d5b8 100%);
  border-radius: 20px;
  margin: 40px 0;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #333;
  font-family: "Prata", serif;
}

.no-results p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 10px;
}

/* Updated tip with gold accent */
.tip {
  margin-top: 30px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  border-left: 4px solid #d29b61;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tip strong {
  color: #d29b61;
}

/* Results List */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Updated result item hover with gold border */
.result-item {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.result-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-color: #d29b61;
}

.result-title {
  margin: 0 0 15px 0;
  font-size: 1.5rem;
  font-family: "Prata", serif;
}

/* Updated result link with gold color */
.result-link {
  color: #d29b61;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.result-link:hover {
  color: #b8864f;
}

.file-icon {
  font-size: 1.5rem;
}

/* Updated format badge with gold gradient */
.format-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 10px;
}

.result-content {
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 1rem;
}

/* Updated highlight with gold gradient */
.result-content mark.highlight {
  background: linear-gradient(135deg, #d29b61 0%, #e4d5b8 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.meta-info {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #888;
}

/* Updated match count with gold color */
.match-count {
  font-weight: 600;
  color: #d29b61;
}

.file-size {
  color: #999;
}

/* Updated view button with gold gradient */
.view-document-btn {
  padding: 10px 25px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.view-document-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.4);
}

/* Document Viewer Styles */

.viewer-wrapper {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: slideUp 0.5s ease;
}

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

/* Updated viewer header with gold gradient */
.viewer-header-bar {
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  padding: 25px 35px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-5px);
}

.back-link svg {
  transition: transform 0.3s ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.document-title {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
}

.document-title svg {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.document-title h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  word-break: break-word;
  font-family: "Prata", serif;
}

.document-viewer {
  padding: 50px;
  background: #fafbfc;
  min-height: 500px;
  line-height: 1.8;
  color: #2d3748;
}

/* Updated headings with gold color */
.document-viewer h1,
.document-viewer h2,
.document-viewer h3,
.document-viewer h4,
.document-viewer h5,
.document-viewer h6 {
  color: #d29b61;
  margin-top: 35px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
  font-family: "Prata", serif;
}

.document-viewer h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid #d29b61;
  padding-bottom: 15px;
}

.document-viewer h2 {
  font-size: 2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

.document-viewer h3 {
  font-size: 1.6rem;
}

.document-viewer p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.document-viewer ul,
.document-viewer ol {
  margin: 20px 0;
  padding-left: 40px;
}

.document-viewer li {
  margin-bottom: 12px;
  line-height: 1.8;
}

/* Updated links with gold color */
.document-viewer a {
  color: #d29b61;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.document-viewer a:hover {
  border-bottom-color: #d29b61;
}

.document-viewer code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: #c53030;
}

.document-viewer pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 25px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 25px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

/* Updated blockquote with gold border */
.document-viewer blockquote {
  border-left: 4px solid #d29b61;
  padding-left: 25px;
  margin: 25px 0;
  font-style: italic;
  color: #4a5568;
  background: #f7fafc;
  padding: 20px 25px;
  border-radius: 8px;
}

.document-viewer table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.document-viewer table th,
.document-viewer table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

/* Updated table header with gold gradient */
.document-viewer table th {
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.document-viewer table tr:hover {
  background: #f7fafc;
}

.document-viewer img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 25px 0;
}

.text-viewer pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.8;
  font-size: 1rem;
  color: #2d3748;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.error-message {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border-radius: 20px;
  margin: 40px 0;
  animation: fadeIn 0.5s ease;
}

.error-icon {
  font-size: 5rem;
  margin-bottom: 25px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.error-message h2 {
  font-size: 2.2rem;
  color: #c53030;
  margin-bottom: 15px;
  font-weight: 700;
  font-family: "Prata", serif;
}

.error-message p {
  font-size: 1.1rem;
  color: #742a2a;
  margin-bottom: 30px;
}

/* Updated primary button with gold gradient */
.btn-primary {
  display: inline-block;
  padding: 15px 35px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(210, 155, 97, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .wiki-title {
    font-size: 2.5rem;
  }

  .wiki-subtitle {
    font-size: 1.1rem;
  }

  .search-box {
    flex-direction: column;
    border-radius: 20px;
  }

  .search-input {
    padding: 15px 20px;
  }

  .search-btn {
    width: 100%;
    justify-content: center;
    border-radius: 15px;
  }

  .result-item {
    padding: 20px;
  }

  .result-meta {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .view-document-btn {
    width: 100%;
    text-align: center;
  }

  .viewer-header-bar {
    padding: 20px;
  }

  .document-title h1 {
    font-size: 1.5rem;
  }

  .document-viewer {
    padding: 25px 20px;
  }

  .document-viewer h1 {
    font-size: 1.8rem;
  }

  .document-viewer h2 {
    font-size: 1.5rem;
  }

  .document-viewer h3 {
    font-size: 1.3rem;
  }

  .text-viewer pre {
    padding: 20px;
    font-size: 0.9rem;
  }

  .error-message {
    padding: 50px 25px;
  }

  .error-icon {
    font-size: 3.5rem;
  }

  .error-message h2 {
    font-size: 1.8rem;
  }
}
