/** Reset some basic elements */
body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure { margin: 0; padding: 0; }

/** Basic styling - Dark theme matching game site */
body { 
  font-family: Helvetica, Arial, sans-serif; 
  font-size: 16px; 
  line-height: 1.5; 
  font-weight: 300; 
  color: #E7E7E7; 
  background-color: #121014; 
  -webkit-text-size-adjust: 100%; 
}

/** Set `margin-bottom` to maintain vertical rhythm */
h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, .highlight { margin-bottom: 15px; }

/** Images */
img { max-width: 100%; vertical-align: middle; }

/* Override for blog post content images - allow full width */
.post-content img {
  max-width: 100%;
}

/** Figures */
figure > img { display: block; }

figcaption { font-size: 14px; color: #828282; }

/** Lists */
ul, ol { margin-left: 30px; }

li > ul, li > ol { margin-bottom: 0; }

/** Headings */
h1, h2, h3, h4, h5, h6 { font-weight: 300; color: #FFFFFF; }
h1 { font-size: 2em; }

/** Links - Match game's neon style */
a { color: #FF40EF; text-decoration: none; }

a:visited { color: #2c21e6; }

a:hover { 
  color: #FFFFFF !important; 
  text-decoration: underline;
}

/* Ensure back link hover works even with inline style */
.back-link:hover {
  color: #FFFFFF !important;
  text-decoration: underline;
}

/** Blockquotes */
blockquote { 
  color: #828282; 
  border-left: 4px solid #FF40EF; 
  padding-left: 15px; 
  font-size: 18px; 
  letter-spacing: -1px; 
  font-style: italic; 
}

blockquote > :last-child { margin-bottom: 0; }

/** Code formatting */
pre, code { 
  font-size: 15px; 
  border: 1px solid #2c21e6; 
  border-radius: 3px; 
  background-color: #1a1a1a; 
  color: #E7E7E7;
}

code { padding: 1px 5px; }

pre { padding: 8px 12px; overflow-x: scroll; }

pre > code { border: 0; padding-right: 0; padding-left: 0; }

/** Wrapper */
.wrapper { 
  max-width: -webkit-calc(800px - (30px * 2)); 
  max-width: calc(800px - (30px * 2)); 
  margin-right: auto; 
  margin-left: auto; 
  padding-right: 30px; 
  padding-left: 30px; 
}

/* Wider wrapper on large screens for overview page only (where updates-grid exists) */
@media screen and (min-width: 1400px) {
  .wrapper:has(.updates-grid) {
    max-width: 1000px;
    padding-right: 40px;
    padding-left: 40px;
  }
}

@media screen and (max-width: 800px) { 
  .wrapper { 
    max-width: -webkit-calc(800px - (30px)); 
    max-width: calc(800px - (30px)); 
    padding-right: 15px; 
    padding-left: 15px; 
  } 
}

/** Clearfix */
.footer-col-wrapper:after, .wrapper:after { content: ""; display: table; clear: both; }

/** Page content */
.page-content {
  padding: 40px 0;
}

/** Post styling */
.post {
  margin-bottom: 40px;
}

.post-header {
  margin-bottom: 30px;
}

.post-title {
  font-size: 42px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.post-meta {
  font-size: 14px;
  color: #828282;
  margin-top: 10px;
}

.post-content {
  color: #E7E7E7;
  line-height: 1.8;
}

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

/** Patch Notes / Changelist Styling - Enhanced Readability */
.post-content h1 {
  font-size: 42px !important;
  font-weight: 600 !important;
  margin-top: 40px;
  margin-bottom: 20px;
  border-bottom: 2px solid #2c21e6;
  padding-bottom: 10px;
  color: #FFFFFF;
}

.post-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin-top: 35px;
  margin-bottom: 15px;
  color: #FF40EF;
}

@media screen and (max-width: 800px) {
  .post-content h1 { font-size: 36px !important; }
  .post-content h2 { font-size: 24px !important; }
}

/* Changelist sections - Improvements and Fixes */
.post-content h2 + ul {
  margin-top: 15px;
  margin-bottom: 25px;
  padding-left: 0;
  list-style: none;
}

.post-content h2 + ul > li {
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
  line-height: 1.6;
  color: #E7E7E7;
}

.post-content h2 + ul > li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #FF40EF;
  font-weight: bold;
  font-size: 18px;
}

/* Nested paragraphs in list items */
.post-content h2 + ul > li > p {
  margin-bottom: 8px;
  display: inline;
}

.post-content h2 + ul > li > p:first-child {
  margin-top: 0;
}

/* Strong text in changelist items */
.post-content h2 + ul > li strong {
  font-weight: 600;
  color: #FFFFFF;
}

/* Better spacing for changelist sections */
.post-content h1 + h2 {
  margin-top: 25px;
}

/** Header Image - Wider Display */
.post-header > img:first-child,
.post-header-image {
  width: 120%;
  max-width: none;
  margin-left: -10%;
  margin-right: -10%;
  margin-bottom: 30px !important;
  display: block;
}

/* Spacing between header image and header text */
.post-header-image,
.post-header img {
  margin-bottom: 30px !important;
}

/* Responsive: On mobile, keep image contained */
@media screen and (max-width: 800px) {
  .post-header > img:first-child,
  .post-header-image {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* GIFs and videos - match text width */
.post-content img[src$=".gif"],
.post-content img[src*=".gif"],
.post-content p > img[src$=".gif"],
.post-content p > img[src*=".gif"],
.post-content iframe {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 20px 0;
}

/* Maintain aspect ratio for videos */
.post-content iframe {
  aspect-ratio: 16 / 9;
}

/* Responsive: On mobile, keep GIFs and videos contained */
@media screen and (max-width: 800px) {
  .post-content img[src$=".gif"],
  .post-content img[src*=".gif"],
  .post-content iframe {
    width: 100%;
    max-width: 100%;
  }
}

/** Update Grid Layout */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
}

/* 3 columns only on very large screens - with larger cards */
@media screen and (min-width: 1400px) {
  .updates-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  .update-card-content {
    padding: 20px 24px;
  }
  
  .update-card-title {
    font-size: 20px;
    margin: 0 0 8px 0;
  }
  
  .update-card-date {
    font-size: 14px;
  }
}

.update-card {
  background: #1a1a1a;
  border: 1px solid #2c21e6;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 64, 239, 0.3);
  border-color: #FF40EF;
}

.update-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.update-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #121014;
}

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

.update-card:hover .update-card-image img {
  transform: scale(1.05);
}

.update-card-content {
  padding: 16px 20px;
}

.update-card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #FFFFFF;
  line-height: 1.4;
}

.update-card-date {
  font-size: 13px;
  color: #828282;
  margin: 0;
}

/* Responsive: 2 columns on tablet */
@media screen and (max-width: 900px) {
  .updates-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Responsive: 1 column on mobile */
@media screen and (max-width: 600px) {
  .updates-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}


/** Archive/List View */
#archives {
  margin-top: 30px;
}

.archive-group {
  margin-bottom: 30px;
}

.archive-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #2c21e6;
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-item h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}

.archive-item h4 a {
  color: #FF40EF;
  text-decoration: none;
}

.archive-item h4 a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.post-meta {
  color: #828282;
  font-size: 14px;
  margin-left: 10px;
}

