* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f2ef; /* LinkedIn background color */
    color: #333;
    line-height: 1.6;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    text-align: center;
    margin: 0;
    font-size: 1.5rem;
}

.notification {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 0.5rem auto;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notification button {
    background: white;
    color: #e74c3c;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.notification button:hover {
    background: #ecf0f1;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.controls {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#feed-url {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #2980b9;
}

.feeds {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feed {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #fafafa;
}

.feed h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.article {
    border-left: 3px solid #3498db;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 4px;
    transition: background 0.2s;
}

.article:hover {
    background: #f0f8ff;
}

.article.new {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.article h4 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
}

.article h4 a {
    color: #3498db;
    text-decoration: none;
}

.article h4 a:hover {
    text-decoration: underline;
}

.article .meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.article .description {
    color: #555;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

#last-updated {
    margin-left: auto;
    font-size: 0.875rem;
    color: #666;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    #feed-url {
        width: 100%;
    }

    .notification {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ========================= */
/* 📱 CENTRAGE TEXTE EXPLICATIF */
/* ========================= */

/* Centrage du texte explicatif sur mobile et tablette */
@media (max-width: 768px) {
  .filter-description {
    text-align: center !important;
    justify-content: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .filter-description span {
    text-align: center;
    width: 100%;
  }
  
  /* Icône centrée */
  .filter-description .material-symbols-outlined {
    margin: 0 auto;
  }
}

/* Tablette */
@media (min-width: 769px) and (max-width: 1024px) {
  .filter-description {
    text-align: center !important;
    justify-content: center !important;
  }
}

/* Très petits écrans mobiles (≤ 400px) */
@media (max-width: 400px) {
  .filter-description {
    text-align: center !important;
    justify-content: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
  }
  
  .filter-description span {
    text-align: center;
    width: 100%;
    font-size: 13px;
    line-height: 1.4;
  }
  
  .filter-description .material-symbols-outlined {
    margin: 0 auto;
    font-size: 18px;
  }
}

/* ========================= */
/* 🎨 ULTRA-MODERN ARTICLE CARDS 2024 */
/* ========================= */

/* Card Container with Gradient Border Effect */
.article-card-modern {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.article-card-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, transparent 0%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.article-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04),
              0 0 0 1px rgba(26, 115, 232, 0.1);
}

.article-card-modern:hover::before {
  background: linear-gradient(135deg, #1a73e8 0%, #fbbf24 50%, #dc2626 100%);
  opacity: 1;
}

/* Inner Card Content */
.article-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 14px;
  margin: 2px;
}

/* Image Container with Overlay */
.article-image-container {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.article-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card-modern:hover .article-image-container img {
  transform: scale(1.08);
}

/* Image Overlay on Hover */
.article-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-modern:hover .article-image-overlay {
  opacity: 1;
}

.article-image-overlay .material-symbols-outlined {
  color: white;
  font-size: 28px;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-card-modern:hover .article-image-overlay .material-symbols-outlined {
  transform: scale(1);
}

/* Content Container */
.article-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

/* Title with Gradient Hover Effect */
.article-title-modern {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.article-card-modern:hover .article-title-modern {
  color: #1a73e8;
}

/* Meta Information */
.article-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Source Badge */
.article-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 20px;
  width: fit-content;
  transition: all 0.3s ease;
}

.article-card-modern:hover .article-source-badge {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  transform: translateX(4px);
}

.article-source-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-source-icon .material-symbols-outlined {
  font-size: 10px;
  color: white;
}

.article-source-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  letter-spacing: 0.02em;
}

/* Date Container */
.article-date-container {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.article-date-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-date-icon .material-symbols-outlined {
  font-size: 8px;
  color: white;
}

.article-date-text {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

/* Read Button with Animated Arrow */
.article-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
  position: relative;
  overflow: hidden;
}

.article-read-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.article-read-btn:hover::before {
  opacity: 1;
}

.article-read-btn .arrow-icon {
  transition: transform 0.3s ease;
}

.article-read-btn:hover .arrow-icon {
  transform: translateX(4px);
}

/* Animation for Card Entry */
@keyframes card-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card-modern {
  animation: card-slide-up 0.5s ease-out both;
}

/* Stagger animation for multiple cards */
.article-card-modern:nth-child(1) { animation-delay: 0.05s; }
.article-card-modern:nth-child(2) { animation-delay: 0.10s; }
.article-card-modern:nth-child(3) { animation-delay: 0.15s; }
.article-card-modern:nth-child(4) { animation-delay: 0.20s; }
.article-card-modern:nth-child(5) { animation-delay: 0.25s; }
.article-card-modern:nth-child(6) { animation-delay: 0.30s; }
.article-card-modern:nth-child(7) { animation-delay: 0.35s; }
.article-card-modern:nth-child(8) { animation-delay: 0.40s; }
.article-card-modern:nth-child(9) { animation-delay: 0.45s; }
.article-card-modern:nth-child(10) { animation-delay: 0.50s; }

/* Ripple Effect on Click */
.article-card-modern .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Shimmer Loading Effect */
.article-card-skeleton {
  position: relative;
  background: #f3f4f6;
  border-radius: 16px;
  overflow: hidden;
}

.article-card-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.8) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .article-card-inner {
    flex-direction: column;
    gap: 12px;
  }
  
  .article-image-container {
    width: 100%;
    height: 160px;
  }
  
  .article-title-modern {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 480px) {
  .article-card-modern {
    border-radius: 12px;
  }
  
  .article-card-inner {
    padding: 12px;
    border-radius: 10px;
    margin: 1px;
  }
  
  .article-image-container {
    height: 140px;
    border-radius: 8px;
  }
  
  .article-title-modern {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
  
  .article-read-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .article-card-modern {
    background: #1f2937;
  }
  
  .article-card-inner {
    background: #1f2937;
  }
  
  .article-title-modern {
    color: #f9fafb;
  }
  
  .article-card-modern:hover .article-title-modern {
    color: #60a5fa;
  }
  
  .article-source-badge {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  }
  
  .article-source-name {
    color: #93c5fd;
  }
}
