/* 🎨 Modern Design CSS for JustPicked */

/* === 전역 변수 및 리셋 === */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #ec4899;
  --secondary-dark: #db2777;
  --accent-color: #10b981;
  --accent-dark: #059669;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
}

/* 기본 레이아웃 */
.modern-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* === 🔝 상단 구간: 히어로 섹션 === */
.hero-section {
  background: var(--bg-gradient);
  color: white;
  overflow: hidden;
}

/* 상-상: 정체성 히어로 */
.hero-identity {
  padding: 4rem 0 2rem;
  position: relative;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-graphic {
  position: relative;
  text-align: center;
  z-index: 2;
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.float-item {
  position: absolute;
  font-size: 2rem;
  animation: float 6s ease-in-out infinite;
  opacity: 0.7;
}

.float-item.item-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.float-item.item-2 {
  top: 30%;
  right: 15%;
  animation-delay: 1.5s;
}

.float-item.item-3 {
  bottom: 30%;
  left: 20%;
  animation-delay: 3s;
}

.float-item.item-4 {
  bottom: 20%;
  right: 10%;
  animation-delay: 4.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-text {
  position: relative;
  z-index: 3;
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.title-main {
  display: block;
  margin-bottom: 0.5rem;
}

.title-sub {
  display: block;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.btn-primary {
  background: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* 상-하: 트렌드 섹션 */
.trend-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .trend-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.trend-keywords, .news-headlines {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  backdrop-filter: blur(5px);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.section-title .icon {
  font-size: 1.25rem;
}

.keyword-list, .news-list {
  space-y: 0.75rem;
}

.keyword-item {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  margin: 0.25rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all 0.2s;
}

.keyword-item:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.keyword-item.hot {
  background: linear-gradient(45deg, #ef4444, #dc2626);
  animation: pulse 2s infinite;
}

.news-item {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  margin-bottom: 0.5rem;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.news-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.news-time {
  font-size: var(--font-size-xs);
  opacity: 0.7;
}

.refresh-btn, .more-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  transition: color 0.2s;
}

.refresh-btn:hover, .more-link:hover {
  color: white;
}

.refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
}

/* === 🎯 중단 구간: 오늘의 픽 === */
.daily-picks {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title-large {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

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

.picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.pick-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.pick-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pick-card.skeleton {
  cursor: default;
}

.pick-card.skeleton:hover {
  transform: none;
}

.pick-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.pick-content {
  padding: 1.25rem;
}

.pick-title {
  font-weight: 600;
  font-size: var(--font-size-base);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pick-category {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.pick-description {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.pick-actions {
  display: flex;
  gap: 0.5rem;
}

.pick-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.pick-btn.primary {
  background: var(--primary-color);
  color: white;
}

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

.pick-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.pick-btn.secondary:hover {
  background: var(--border-color);
}

.picks-actions {
  text-align: center;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.btn-more:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.picks-info {
  margin-top: 1rem;
}

.info-text {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* === 🔽 하단 구간: 푸터 === */
.modern-footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-info p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
}

.data-sources {
  margin-top: 0.25rem !important;
  font-size: var(--font-size-xs) !important;
  opacity: 0.6;
}

.last-update {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
}

/* === 모달 스타일 === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 1001;
  box-shadow: var(--shadow-xl);
}

.modal-large {
  max-width: 1200px;
  width: 95%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-filters {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-container input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
}

.filter-stats {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* === 스켈레톤 로딩 === */
.skeleton-keyword, .skeleton-news, .skeleton-img, .skeleton-text {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.skeleton-keyword {
  height: 2rem;
  width: 4rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 0.25rem;
}

.skeleton-news {
  height: 3rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}

.skeleton-img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 1rem;
  width: 80%;
  border-radius: var(--radius-sm);
  margin: 0.5rem auto;
}

@keyframes loading {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === 반응형 디자인 === */
@media (max-width: 768px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 300px;
  }
  
  .trend-grid {
    gap: 1rem;
  }
  
  .picks-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .modal-large {
    width: 98%;
    height: 95vh;
  }
}

/* === 헤더 개선 === */
.modern-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: white;
  box-shadow: var(--shadow-sm);
}

.nav-active {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}