/*
 * Standard Blog Styles
 * All blog posts MUST use this stylesheet
 * Reference: public/blog/free-online-countdown-timer/index.html
 */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap");

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f0f0f0;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-primary: #e0e0e0;
  --border-light: #e0e0e0;
  --accent-primary: #000000;
  --accent-hover: #333333;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --link-color: #0000ee;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2e2e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #707070;
  --border-primary: #3a3a3a;
  --border-light: #2e2e2e;
  --accent-primary: #4a9eff;
  --accent-hover: #6bb3ff;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --link-color: #4a9eff;
}

body {
  font-family: "JetBrains Mono", "Geist Mono", "SF Mono", "Menlo", monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.875rem;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

::-webkit-scrollbar,
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
  display: none;
}

a {
  color: var(--link-color);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 100;
}

.header-title {
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.header-title a:hover {
  color: var(--link-color);
}

.header-title .separator {
  color: var(--text-tertiary);
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-self: center;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.header-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-self: end;
}

.theme-toggle-button,
.header-feedback-button {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  padding: 0;
  text-decoration: none;
}

.theme-toggle-button:hover,
.header-feedback-button:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.main-content {
  flex: 1;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.back-link:hover {
  color: var(--text-primary);
}

.post-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.post-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  text-decoration: none;
}

.post-tag:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.post-title {
  font-weight: bold;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-body {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.post-body h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body strong {
  font-weight: bold;
}

.post-body a {
  color: var(--link-color);
  text-decoration: underline;
}

.post-body a:hover {
  text-decoration: none;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body code {
  background-color: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  border-radius: 2px;
}

.post-body pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.post-body pre code {
  background-color: transparent;
  padding: 0;
}

.post-body blockquote {
  border-left: 2px solid var(--border-primary);
  padding-left: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border-primary);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.post-body th {
  background-color: var(--bg-secondary);
  font-weight: bold;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border-primary);
  margin: 2rem 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .main-content {
    padding: 2rem 1rem;
  }

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

  .post-body {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
  }

  .header-title {
    font-size: 0.75rem;
    order: 1;
  }

  .header-nav {
    gap: 1rem;
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header-nav a {
    font-size: 0.875rem;
  }

  .header-controls {
    order: 2;
  }

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

/*
 * Special Content Elements
 * For status boxes, visual indicators, and other unique content components
 */

:root {
  --success: #16a34a;
  --warning: #ca8a04;
  --error: #dc2626;
}

[data-theme="dark"] {
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #ff6b6b;
}

/* Status Box */
.status-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  padding: 1.5rem;
  margin: 2rem 0;
}

.status-box h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.status-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
}

.status-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.status-content h4 {
  font-size: 0.875rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.status-content p {
  font-size: 0.875rem;
  margin: 0;
}
