:root {
  --bg: #000000;
  --text: #eee;
  --accent: #3b82f6;
  --border: #222;
  -webkit-tap-highlight-color: transparent;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

a:hover {
  color: #60a5fa;
}

header {
  background: transparent;
  backdrop-filter: blur(50px);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  height: 45px;
  display: flex;
  align-items: center;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 0;
  padding: 0.4rem 2rem 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #111;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  right: 30px;
  top: 0px;
  opacity: 0;
  pointer-events: none;
}

.search-input.active {
  width: 300px;
  opacity: 1;
  pointer-events: all;
  padding-right: 2.5rem;
}

.search-icon {
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-icon:hover {
  color: var(--accent);
}

.clear-search {
  position: absolute;
  right: 40px;
  top: 21px;
  color: #666;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  border-radius: 50%;
  display: none;
  transition: color 0.2s ease;
}

.clear-search:hover {
  color: #dc2626;
}

.clear-search.visible {
  display: block;
}

main {
  max-width: 800px;
  margin: auto auto;
  padding: 0 1rem;
}

.news-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: opacity 0.3s ease;
}

.news-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.news-desc {
  color: #999;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
}

.loader {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #222;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-out {
  opacity: 0;
}

.fade-in {
  opacity: 1;
}