/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  color: #000000;
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Press Start 2P', cursive;
  font-weight: normal;
  line-height: 1.4;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

h3 {
  font-size: 16px;
}

p {
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.6;
}

/* Market Ticker */
.market-ticker {
  background-color: #000000;
  color: #ffffff;
  padding: 8px 0;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  margin-right: 40px;
}

.ticker-symbol {
  font-weight: 600;
  margin-right: 8px;
  color: #A855F7;
}

.ticker-price {
  margin-right: 8px;
}

.ticker-change {
  font-weight: 500;
}

.ticker-change.positive { color: #4ADE80; }
.ticker-change.negative { color: #F87171; }

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Header */
.site-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 20px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
  background-color: #ffffff;
}

.site-title {
  color: #000000;
  font-size: 28px;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.header-separator {
  height: 2px;
  background-color: #9b5cff;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.header-separator::before,
.header-separator::after {
  content: '';
  position: absolute;
  top: -1px;
  width: 4px;
  height: 4px;
  background-color: #9b5cff;
}

.header-separator::before {
  left: -2px;
}

.header-separator::after {
  right: -2px;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
  background-color: #ffffff;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* Articles Column */
.articles-column {
  min-width: 0;
}

#articles-list {
  min-height: 200px;
}

.article-item {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #E7E5E4;
  transition: all 0.2s ease;
  display: flex;
  gap: 24px;
}

.article-item:hover {
  border-bottom-color: #A855F7;
}

.article-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.article-image-wrapper {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  overflow: hidden;
  background-color: #F3F4F6;
  border: 1px solid #E7E5E4;
}

.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-item:hover .article-image {
  transform: scale(1.05);
}

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

.article-meta {
  color: #666666;
  font-size: 12px;
  margin-bottom: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 12px;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}

.article-title:hover {
  color: #A855F7;
}

.article-summary {
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.article-engagement {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #666666;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.article-engagement-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-engagement-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.article-separator {
  height: 1px;
  background-color: #cccccc;
  margin: 20px 0;
  position: relative;
}

.article-separator::before,
.article-separator::after {
  content: '■';
  position: absolute;
  top: -8px;
  color: #9b5cff;
  font-size: 12px;
}

.article-separator::before {
  left: 0;
}

.article-separator::after {
  right: 0;
}

/* Loading & Messages */
.loading,
.empty-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #666666;
  font-size: 20px;
}

.error-message {
  color: #000000;
  border: 2px solid #9b5cff;
  padding: 20px;
  margin: 20px 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #E7E5E4;
}

.pagination button {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #E7E5E4;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pagination button:hover:not(:disabled) {
  background-color: #A855F7;
  color: #ffffff;
  border-color: #A855F7;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #E7E5E4;
  color: #999999;
}

#page-info {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.site-footer {
  max-width: 800px;
  margin: 40px auto 20px;
  padding: 0 20px;
  text-align: center;
}

.footer-separator {
  height: 1px;
  background-color: #cccccc;
  margin-bottom: 15px;
  position: relative;
}

.footer-separator::before,
.footer-separator::after {
  content: '■';
  position: absolute;
  top: -8px;
  color: #9b5cff;
  font-size: 12px;
}

.footer-separator::before {
  left: 0;
}

.footer-separator::after {
  right: 0;
}

.site-footer p {
  color: #666666;
  font-size: 16px;
}

/* Article Content (when viewing full article) */
.article-content {
  color: #000000;
  font-size: 20px;
  line-height: 1.8;
  margin-top: 20px;
}

.article-content p {
  margin-bottom: 15px;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 25px;
  margin-bottom: 15px;
  color: #000000;
}

.article-content a {
  color: #9b5cff;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #000000;
  background-color: #9b5cff;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border: 2px solid #000000;
}

/* Sidebar */
.sidebar-column {
  position: sticky;
  top: 20px;
}

.sidebar-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #E7E5E4;
}

.sidebar-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.sidebar-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Sentiment Widget */
.sentiment-widget {
  background-color: #F9FAFB;
  border: 1px solid #E7E5E4;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
}

.sentiment-score {
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  line-height: 1;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.sentiment-label {
  font-size: 14px;
  color: #666666;
  margin-bottom: 16px;
  font-weight: 500;
  text-transform: uppercase;
}

.sentiment-bar-container {
  height: 8px;
  background-color: #E7E5E4;
  border-radius: 4px;
  overflow: hidden;
}

.sentiment-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F87171 0%, #FBBF24 50%, #4ADE80 100%);
  transition: width 1s ease-in-out;
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-input {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  padding: 12px;
  border: 1px solid #E7E5E4;
  background-color: #ffffff;
  color: #000000;
  width: 100%;
  transition: border-color 0.2s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: #A855F7;
}

.newsletter-button {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  background-color: #A855F7;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.newsletter-button:hover {
  background-color: #9333EA;
}

/* Categories */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #666666;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.category-item:hover {
  color: #A855F7;
  border-bottom-color: #A855F7;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E7E5E4;
  background-color: #ffffff;
  color: #000000;
  text-decoration: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  transition: all 0.2s ease;
}

.social-link:hover {
  background-color: #A855F7;
  color: #ffffff;
  border-color: #A855F7;
}

/* Responsive */
@media (max-width: 968px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sidebar-column {
    position: static;
  }
}

@media (max-width: 768px) {
  .site-title {
    font-size: 20px;
  }

  .main-content {
    padding: 20px 16px;
  }

  .article-item {
    flex-direction: column;
    gap: 16px;
  }

  .article-image-wrapper {
    width: 100%;
    height: 200px;
  }

  .article-title {
    font-size: 20px;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
  }

  .pagination button {
    width: 100%;
  }
}

/* Pixel Art Details */
.pixel-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #9b5cff;
  margin: 0 2px;
}

/* Simple animations */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.loading {
  animation: blink 1.5s infinite;
}

/* Hero Section: 2x2 Grid */
.hero-section {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #F3F4F6;
  position: relative;
  margin-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 0;
}

.hero-cell {
  border: 1px solid #E7E5E4;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 100%;
  max-width: 600px;
}

.hero-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: #000000;
  margin-bottom: 16px;
}

.hero-title .letter {
  display: inline-block;
  transform-origin: center;
}

.hero-subheading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 20px;
  color: #666666;
  line-height: 1.5;
}

.hero-thumbnail {
  width: 100%;
  height: 200px;
  background-color: #E7E5E4;
  border: 1px solid #E7E5E4;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

.hero-category {
  display: inline-block;
  padding: 8px 16px;
  background-color: #A855F7;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  margin-top: 16px;
}

.hero-cta {
  display: inline-block;
  padding: 12px 24px;
  background-color: #A855F7;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 20px;
  transition: background-color 0.2s ease;
}

.hero-cta:hover {
  background-color: #9333EA;
}

/* Letter Animation */
@keyframes scaleIn {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.hero-title .letter {
  transform-origin: center;
  will-change: transform;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-cell {
    padding: 24px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subheading {
    font-size: 16px;
  }

  .hero-thumbnail {
    height: 150px;
  }
}