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

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #000;
  color: #fff;
}

.container {
  width: 100%;
}

/* Hero Section */
header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000;
}

header h1 {
  font-size: 5em;
  font-weight: 300;
  letter-spacing: -2px;
  margin-bottom: 60px;
  color: #fff;
}

.tagline {
  display: none;
}

.search-section {
  width: 90%;
  max-width: 700px;
  background: transparent;
  padding: 0;
  box-shadow: none;
  margin-bottom: 0;
  position: relative;
}

.search-bar {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border: 1px solid #333;
  border-radius: 50px;
  overflow: hidden;
  background: #111;
  transition: border-color 0.3s;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 20px 20px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: -10px;
  padding-top: 10px;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 15px 30px;
  cursor: pointer;
  color: #ccc;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #1a1a1a;
  color: #fff;
  border-left-color: #fff;
}

.autocomplete-item:last-child {
  border-radius: 0 0 20px 20px;
}

.autocomplete-no-results {
  padding: 15px 30px;
  color: #666;
  text-align: center;
}

.search-bar:focus-within {
  border-color: #fff;
}

#searchInput {
  flex: 1;
  padding: 20px 30px;
  font-size: 18px;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
}

#searchInput::placeholder {
  color: #666;
}

#searchBtn {
  padding: 20px 40px;
  background: #fff;
  color: #000;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 0;
}

#searchBtn:hover {
  background: #e0e0e0;
}

#searchBtn:active {
  transform: scale(0.98);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: #666;
}

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

.tabs {
  display: none;
}

/* Content Sections */
.content-area {
  background: #000;
  padding: 0;
  box-shadow: none;
  min-height: auto;
  border-radius: 0;
}

.tab-content {
  display: block;
  min-height: 100vh;
  padding: 80px 5%;
  animation: none;
}

.tab-content h2 {
  font-size: 3em;
  font-weight: 300;
  text-align: center;
  margin-bottom: 60px;
  color: #fff;
}

#articleTab {
  background: #000;
  border-bottom: 1px solid #222;
}

#historyTab {
  background: #0a0a0a;
  border-bottom: 1px solid #222;
}

#bookmarksTab {
  background: #000;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #fff;
}

.loading.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 3px solid #222;
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Add global keyframes for inline styles */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.article-content {
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

.article-content h2 {
  color: #fff;
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 2em;
  font-weight: 400;
}

.article-content h3 {
  color: #e0e0e0;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 400;
}

.article-content p {
  margin-bottom: 20px;
  color: #ccc;
  font-size: 1.1em;
  line-height: 1.8;
  text-indent: 2em;
}

.article-content p:first-of-type,
.article-content h2 + p,
.article-content h3 + p {
  text-indent: 0;
}

.article-content ul, .article-content ol {
  margin-left: 30px;
  margin-bottom: 20px;
  color: #ccc;
}

.article-content li {
  margin-bottom: 12px;
}

.welcome {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.article-header {
  border-bottom: 1px solid #333;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.article-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.article-title h2 {
  margin: 0;
  font-size: 2.5em;
}

.bookmark-btn {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 400;
  transition: all 0.3s;
  white-space: nowrap;
}

.bookmark-btn:hover {
  background: #fff;
  color: #000;
}

.bookmark-btn.bookmarked {
  background: #fff;
  color: #000;
}

.article-layout {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.article-main {
  flex: 1;
  min-width: 0;
}

.article-sidebar {
  width: 280px;
  position: sticky;
  top: 20px;
  height: fit-content;
  background: #111;
  border: 1px solid #222;
  padding: 20px;
  border-radius: 0;
}

.article-sidebar h4 {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 15px;
  font-weight: 400;
}

.article-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-sidebar a {
  color: #999;
  text-decoration: none;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  font-size: 0.95em;
  display: block;
}

.article-sidebar a:hover {
  color: #fff;
  border-left-color: #fff;
  background: #1a1a1a;
}

.article-sidebar a.active {
  color: #fff;
  border-left-color: #fff;
  font-weight: 600;
}

.article-image {
  width: 100%;
  max-width: 600px;
  margin: 30px 0;
  border: 1px solid #333;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-image-caption {
  padding: 10px;
  background: #111;
  color: #999;
  font-size: 0.9em;
  text-indent: 0 !important;
}

.sources {
  margin-top: 60px;
  padding: 30px;
  background: #111;
  border: 1px solid #222;
  border-radius: 0;
}

.sources h4 {
  margin-bottom: 20px;
  color: #fff;
  font-weight: 400;
  font-size: 1.3em;
}

.sources ol {
  list-style-position: outside;
  margin-left: 0;
  padding-left: 20px;
}

.sources li {
  color: #ccc;
  margin-bottom: 12px;
  padding-left: 10px;
}

.sources a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
  word-break: break-all;
}

.sources a:hover {
  color: #fff;
}

@media (max-width: 1024px) {
  .article-layout {
    flex-direction: column;
  }
  
  .article-sidebar {
    position: static;
    width: 100%;
    order: -1;
  }
}

.list-container {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.list-item {
  padding: 30px;
  margin-bottom: 20px;
  background: #111;
  border-radius: 0;
  border: 1px solid #222;
  border-left: 3px solid #fff;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item:hover {
  background: #1a1a1a;
  border-left-width: 5px;
  transform: none;
}

.list-item-content h3 {
  color: #fff;
  margin-bottom: 8px;
  font-weight: 400;
  font-size: 1.3em;
}

.list-item-content p {
  color: #666;
  font-size: 0.9em;
  margin: 0;
}

.list-item-actions {
  display: flex;
  gap: 10px;
}

.btn-small {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
  color: #999;
}

.btn-small:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: #666;
}

.empty-state p {
  font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 3em;
  }
  
  .tab-content h2 {
    font-size: 2em;
  }
  
  .article-title {
    flex-direction: column;
    align-items: flex-start;
  }
}
