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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  padding: 0;
  margin: 0;
}

.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Mobile-first approach */
.rounded-white-box {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 20px 0;
}

/* Header */
.site-header {
  background: white;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.site-title {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: #2c3e50;
  text-align: center;
}

/* Navigation - Mobile friendly */
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  text-decoration: none;
  color: #3498db;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.3s;
  display: inline-block;
  font-size: 0.9rem;
}

nav ul li a:hover {
  background: #f0f0f0;
}

/* Typography */
h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #2c3e50;
  word-wrap: break-word;
}

h2 {
  font-size: 1.5rem;
  margin: 20px 0 10px;
  color: #2c3e50;
}

h3 {
  font-size: 1.3rem;
  margin: 15px 0 10px;
}

/* Article styling */
article {
  margin-bottom: 30px;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Music Table - Make responsive */
table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 8px;
  text-align: left;
  border: 1px solid #ddd;
  vertical-align: top;
}

th {
  background: #f0f0f0;
  font-weight: bold;
}

/* Audio player */
audio {
  width: 100%;
  max-width: 200px;
  min-width: 120px;
}

/* YouTube link */
td a {
  word-break: break-word;
  display: inline-block;
  max-width: 150px;
}

/* Explanation box */
.explanation-box {
  background: #fef9e6;
  border-left: 4px solid #e67e22;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.explanation-box ul {
  margin-left: 20px;
  margin-top: 10px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: #666;
}

/* Horizontal rule */
hr {
  margin: 30px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Links */
a {
  color: #3498db;
  text-decoration: none;
  word-wrap: break-word;
}

a:hover {
  text-decoration: underline;
}

/* Tablet and Desktop */
@media (min-width: 768px) {
  .site-wrapper {
    padding: 40px;
  }
  
  .rounded-white-box {
    padding: 40px;
  }
  
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .site-title {
    text-align: left;
    font-size: 2rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  table {
    display: table;
  }
  
  audio {
    width: 180px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .site-wrapper {
    padding: 10px;
  }
  
  .rounded-white-box {
    padding: 15px;
  }
  
  nav ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  th, td {
    padding: 8px 4px;
    font-size: 0.8rem;
  }
  
  audio {
    min-width: 100px;
  }
}

/* Fix for long words/URLs */
p, li, td, a {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Improve touch targets */
button, a, audio, input {
  touch-action: manipulation;
}


.homepage article {
    margin-bottom: 2rem;
}

.featured-post {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
}

.featured-post h1 {
    margin-top: 0;
}

audio {
    margin: 1rem 0;
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #0066cc;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #ddd;
}
