* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #c41e3a;
  --primary-dark: #9a1829;
  --secondary-color: #0c4da2;
  --secondary-dark: #083375;
  --accent-color: #ff6b6b;
  --text-color: #2d3436;
  --text-light: #636e72;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --border-color: #dee2e6;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.18);
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}


.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-img {
  height: 100px;
  width: auto;
  border-radius: 8px;
  display: block;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav-menu li a {
  color: var(--white);
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  display: block;
  position: relative;
  overflow: hidden;
}

.nav-menu li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  transition: left 0.3s;
}

.nav-menu li a:hover::before {
  left: 100%;
}

.nav-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-menu li.active a {
  background-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


main {
  padding: 2.5rem 0;
  min-height: calc(100vh - 200px);
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.page-header h2 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -1px;
}

.article-count {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 500;
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}


.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s;
}

.article-card:hover::before {
  opacity: 1;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(196, 30, 58, 0.2);
}

.article-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-image::after {
  content: '📰';
  position: absolute;
  font-size: 4rem;
  opacity: 0.2;
  pointer-events: none;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.article-card:hover .article-image img {
  transform: scale(1.08);
}

.article-image.no-image {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.article-image.no-image::after {
  opacity: 0.3;
}

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.source {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-badge {
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: var(--white);
  padding: 0.35rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(12, 77, 162, 0.3);
  letter-spacing: 0.3px;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-weight: 700;
}

.article-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s;
  display: inline;
  background-image: linear-gradient(var(--primary-color), var(--primary-color));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.article-title a:hover {
  color: var(--primary-color);
  background-size: 100% 2px;
}

.article-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
  line-height: 1.7;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 2px solid var(--light-bg);
  font-size: 0.85rem;
}

.date {
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.date::before {
  content: '🕒';
  font-size: 0.9rem;
}

.read-more {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(12, 77, 162, 0.05);
}

.read-more:hover {
  background: var(--secondary-color);
  color: var(--white);
  transform: translateX(4px);
  box-shadow: 0 4px 8px rgba(12, 77, 162, 0.3);
}

.no-articles {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.no-articles::before {
  content: '📭';
  display: block;
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}


.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 3rem 0 1rem;
}

.pagination-btn,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.9rem;
  border-radius: 10px;
  background: var(--white);
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover,
.pagination-page:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--primary-color);
}

.pagination-page.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.35);
}

.pagination-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

.pagination-ellipsis {
  color: var(--text-light);
  padding: 0 0.25rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .pagination-btn,
  .pagination-page {
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    font-size: 0.85rem;
  }
}


.location-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-width: 400px;
  animation: slideInRight 0.5s ease;
}

.location-banner h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-banner p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.95;
  line-height: 1.5;
}

.location-banner-buttons {
  display: flex;
  gap: 0.75rem;
}

.location-banner-buttons button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.location-banner-buttons .btn-allow {
  background: var(--white);
  color: var(--primary-color);
}

.location-banner-buttons .btn-allow:hover {
  background: var(--light-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.location-banner-buttons .btn-deny {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.location-banner-buttons .btn-deny:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


.article-image.loading {
  position: relative;
}

.article-image.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 2;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--secondary-color), #0a3d82);
  color: var(--white);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

.recent-visits {
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.recent-visits h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.table-container {
  overflow-x: auto;
}

.visits-table {
  width: 100%;
  border-collapse: collapse;
}

.visits-table th,
.visits-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.visits-table th {
  background-color: var(--light-bg);
  font-weight: 600;
  color: var(--text-color);
}

.visits-table tr:hover {
  background-color: #fafafa;
}

.visit-row {
  cursor: pointer;
}

.visit-row:hover {
  background-color: rgba(196, 30, 58, 0.05) !important;
}

.visits-table code {
  background-color: #f0f0f0;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.article-title-cell {
  max-width: 300px;
}

.user-agent-cell {
  max-width: 200px;
  word-break: break-word;
}

.coordinates {
  color: #666;
  font-weight: 400;
}

.unknown {
  color: #999;
  font-style: italic;
}


.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: var(--white);
  padding: 2.5rem 0;
  text-align: center;
  margin-top: 4rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 0.5rem 0;
}

.footer a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

.footer a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}


@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    justify-content: center;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-header h2 {
    font-size: 2rem;
  }

  .location-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .stat-number {
    font-size: 2rem;
  }

  .visits-table {
    font-size: 0.85rem;
  }

  .visits-table th,
  .visits-table td {
    padding: 0.5rem;
  }
}
