:root {
  --primary: #ff6b00;
  --primary-dark: #e05e00;
  --secondary: #2d3748;
  --dark: #1a202c;
  --light: #f7fafc;
  --gray: #e2e8f0;
  --dark-gray: #4a5568;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --radius: 8px;
}

[data-theme="dark"] {
  --light: #1a202c;
  --dark: #f7fafc;
  --gray: #2d3748;
  --dark-gray: #e2e8f0;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  transition: var(--transition);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.site-header {
  background-color: var(--secondary);
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 102;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 101;
}

.logo-icon {
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.main-nav a {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.main-nav a:hover {
  color: var(--primary);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* Search Container */
.desktop-search-container {
  display: block;
}

.mobile-search-container {
  display: none;
  width: 100%;
  margin-bottom: 20px;
}

.mobile-search-container .search-container {
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 5px 15px;
  transition: var(--transition);
  position: relative;
}

.search-container:focus-within {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px var(--primary);
}

#desktopSearchInput,
#mobileSearchInput {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 0;
  width: 180px;
  outline: none;
  font-size: 0.95rem;
}

#desktopSearchInput::placeholder,
#mobileSearchInput::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  padding: 5px;
}

.search-button:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.search-loading {
  position: absolute;
  right: 40px;
  color: var(--primary);
  display: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(120deg, rgba(45,55,72,0.9) 0%, rgba(26,32,44,0.95) 100%), 
              url('https://i.ibb.co/5XK6fqbZ/file-00000000566861f8b02813cc7aad2a63.png') no-repeat center center/cover;
  height: 500px;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
  padding: 0 20px;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 20px 20px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
  word-wrap: break-word;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
  background-color: var(--gray);
  padding: 15px 0;
  position: sticky;
  top: 70px;
  z-index: 90;
  border-radius: var(--radius);
  margin: 0 15px 30px;
}

.tabs-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 15px;
  scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: var(--light);
  border: none;
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary);
  color: white;
}

/* News Container */
.news-container {
  padding: 30px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-title {
  font-size: 1.8rem;
  position: relative;
  padding-bottom: 10px;
  word-wrap: break-word;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.search-info {
  font-size: 0.9rem;
  color: var(--dark-gray);
  background: rgba(255,107,0,0.1);
  padding: 5px 12px;
  border-radius: 20px;
  display: none;
  word-break: break-word;
}

/* Headline News */
.headline-news {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 50px;
}

.headline-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 500px;
}

.headline-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.headline-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.headline-main:hover img {
  transform: scale(1.03);
}

.headline-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 30px;
}

.headline-tag {
  background: var(--primary);
  color: white;
  padding: 5px 15px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
}

.headline-title {
  font-size: 2rem;
  margin-bottom: 15px;
  line-height: 1.3;
  word-wrap: break-word;
}

.headline-excerpt {
  margin-bottom: 20px;
  opacity: 0.9;
  font-size: 1.1rem;
  word-wrap: break-word;
}

.read-more {
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  background: rgba(255,255,255,0.1);
  padding: 8px 20px;
  border-radius: 30px;
  color: white;
}

.read-more:hover {
  background: var(--primary);
  gap: 10px;
}

.headline-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-article {
  display: flex;
  gap: 15px;
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 150px;
}

.side-article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.side-article img {
  width: 150px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.side-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  min-width: 0;
}

.side-tag {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: bold;
  align-self: flex-start;
  color: white;
}

.tag-game {
  background: #e63946;
}

.tag-tech {
  background: #1d3557;
}

.tag-ai {
  background: #457b9d;
}

.tag-event {
  background: #e9c46a;
  color: #333;
}

.tag-gov {
  background: #4a6572;
}

.tag-economy {
  background: #f9a825;
  color: #333;
}

.tag-film {
  background: #d32f2f;
}

.tag-other {
  background: #78909c;
}

.side-title {
  font-size: 1rem;
  margin-bottom: 5px;
  line-height: 1.3;
  word-wrap: break-word;
}

.side-date {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.news-card {
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-tag {
  align-self: flex-start;
  font-size: 0.8rem;
  padding: 3px 12px;
  border-radius: 30px;
  margin-bottom: 12px;
  font-weight: bold;
  color: white;
}

.news-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  flex-grow: 1;
  line-height: 1.4;
  word-wrap: break-word;
}

.news-excerpt {
  color: var(--dark-gray);
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.news-date {
  font-size: 0.8rem;
  opacity: 0.7;
}

.read-more-link {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: var(--transition);
}

.read-more-link:hover {
  gap: 8px;
}

/* Featured Category */
.featured-category {
  margin-bottom: 50px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.view-all {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  color: var(--primary);
}

.view-all:hover {
  gap: 10px;
}

/* Search Placeholder & No Results */
.search-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--dark-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0.7;
}

.search-placeholder i {
  font-size: 3.5rem;
}

.search-placeholder p {
  font-size: 1.1rem;
  max-width: 500px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.no-results i {
  font-size: 3.5rem;
  color: var(--dark-gray);
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--dark);
  word-wrap: break-word;
}

.no-results p {
  color: var(--dark-gray);
  max-width: 500px;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: white;
  padding: 50px 0 0;
  border-radius: 20px 20px 0 0;
  margin-top: 50px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-col {
  padding: 0 15px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-about {
  opacity: 0.8;
  margin-bottom: 20px;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  opacity: 0.8;
  transition: var(--transition);
  display: block;
  padding: 5px 0;
  word-wrap: break-word;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
  padding-left: 5px;
}

.newsletter-form {
  display: flex;
  margin-top: 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 30px;
  overflow: hidden;
}

.newsletter-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  background: transparent;
  color: white;
  outline: none;
}

.newsletter-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-btn:hover {
  background: var(--primary-dark);
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .headline-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 992px) {
  .headline-news {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .headline-main {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    background: var(--secondary);
    width: 100%;
    height: calc(100vh - 70px);
    transition: var(--transition);
    z-index: 99;
    padding: 20px;
    overflow-y: auto;
    flex-direction: column;
  }
  
  .main-nav.active {
    left: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .main-nav ul li a {
    display: block;
    padding: 15px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05);
  }
  
  .desktop-search-container {
    display: none;
  }
  
  .mobile-search-container {
    display: block;
  }
  
  .header-actions {
    margin-left: auto;
  }
  
  .hero {
    height: 400px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .category-tabs {
    top: 0;
    margin: 0 -15px 30px;
    border-radius: 0;
  }
  
  .headline-main {
    height: 300px;
  }
  
  .headline-content {
    padding: 20px;
  }
  
  .headline-title {
    font-size: 1.5rem;
  }
  
  .headline-excerpt {
    font-size: 1rem;
  }
  
  .side-article {
    flex-direction: column;
    height: auto;
  }
  
  .side-article img {
    width: 100%;
    height: 150px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }
  
  .hero {
    height: 300px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .headline-main {
    height: 250px;
  }
  
  .headline-title {
    font-size: 1.3rem;
  }
  
  .headline-excerpt {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-col {
    padding: 0;
  }
  
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
