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

:root {
  --primary-color: #1e88e5;
  --secondary-color: #1976d2;
  --accent-color: #1565c0;
  --dark-color: #1a1a1a;
  --text-color: #333;
  --text-light: #666;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-white);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
}

.brand-link i {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-item a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary-color);
}

.nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

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

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background-color: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--dark-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.feature-link {
  color: var(--primary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Latest Posts */
.latest-posts {
  padding: 4rem 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.post-card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-card-category {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--dark-color);
}

.post-card-title a:hover {
  color: var(--primary-color);
}

.post-card-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.post-card-link {
  color: var(--primary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-footer {
  text-align: center;
}

/* Post Item (Blog Listing) */
.blog-listing {
  padding: 2rem 0;
}

.blog-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.posts-list {
  max-width: 900px;
  margin: 0 auto;
}

.post-item {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.post-item-image {
  flex-shrink: 0;
  width: 300px;
}

.post-item-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.post-item-content {
  flex: 1;
}

.post-item-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-item-category {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.post-item-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-item-title a {
  color: var(--dark-color);
}

.post-item-title a:hover {
  color: var(--primary-color);
}

.post-item-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.post-item-link {
  color: var(--primary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Post Layout */
.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.post-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.post-meta i {
  margin-right: 0.5rem;
}

.post-author,
.post-categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.post-image {
  width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-top: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.post-content h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  color: var(--dark-color);
}

.post-content h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--dark-color);
}

.post-content h4 {
  font-size: 1.25rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--dark-color);
  font-weight: 600;
}

.post-content p {
  margin: 1rem 0;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  list-style: disc;
}

.post-content li {
  margin: 0.5rem 0;
}

.post-content code {
  background-color: var(--bg-light);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.post-content pre {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary-color);
}

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  padding-right: 1rem;
  margin: 1rem 0;
  color: var(--text-light);
  font-style: italic;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e8e8e8;
  padding-left: 1rem;
  padding-right: 1rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.post-nav-link {
  flex: 1;
  padding: 1rem 1.5rem;
  background-color: var(--bg-light);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.post-nav-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.post-nav-link.prev {
  text-align: left;
}

.post-nav-link.next {
  text-align: right;
}

/* Page Layout */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
}

.page-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  color: var(--dark-color);
}

.page-content h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--dark-color);
}

.page-content ul {
  margin: 1rem 0;
  padding-left: 2rem;
  list-style: disc;
}

.page-content li {
  margin: 0.5rem 0;
}

/* About Page */
.about-content h2 {
  margin-top: 2rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-list li {
  margin: 1rem 0;
  padding-left: 1rem;
}

.about-list strong {
  color: var(--primary-color);
}

.contact-list {
  margin: 1rem 0;
}

.contact-list li {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-list i {
  color: var(--primary-color);
}

/* YouTube Page */
.youtube-container {
  padding: 2rem 0;
}

.youtube-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 3rem;
}

.youtube-intro h2 {
  margin-bottom: 1rem;
}

.youtube-subscribe {
  margin-top: 1rem;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.youtube-subscribe i {
  margin-right: 0.5rem;
}

.youtube-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.youtube-feature {
  text-align: center;
  padding: 2rem;
}

.youtube-feature i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.youtube-feature h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.youtube-feature p {
  color: var(--text-light);
}

.video-placeholder {
  background-color: var(--bg-light);
  padding: 4rem;
  text-align: center;
  border-radius: 8px;
  margin: 2rem 0;
}

.video-placeholder i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.youtube-playlists {
  margin-top: 4rem;
}

.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.playlist-card {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.playlist-card:hover {
  transform: translateY(-5px);
}

.playlist-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.playlist-card h4 {
  margin-bottom: 0.5rem;
}

.playlist-card p {
  color: var(--text-light);
}

/* Tools Page */
.tools-container {
  padding: 2rem 0;
}

.tools-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 3rem;
}

.tools-intro h2 {
  margin-bottom: 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.tool-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.tool-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.tool-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.tool-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.tool-description {
  color: var(--text-light);
  margin-bottom: 1rem;
  min-height: 3em;
}

.tool-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tool-category {
  background-color: var(--bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.tool-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-link {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.tool-link:hover {
  background-color: var(--secondary-color);
  color: white;
}

.tools-empty {
  grid-column: 1 / -1;
}

.tools-note {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  text-align: center;
}

.tools-note h3 {
  margin-bottom: 1rem;
}

.tools-note p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.small-text {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin: 0.5rem 0;
}

.footer-section ul li a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.6);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
  display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .post-item {
    flex-direction: column;
  }

  .post-item-image {
    width: 100%;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    flex-direction: column;
  }
}
