@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@300;600&display=swap");

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

:root {
  --ink: #1a1a1a;
  --paper: #f5f0e8;
  --cream: #ede7d4;
  --accent: #c0392b;
  --green: #2c7a4b;
  --blue: #1a5276;
  --muted: #7a7165;
  --border: #c8bfa8;
  --green-bg: #eaf5ee;
  --yellow-bg: #fef9e7;
  --red-bg: #fdecea;
  --code-bg: #f9f7f2;
  --code-border: #e6dcc8;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Source Sans Pro", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* HEADER */
.main-header {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
  color: var(--paper);
  padding: 1rem 3rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(232, 200, 154, 0.2);
  animation: headerFadeIn 1s ease-out;
}

.main-header::before {
  content: "KolektifAssist";
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Merriweather", serif;
  font-size: 9rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.08);
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}

.main-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8c89a, transparent);
}

.header-content h2 {
  font-family: "Merriweather", serif;
  font-weight: 300;
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  color: #e8c89a;
  animation: titleGlow 3s infinite;
}

.header-content h2::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e8c89a;
  opacity: 0.3;
}

@keyframes headerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(232, 200, 154, 0);
  }
  50% {
    text-shadow: 0 0 20px rgba(232, 200, 154, 0.3);
  }
}

/* MAIN */
.main-content {
  flex: 1 0 auto;
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 2rem 8rem;
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* WARNING */
.warning-intro {
  padding: 1rem;
}

.warning-intro p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

/* INTRO */
.guide-intro {
  background: linear-gradient(135deg, var(--cream) 0%, #f5f0e8 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.guide-intro p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0;
}

/* SHARED CARD */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.card h3 {
  font-family: "Merriweather", serif;
  font-weight: 300;
  font-size: 1.5rem;
  background: var(--cream);
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* TABLES - UNIFIED STYLES */
.fmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.fmt-table thead tr {
  background: var(--cream);
}

.fmt-table th {
  padding: 0.85rem 1.3rem;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Consistent cell styling for both tables */
.fmt-table td {
  padding: 1rem 1.3rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--cream);
}

/* Remove border from last row of each table */
.fmt-table tbody tr:last-child td {
  border-bottom: none;
}

/* Hover effect for both tables */
.fmt-table tbody tr:hover {
  background: var(--paper);
}

/* Format cell styling */
.fmt-table .format-cell {
  font-weight: 600;
  color: var(--ink);
  width: 42%;
}

/* Example cell styling */
.fmt-table .example-cell {
  width: 36%;
}

.format-preferred {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--green);
  display: inline-block;
  margin-top: 0.2rem;
}
/* Format notes (small text) */
.format-note {
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-block;
  margin-top: 0.2rem;
}

/* Group separator styling - consistent for both tables */
.fmt-table tr.group-start td {
  border-top: 2px solid var(--cream);
}

/* Pills container - consistent spacing */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

/* Individual pill styling */
.pill {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
}

/* Rejected pills (red styling) */
.pill.red {
  color: var(--accent);
  border-color: #f5c6c6;
  background: var(--red-bg);
}

/* Badges for visual examples */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 600;
}

.badge-success {
  background: var(--green-bg);
  color: var(--green);
}

.badge-error {
  background: var(--red-bg);
  color: var(--accent);
}

/* VISUAL EXAMPLES */
.examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.example-col {
  padding: 1.5rem;
}

.example-col:first-child {
  border-right: 1px solid var(--cream);
}

.example-col h4 {
  font-family: "Merriweather", serif;
  font-weight: 300;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

pre.example {
  display: block;
  background: var(--code-bg);
  padding: 1.2rem;
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 0.83rem;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  border-left: 4px solid var(--green);
  border-radius: 0 4px 4px 0;
}

pre.example-bad {
  display: block;
  background: var(--red-bg);
  padding: 1.2rem;
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 0.83rem;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  border-left: 4px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

/* NOTES */
.notes-body {
  padding: 1.5rem;
}

.note-item {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--green-bg);
  border-left: 4px solid var(--green);
  border-radius: 4px;
}

.note-item.warn {
  background: var(--yellow-bg);
  border-left-color: #b7770d;
}

.note-item.warn strong {
  color: #b7770d;
}

.note-item:last-child {
  margin-bottom: 0;
}

.note-item strong {
  color: var(--green);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.note-item p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.note-item p code {
  background: var(--code-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  color: var(--blue);
  border: 1px solid var(--code-border);
}

/* ACTION BUTTONS */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--ink) 0%, #333 100%);
  color: var(--paper);
  text-decoration: none;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  border-radius: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(232, 200, 154, 0.15);
}

.back-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}

.back-btn:active {
  transform: translateY(0);
}

/* BG DECO */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(200, 191, 168, 0.1) 0%,
    rgba(200, 191, 168, 0.05) 100%
  );
  top: -150px;
  right: -150px;
}

.bg-circle-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(44, 122, 75, 0.03) 0%,
    rgba(44, 122, 75, 0.01) 100%
  );
  bottom: -200px;
  left: -200px;
}

/* FOOTER */
footer {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a2a 100%);
  color: var(--paper);
  padding: 1rem 3rem;
  width: 100%;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(232, 200, 154, 0.2);
}

footer::after {
  content: "FORMATS";
  position: absolute;
  left: 2rem;
  bottom: 1rem;
  font-family: "Merriweather", serif;
  font-size: 4rem;
  font-weight: 600;
  color: rgba(232, 200, 154, 0.03);
  pointer-events: none;
  line-height: 1;
}

footer p {
  color: #999;
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

footer p:first-child {
  margin-bottom: 0.5rem;
  color: #e8c89a;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .main-header {
    padding: 1.5rem;
  }

  .main-header::before {
    font-size: 3rem;
  }

  .header-content h2 {
    font-size: 1.8rem;
  }

  .main-content {
    width: 95%;
    padding: 1.5rem 1rem 6rem;
  }

  .guide-section {
    gap: 1.5rem;
  }

  .examples-grid {
    grid-template-columns: 1fr;
  }

  .example-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--cream);
  }

  .fmt-table th,
  .fmt-table td {
    padding: 0.8rem 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .back-btn {
    width: 100%;
    justify-content: center;
  }

  .pills {
    gap: 0.35rem;
  }

  .pill {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
  }
}
