/* ========================= */
/*       THEME COLORS        */
/* ========================= */
:root {
  --bg: #fafafa;
  --card: #fff;
  --muted: #666;
  --accent: #ff6600;
  --text: #111;
}

.dark {
  --bg: #0b0f15;
  --card: #0f1520;
  --muted: #bbb;
  --accent: #ff8800;
  --text: #fff;
}

/* ========================= */
/*         BASE STYLE        */
/* ========================= */
* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ========================= */
/*          HEADER           */
/* ========================= */
header {
  background: var(--card);
  padding: 22px;
  border-bottom: 4px solid var(--accent);
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.4px;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* ========================= */
/*          WRAPPER          */
/* ========================= */
.wrap {
  max-width: 980px;
  margin: 18px auto;
  padding: 0 14px;
}

/* ========================= */
/*     SEARCH + CONTROLS     */
/* ========================= */
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.controls input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
}

.controls .btn {
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

/* ========================= */
/*        STORY CARDS        */
/* ========================= */
.story-card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

/* Meta Row */
.meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.badge {
  background: #efefef;
  color: #333;
  padding: 6px 10px;
  border-radius: 18px;
  font-size: 13px;
}

.badge.fiction {
  background: #2b2f36;
  color: #fff;
}

/* Title & Preview */
.title {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: var(--accent);
}

.preview {
  color: var(--muted);
  margin-bottom: 10px;
}

/* ========================= */
/*     IMAGE + TEXT ROW      */
/* ========================= */
.layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* FIXED PERFECT IMAGE BOX */
.thumb {
  width: 400px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  background: #ddd;
  flex-shrink: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CONTENT */
.content {
  flex: 1;
  min-width: 220px;
}

/* Full Story Hidden Initially */
.full {
  display: none;
  margin-top: 12px;
  color: var(--text);
}

/* Read Buttons */
.read-btn {
  margin-top: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

.read-btn.secondary {
  background: var(--accent);
  color: #fff;
  border: 0;
}

/* ========================= */
/*          FOOTER           */
/* ========================= */
footer {
  margin-top: 30px;
  background: #000;
  color: #fff;
  padding: 12px 8px;
  text-align: center;
  font-size: 14px;
  border-top: 3px solid var(--accent);
}

/* ========================= */
/*        RESPONSIVE         */
/* ========================= */
@media (max-width: 760px) {
  .thumb {
    width: 100%;
    height: 200px;
  }

  .layout {
    flex-direction: column;
  }
}