/* =====================
   RESET & BASE
===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #00c853;
  --green-dark: #009624;
  --bg:         #0d0d0d;
  --bg2:        #161616;
  --bg3:        #1e1e1e;
  --border:     #2a2a2a;
  --text:       #f0f0f0;
  --muted:      #888;
  --red:        #e53935;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.5);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =====================
   LAYOUT
===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================
   HEADER
===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo__icon { font-size: 24px; }
.logo__text {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--green), #69f0ae);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav__link {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--transition);
}
.nav__link:hover,
.nav__link.active {
  color: var(--green);
  background: rgba(0,200,83,.1);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: var(--transition);
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--green); }
.lang-toggle__active  { color: var(--green); }
.lang-toggle__inactive { color: var(--muted); }
.lang-toggle__sep     { color: var(--border); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =====================
   HERO
===================== */
.hero {
  background: linear-gradient(135deg, #0a1f0a 0%, #0d1f2d 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 48px;
  text-align: center;
}

.hero__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  background: linear-gradient(135deg, #fff 40%, var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.hero__sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 28px;
}

.search-wrap {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 40px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  transition: border-color var(--transition);
}
.search-wrap:focus-within { border-color: var(--green); }

.search__input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.search__input::placeholder { color: var(--muted); }

.search__btn {
  padding: 14px 20px;
  font-size: 18px;
  transition: var(--transition);
}
.search__btn:hover { background: rgba(255,255,255,.05); }

/* =====================
   TICKER
===================== */
.ticker {
  background: var(--green-dark);
  padding: 10px 0;
  overflow: hidden;
}

.ticker__inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticker__label {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.ticker__track {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  animation: ticker 30s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* =====================
   MAIN
===================== */
.main { padding: 48px 0 64px; }

.section { margin-bottom: 56px; }

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.section__title {
  font-size: 22px;
  font-weight: 800;
  position: relative;
  padding-left: 16px;
  margin-bottom: 24px;
}
.section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--green);
  border-radius: 4px;
}
.section__head .section__title { margin-bottom: 0; }

/* =====================
   SORT
===================== */
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort__label { font-size: 13px; color: var(--muted); }
.sort__select {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* =====================
   FEATURED CARD
===================== */
.featured__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 320px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.featured__card:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(0,200,83,.15); }

.featured__img-wrap { overflow: hidden; height: 100%; min-height: 280px; }
.featured__img-wrap img { height: 100%; }

.featured__body {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured__tag {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
  align-self: flex-start;
}

.featured__title {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  flex: 1;
}

.featured__desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.featured__source { font-weight: 600; color: var(--green); }

.read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  transition: var(--transition);
  align-self: flex-start;
  margin-top: 16px;
}
.read-btn:hover { background: var(--green-dark); color: #fff; }

/* =====================
   NEWS GRID
===================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}
.news-card:hover { transform: translateY(-4px); border-color: var(--green); }

.news-card__img-wrap {
  height: 180px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.news-card__img-wrap img { height: 100%; transition: transform .4s ease; }
.news-card:hover .news-card__img-wrap img { transform: scale(1.05); }

.news-card__img-placeholder {
  height: 180px;
  background: linear-gradient(135deg, #1a2e1a, #0d1f2d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.news-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card__tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.news-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}

.news-card__source { font-weight: 600; }

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
}
.news-card__link:hover { color: #69f0ae; }

/* =====================
   BUTTON
===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 32px;
  border-radius: 8px;
  transition: var(--transition);
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.load-more-wrap {
  text-align: center;
  margin-top: 36px;
}

/* =====================
   SKELETON LOADER
===================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================
   ERROR STATE
===================== */
.error-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.error-state__icon { font-size: 56px; margin-bottom: 16px; }
.error-state__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.error-state__desc { color: var(--muted); font-size: 14px; }

/* =====================
   EMPTY STATE
===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.empty-state__icon { font-size: 56px; margin-bottom: 16px; }
.empty-state__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state__desc { color: var(--muted); font-size: 14px; }

/* =====================
   MODAL
===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
}

.modal__icon { font-size: 48px; margin-bottom: 16px; }
.modal__title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.modal__desc { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.modal__link { color: var(--green); font-weight: 600; }
.modal__link:hover { text-decoration: underline; }

.modal__input {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.modal__input:focus { border-color: var(--green); }
.modal__btn { width: 100%; }

/* =====================
   ARTICLE READER MODAL
===================== */
.article-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: flex-end;
  animation: overlayIn .2s ease;
}
.article-overlay.hidden { display: none; }

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.article-modal {
  width: min(720px, 100vw);
  height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn .28s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid var(--border);
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.article-modal__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}

.article-modal__topbar-logo {
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(135deg, var(--green), #69f0ae);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.article-modal__close:hover { background: var(--border); }

.article-modal__scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.article-modal__hero {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.article-modal__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-modal__hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #0a1f0a, #0d1f2d);
}

.article-modal__body {
  padding: 32px 36px 48px;
  max-width: 680px;
}

.article-modal__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-modal__source {
  background: var(--green);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.article-modal__date {
  font-size: 13px;
  color: var(--muted);
}

.article-modal__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 14px;
}

.article-modal__author {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.article-modal__author strong { color: var(--text); }

.article-modal__divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.article-modal__content {
  font-size: 16px;
  line-height: 1.85;
  color: #d0d0d0;
  margin-bottom: 32px;
}
.article-modal__content p { margin-bottom: 16px; }

.article-modal__footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.article-modal__note {
  font-size: 13px;
  color: var(--muted);
}

/* cursor pointer on clickable cards */
.news-card  { cursor: pointer; }
.featured__card { cursor: pointer; }

/* =====================
   FOOTER
===================== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer__text { font-size: 14px; color: var(--muted); }
.footer__api a { color: var(--green); }
.footer__api a:hover { text-decoration: underline; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .nav { display: none; }
  .burger { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 99;
  }
  .nav.open .nav__link { padding: 10px 14px; }

  .featured__card { grid-template-columns: 1fr; }
  .featured__img-wrap { min-height: 200px; }
  .featured__body { padding: 20px; }

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

  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 0 32px; }
  .main { padding: 32px 0 48px; }
}
