/* ═══════════════════════════════════════════════════════
   concedieri.dev — Terminal-Inspired Modern Theme
   ═══════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-hover: #21262d;
  --border: #30363d;
  --border-bright: #484f58;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --accent-green: #3fb950;
  --accent-green-dim: #238636;
  --accent-amber: #d29922;
  --accent-red: #f85149;
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-cyan: #39d353;

  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 6px;
  --transition: 150ms ease;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* ═══ HEADER ═══ */
#site-header {
  padding: 2rem 0 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header-top {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.ascii-logo {
  font-size: 0.55rem;
  line-height: 1.15;
  color: var(--accent-green);
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 20px rgba(63, 185, 80, 0.3);
}

.ascii-logo-small {
  display: none;
  font-size: 1.2rem;
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(63, 185, 80, 0.3);
}

.header-actions {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.social-link {
  color: var(--accent-green);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  letter-spacing: 0.03em;
}

.social-link:hover {
  border-color: var(--accent-green);
  background: rgba(63, 185, 80, 0.1);
  text-shadow: 0 0 10px rgba(63, 185, 80, 0.4);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.lang-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.lang-btn.active {
  background: var(--accent-green-dim);
  border-color: var(--accent-green);
  color: #fff;
}

.lang-sep {
  color: var(--border);
}

.subtitle {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ── Navigation ── */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--accent-green);
}

.nav-link.active {
  color: var(--accent-green);
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.nav-sep {
  color: var(--border);
  font-size: 0.75rem;
}

/* ═══ STATS BAR ═══ */
#stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-green);
  font-family: var(--font-mono);
  text-shadow: 0 0 15px rgba(63, 185, 80, 0.2);
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══ FILTERS ═══ */
#filters-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.filter-prompt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prompt-symbol {
  color: var(--accent-green);
  font-size: 1.1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.filter-label {
  color: var(--accent-amber);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.filter-input {
  flex: 1;
  min-width: 150px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition);
}

.filter-input:focus {
  border-color: var(--accent-green);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.5rem;
}

.filter-select:focus {
  border-color: var(--accent-green);
}

.filter-reset {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-mono);
}

.filter-reset:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ═══ TABLE ═══ */
#table-section {
  padding: 1.5rem 0;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

#data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

#data-table thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
  z-index: 1;
}

#data-table th {
  padding: 0.75rem 0.6rem;
  text-align: left;
  font-weight: 600;
  color: var(--accent-amber);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}

#data-table th.sortable {
  cursor: pointer;
  transition: color var(--transition);
}

#data-table th.sortable:hover {
  color: var(--accent-green);
}

#data-table th.sort-asc::after {
  content: ' ▲';
  color: var(--accent-green);
}

#data-table th.sort-desc::after {
  content: ' ▼';
  color: var(--accent-green);
}

#data-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

#data-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}

#data-table tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

#data-table tbody tr:hover {
  background: var(--bg-hover);
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-confirmed {
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.status-rumored {
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.source-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.78rem;
}

.source-link:hover {
  text-decoration: underline;
}

/* ── Source badges ── */
.source-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  margin: 1px 2px;
  transition: opacity var(--transition);
}

.source-badge:hover {
  opacity: 0.8;
}

.source-type-confirm {
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.source-type-rumor {
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.source-type-analysis {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.source-type-official {
  background: rgba(188, 140, 255, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(188, 140, 255, 0.3);
}

/* ── Sources list in modal ── */
.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sources-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.sources-list .source-badge {
  flex-shrink: 0;
  margin-top: 1px;
}

.sources-list .source-link {
  font-size: 0.82rem;
  line-height: 1.4;
}

.detail-row-sources {
  flex-direction: column;
  gap: 0.5rem;
}

.detail-row-sources .detail-label {
  width: auto;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}

.hidden {
  display: none !important;
}

/* ═══ CHARTS ═══ */
#charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-amber);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══ MODAL ═══ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.modal-close:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.detail-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.85rem;
}

.detail-label {
  width: 140px;
  flex-shrink: 0;
  color: var(--accent-amber);
  font-weight: 600;
}

.detail-value {
  color: var(--text-primary);
}

.detail-company {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

/* ═══ FOOTER ═══ */
#site-footer {
  padding: 1.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-row {
  margin: 0.3rem 0;
}

.footer-sep {
  margin: 0 0.5rem;
}

.footer-branding {
  margin-top: 0.5rem;
}

.wp-logo-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.wp-logo-link:hover {
  color: var(--accent-green);
}

.wp-logo {
  color: var(--accent-green);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  #stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  #charts-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .ascii-logo {
    display: none;
  }

  .ascii-logo-small {
    display: block;
  }

  .header-top {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .header-actions {
    position: static;
  }

  #stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .filter-prompt {
    flex-direction: column;
    align-items: stretch;
  }

  .prompt-symbol, .filter-label {
    display: none;
  }

  #data-table {
    font-size: 0.75rem;
  }
}

/* ═══ LOADING ANIMATION ═══ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.loading-cursor::after {
  content: '█';
  animation: blink 1s infinite;
  color: var(--accent-green);
}

/* ═══ COUNT ANIMATION ═══ */
.count-up {
  transition: color 0.3s ease;
}

/* ═══════════════════════════════════════════════════════
   PAGE CONTENT — About & Tips pages
   ═══════════════════════════════════════════════════════ */

.page-content {
  padding: 1.5rem 0 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.page-intro {
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.content-block {
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-amber);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Terminal block (faux terminal window) ── */
.terminal-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #f85149; }
.terminal-dot.yellow { background: #d29922; }
.terminal-dot.green { background: #3fb950; }

.terminal-title {
  margin-left: 0.5rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.terminal-body {
  padding: 1.25rem;
  background: var(--bg-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.terminal-body p {
  margin-bottom: 0.75rem;
}

.terminal-body p:last-child {
  margin-bottom: 0;
}

.terminal-body strong {
  color: var(--accent-green);
}

.code-block {
  font-family: var(--font-mono) !important;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre;
  overflow-x: auto;
}

/* ── Info grid (about page) ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.info-card:hover {
  border-color: var(--accent-green);
}

.info-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.info-card h3 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-green);
  margin-bottom: 0.4rem;
}

.info-card p {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══ TIPS FORM ═══ */
.tip-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-amber);
  font-weight: 600;
}

.form-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus {
  border-color: var(--accent-green);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.form-actions {
  padding-top: 0.5rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

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

.form-message {
  padding: 1rem;
  text-align: center;
}

.success-ascii {
  color: var(--accent-green);
  font-size: 1rem;
  font-weight: 600;
}

/* ── Alternative submission methods ── */
.alt-method {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.alt-method p {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.alt-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alt-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: all var(--transition);
}

.alt-link-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.email-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.email-link:hover {
  text-decoration: underline;
}

/* ── Responsive: pages ── */
@media (max-width: 650px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
