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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #1a1a2e;
  color: #eee;
  line-height: 1.6;
  min-height: 100vh;
}

/* Site Navigation */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  background: #16213e;
  border-bottom: 1px solid #333;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.nav-active {
  color: #fff;
  background: rgba(78, 204, 163, 0.2);
  border: 1px solid #4ecca3;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  padding: 60px 0;
  text-align: center;
  border-bottom: 3px solid #4ecca3;
}

.site-title {
  font-size: 2.5rem;
  color: #4ecca3;
  margin-bottom: 10px;
}

.site-tagline {
  color: #888;
  font-size: 1.1rem;
}

/* Main Layout with Sidebar */
.main-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 30px;
}

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

/* Sidebar */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.ad-container {
  background: #16213e;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  min-height: 250px;
}

/* Responsive - stack on mobile */
@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}

/* Main Content */
main {
  padding: 40px 0;
}

/* Posts */
.post {
  background: #16213e;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.post:hover {
  transform: translateY(-2px);
}

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

.post-title {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 10px;
}

.post-meta {
  color: #888;
  font-size: 0.9rem;
}

.post-date {
  margin-right: 15px;
}

.post-author {
  color: #4ecca3;
}

.post-content {
  color: #ddd;
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.post-content h1,
.post-content h2,
.post-content h3 {
  color: #fff;
  margin: 25px 0 15px 0;
}

.post-content h2 {
  font-size: 1.5rem;
}

.post-content h3 {
  font-size: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin: 15px 0 15px 25px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content a {
  color: #4ecca3;
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content strong {
  color: #fff;
}

.post-content blockquote {
  border-left: 3px solid #4ecca3;
  padding-left: 20px;
  margin: 20px 0;
  color: #aaa;
  font-style: italic;
}

/* Post Footer / Tags */
.post-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #1a1a2e;
  color: #4ecca3;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid #4ecca3;
}

/* Loading / Error States */
.loading,
.error,
.no-posts {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 1.1rem;
}

.error {
  color: #e74c3c;
}

/* Footer */
footer {
  background: #16213e;
  padding: 30px 0;
  text-align: center;
  color: #666;
  border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 600px) {
  .site-title {
    font-size: 2rem;
  }

  .post {
    padding: 20px;
  }

  .post-title {
    font-size: 1.4rem;
  }
}

/* Beats Player Footer */
.beats-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.beats-player.expanded {
  padding: 8px 16px;
  gap: 12px;
}

.beats-toggle {
  background: linear-gradient(135deg, #4ecca3, #3ba582);
  border: none;
  color: #1a1a2e;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.beats-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(78, 204, 163, 0.4);
}

.beats-icon {
  font-size: 16px;
}

.beats-iframe-container {
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.beats-iframe-container iframe {
  display: block;
}

/* Mobile beats player */
@media (max-width: 600px) {
  .beats-player.expanded {
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
  }

  .beats-iframe-container iframe {
    width: 300px;
    height: 170px;
  }
}

/* ============================================
   POST LIST VIEW (Homepage)
   ============================================ */

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-item {
  background: #16213e;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.post-item:hover {
  border-color: #4ecca3;
}

.post-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.post-title-row:hover {
  background: rgba(78, 204, 163, 0.1);
}

.post-title-link {
  font-size: 1.15rem;
  color: #fff;
  margin: 0;
  font-weight: 500;
  flex: 1;
  padding-right: 15px;
}

.post-meta-inline {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.post-meta-inline .post-date {
  color: #888;
  font-size: 0.85rem;
}

.expand-icon {
  color: #4ecca3;
  font-size: 1.4rem;
  font-weight: bold;
  width: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}

/* Preview Section */
.post-preview {
  padding: 0 20px 20px 20px;
  border-top: 1px solid #2a3a5e;
  background: rgba(0, 0, 0, 0.15);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-text {
  color: #bbb;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 15px 0;
}

.read-more-btn {
  display: inline-block;
  background: linear-gradient(135deg, #4ecca3, #3ba582);
  color: #1a1a2e;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 204, 163, 0.4);
}

/* ============================================
   ARTICLE PAGE (Dedicated post page)
   ============================================ */

.header-link {
  text-decoration: none;
  color: inherit;
}

.header-link:hover .site-title {
  opacity: 0.8;
}

.back-link-container {
  margin-bottom: 20px;
}

.back-link {
  color: #4ecca3;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #fff;
  transform: translateX(-3px);
}

/* Full Article Styles */
.article-full {
  background: #16213e;
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

.article-title {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.3;
}

.article-meta {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.article-date {
  margin-right: 15px;
}

.article-author {
  color: #4ecca3;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.article-content {
  color: #ddd !important;
  font-size: 1.1rem;
  line-height: 1.85;
}

/* Force white/light text color on ALL content elements - overrides inline styles from editor */
.article-content *,
.article-content p,
.article-content span,
.article-content div,
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content li,
.article-content td,
.article-content th {
  color: #ddd !important;
}

.article-content strong,
.article-content strong *,
.article-content b,
.article-content b * {
  color: #fff !important;
}

.article-content a,
.article-content a * {
  color: #4ecca3 !important;
}

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

.article-content h1,
.article-content h2,
.article-content h3 {
  color: #fff;
  margin: 30px 0 15px 0;
}

.article-content h2 {
  font-size: 1.6rem;
}

.article-content h3 {
  font-size: 1.3rem;
}

.article-content ul,
.article-content ol {
  margin: 15px 0 15px 25px;
}

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

.article-content a {
  color: #4ecca3;
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content strong {
  color: #fff;
}

.article-content blockquote {
  border-left: 3px solid #4ecca3;
  padding-left: 20px;
  margin: 20px 0;
  color: #aaa;
  font-style: italic;
}

.article-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

/* Article Image (bottom of article) */
.article-image {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
}

/* Desktop: Limit portrait images (1080x1920) to reasonable size */
.article-img {
  max-width: 350px !important;
  max-height: 500px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

/* Mobile: Allow larger but still constrained */
@media (max-width: 600px) {
  .article-img {
    max-width: 100% !important;
    max-height: 70vh !important;
  }
}

/* ============================================
   BOTTOM BANNER AD (Non-sticky)
   ============================================ */

.ad-banner-bottom {
  max-width: 1200px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
}

.ad-banner-bottom .adsbygoogle {
  background: #16213e;
  border-radius: 8px;
  min-height: 90px;
}

/* Sidebar ad styling for article page */
.ad-sidebar {
  position: sticky;
  top: 20px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 900px) {
  .post-title-link {
    font-size: 1rem;
  }

  .article-title {
    font-size: 1.6rem;
  }

  .article-full {
    padding: 25px;
  }

  .ad-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .post-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .post-meta-inline {
    width: 100%;
    justify-content: space-between;
  }

  .post-title-link {
    padding-right: 0;
  }

  .article-full {
    padding: 20px;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .article-content {
    font-size: 1rem;
  }
}

/* Add padding at bottom for beats player */
body {
  padding-bottom: 60px;
}
