/* =============================================================================
   BASE STYLES - Common styles used across all pages
   ============================================================================= */

/* Theme Variables */
:root {
  /* Light Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f9fafb;
  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-muted: #9ca3af;
  --border-primary: #e5e7eb;
  --border-secondary: #d1d5db;
  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-text: #1e40af;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --gradient-primary: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
  --overlay-gradient: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* Dark Theme Colors - IMPROVED CONTRAST */
[data-theme="dark"] {
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --bg-tertiary: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-tertiary: #d1d5db;
  --text-muted: #9ca3af;
  --border-primary: #374151;
  --border-secondary: #4b5563;
  --accent-primary: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a8a;
  --accent-text: #93c5fd;
  --success-bg: #065f46;
  --success-text: #34d399;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --overlay-gradient: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

/* Font Face Declarations */
@font-face {
  font-family: "RubikDoodleShadow";
  src: url("../fonts/RubikDoodleShadow-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn svg {
  display: inline-block;
  vertical-align: middle;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-text);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(31, 41, 55, 0.9);
  color: var(--accent-primary);
}

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-text {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.75rem;
}

.btn-text:hover {
  color: var(--text-secondary);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

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

.tag.selected {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.quick-tag {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .quick-tag {
  background: rgba(31, 41, 55, 0.9);
  color: var(--text-primary);
}

/* No Posts */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
}

.no-posts h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.no-posts p {
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

/* Responsive Design Base */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }

  .main-content {
    padding: 1rem 0.5rem;
  }
}

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