/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
:root {
  --color-bg: #f6f5f4;
  --color-surface: #ffffff;
  --color-border: #e5e2df;
  --color-text: #292524;
  --color-text-muted: #78716c;
  --color-accent: #d0491d;
  --color-accent-hover: #b53d17;
  --color-error: #b91c1c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(41, 37, 36, 0.06), 0 1px 8px rgba(41, 37, 36, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

main {
  padding: 2.5rem 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

.site-header {
  margin-bottom: 2rem;
}

.site-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-accent);
}

.site-tagline {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-form textarea,
.post-form input {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
}

.post-form textarea:focus,
.post-form input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.post-form textarea {
  resize: vertical;
}

.post-form button {
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 6px;
  background: var(--color-accent);
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.post-form button:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.post-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.post-form-file {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-form-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.post-form-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  object-fit: cover;
}

.post-form-preview button {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.post-form-error {
  color: var(--color-error);
  margin: 0;
  font-size: 0.9rem;
}

.post-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
}

.post-item p {
  margin: 0;
}

.post-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.post-item-author {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-accent);
}

.post-item-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.post-item-image {
  display: block;
  max-width: 100%;
  max-height: 400px;
  margin-top: 0.5rem;
  border-radius: var(--radius);
  object-fit: cover;
}

.vote-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
}

/* OUTLINE (default) */
.vote-outline {
  stroke: var(--color-text-muted);
  stroke-width: 2px;
  fill: none;
  stroke-linejoin: round;
}

/* FILLED (active) */
.vote-up-filled {
  fill: var(--color-accent);
  stroke: var(--color-accent);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.vote-down-filled {
  fill: #3b82f6;
  stroke: #3b82f6;
  stroke-width: 2px;
  stroke-linejoin: round;
}

.vote-number-up {
  color: var(--color-accent);
  font-weight: 600;
}

.vote-number-down {
  color: #3b82f6;
  font-weight: 600;
}

.vote-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* Darkened background that blocks interaction */
.error-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* gray overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* above everything */
  pointer-events: auto; /* ensure backdrop catches clicks */
}

/* Modal box */
.error-modal {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  position: relative;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* close X button */
.error-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

