/* CSS Variables */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* Light Mode */
body.light-mode {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --bg-card: #E5E7EB;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #D1D5DB;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.nav-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.nav-menu a:hover {
  color: var(--primary);
  background: var(--bg-card);
}

.nav-menu a.nav-innov-link {
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.lang-btn {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: var(--primary);
  background: var(--bg-card);
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* Views */
.view {
  animation: fadeIn 0.3s ease-in;
}

.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Articles List */
.articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-author {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-detail .article-author {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.article-category {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.article-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.article-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-summary {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

/* Article Detail */
.btn-back {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: all 0.2s;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.article-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
}

.article-detail .article-title {
  font-size: 2rem;
  margin: 1rem 0;
}

.article-image-full {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.article-image-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  margin-top: 2rem;
  line-height: 1.8;
}

.article-author-bio {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.article-author-bio h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.article-author-bio p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-author-bio strong {
  color: var(--text-primary);
}

.article-content h3 {
  color: var(--primary);
  margin: 1.5rem 0 1rem;
}

.article-content h4 {
  color: var(--text-secondary);
  margin: 1.25rem 0 0.75rem;
}

.article-content ul {
  margin-left: 2rem;
  margin-top: 0.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* Daily View */
.daily-fixed-info {
  position: sticky;
  top: 70px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 1rem 1rem;
  padding: 1rem 2rem;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.daily-fixed-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: var(--primary);
}

.daily-fixed-info .daily-fixed-date {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.daily-fixed-info .daily-fixed-summary {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.daily-header {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.daily-search-container {
  margin-bottom: 2rem;
}

.daily-search-input {
  width: 100%;
  max-width: 600px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s;
}

.daily-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.daily-search-input::placeholder {
  color: var(--text-muted);
}

.daily-date-selector {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.daily-date-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.daily-date-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.daily-date-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.daily-date-text {
  font-size: 0.85rem;
}

.daily-date-thumb {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: 0.25rem;
  transition: transform 0.3s ease;
}

.daily-date-btn:hover .daily-date-thumb {
  transform: scale(2.5);
  z-index: 10;
  position: relative;
  pointer-events: none;
}

.daily-date-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--bg-card);
  pointer-events: none;
}

.daily-news-title {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.daily-news-title-text {
  color: var(--primary);
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.daily-news-date {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: normal;
}

.daily-news-summary {
  color: var(--text-primary);
  margin: 0;
  font-size: 0.85rem;
  font-weight: normal;
}

.daily-news-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.daily-news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
}

.daily-news-title {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.daily-news-content {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.daily-news-source {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.daily-conclusion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.daily-conclusion h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.daily-conclusion p {
  color: var(--text-secondary);
}

.daily-image {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.daily-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.daily-older-link {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.daily-older-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.daily-older-link a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Country Detail View */
.country-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
}

.country-header {
  text-align: center;
  margin-bottom: 2rem;
}

.country-flag-large {
  width: 200px;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.country-title {
  color: var(--primary);
  margin: 0;
  font-size: 2rem;
}

.country-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.country-info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.country-info-label {
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.country-info-value {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.country-news-section {
  margin-top: 2rem;
}

.country-news-title {
  color: var(--primary);
  margin: 0 0 1.5rem 0;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}

.country-news-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.country-news-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
  font-style: italic;
}

.country-news-item-title {
  color: var(--primary);
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
}

.country-news-content {
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

.country-news-source {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.country-news-source a {
  color: var(--primary);
  text-decoration: none;
}

.country-news-source a:hover {
  text-decoration: underline;
}

.country-no-news {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Guide View */
.guide-continent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.guide-continent-title {
  color: var(--primary);
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
}

.guide-section {
  margin-bottom: 1.5rem;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section-title {
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.guide-countries-grid {
  display: grid;
  gap: 0.75rem;
}

.guide-countries-large {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.guide-countries-small {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.guide-country-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  transition: all 0.3s ease;
}

.guide-country-card-large {
  min-height: 150px;
}

.guide-country-card-small {
  min-height: 100px;
}

.guide-country-card:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.guide-country-flag {
  width: 100%;
  height: auto;
  max-height: 60%;
  object-fit: contain;
  margin-bottom: 0.25rem;
}

.guide-country-card-small .guide-country-flag {
  max-height: 50%;
}

.guide-country-text {
  color: var(--text-primary);
  font-size: 0.75rem;
  line-height: 1.1;
  word-wrap: break-word;
}

.guide-country-card-large .guide-country-text {
  font-size: 0.85rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .main-content {
    padding: 0 1rem;
  }

  .article-card,
  .article-detail {
    padding: 1rem;
  }

  .daily-header {
    padding: 2rem 1rem;
  }
}
