:root {
  /* Colors */
  --primary-blue: #0066ff;
  --primary-green: #00c851;
  --primary-purple: #6f42c1;
  --hrdflix-red: #e50914;
  --rating-yellow: #fbbf24;
  --hero-purple: #667eea;
  
  /* Background */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-gray: #e9ecef;
  --bg-dark: #1a1a1a;
  
  /* Text */
  --text-dark: #212529;
  --text-gray: #6c757d;
  
  /* Borders & Shadows */
  --border-light: #dee2e6;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

*:focus,
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}

*:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-blue) !important;
  outline-offset: 2px;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  color: var(--text-dark);
  overflow-x: hidden;
}

.hrdflix-container {
  max-width: 100%;
  padding: 0;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%), url(../img/hrdflex/hrdflex1.jpg) center / cover no-repeat;
    overflow: hidden;
    margin-top: 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(77deg, rgba(0, 0, 0, 0.9) 0%, rgba(90, 90, 90, 0.5) 50%, transparent 100%),
              linear-gradient(180deg, transparent 60%, rgb(77, 77, 77) 100%);
  z-index: 1;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.6;
  mix-blend-mode: screen;
}

.hero-content {
  position: absolute;
  left: 4%;
  top: 35%;
  transform: translateY(-30%);
  z-index: 10;
  text-align: left;
  color: white;
  max-width: 45%;
  padding: 0;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  color: white;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  line-height: 1.6;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-btn,
.hrdflix-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.hero-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 50px;
  min-width: 200px;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.hero-btn:hover::before {
  left: 100%;
}

.hero-btn-primary {
  background: var(--hero-purple);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.hero-btn-primary:hover {
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.hrdflix-btn {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 4px;
}

.hrdflix-btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0052cc 100%);
  color: white;
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.hrdflix-btn-primary:hover {
  background: linear-gradient(135deg, #0052cc 0%, var(--primary-blue) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

.hrdflix-btn-secondary {
  background: rgba(109, 109, 110, 0.7);
  color: white;
  margin-left: 1rem;
}

.hrdflix-btn-secondary:hover {
  background: rgba(109, 109, 110, 0.5);
}

.category-nav {
  position: sticky;
  top: 60px;
  background: linear-gradient(180deg, var(--bg-white) 0%, rgba(248, 249, 250, 0.98) 100%);
  padding: 1rem 4%;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.category-list {
  display: flex;
  gap: 2rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  font-size: 0.95rem;
  color: var(--text-gray);
  cursor: pointer;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  white-space: nowrap;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.category-item:hover {
  color: var(--text-dark);
}

.category-item.active {
  color: var(--text-dark);
  border-bottom-color: var(--hrdflix-red);
}

.content-section {
  padding: 2rem 12%;
  position: relative;
  overflow: hidden;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

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

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
}

.see-all {
  color: var(--primary-blue);
  font-size: 0.9rem;
  transition: color 0.3s;
  text-decoration: none;
  font-weight: 500;
}

.see-all:hover {
  color: #0052cc;
}

.hrdflix-slider {
  position: relative;
  padding: 0.5rem 0;
  overflow: hidden;
}

.hrdflix-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 4px 20px var(--shadow-light),
    0 0 0 1px var(--border-light);
  height: 100%;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.hrdflix-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.02);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}

.hrdflix-card:hover {
  transform: scale(1.03) translateY(-8px);
  z-index: 10;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.hrdflix-card:hover::before {
  opacity: 1;
}

.hrdflix-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(
    180deg, 
    transparent 0%, 
    rgba(0, 0, 0, 0.3) 30%,
    rgba(0, 0, 0, 0.8) 70%,
    rgba(0, 0, 0, 0.95) 100%
  );
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease-in-out;
  z-index: 5;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 4.5rem;
  height: 4.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.play-icon {
  width: 1.8rem;
  height: 1.8rem;
  fill: var(--primary-blue);
  margin-left: 0.15rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hrdflix-card:hover .play-button,
.hrdflix-card-image:hover .play-button {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.hrdflix-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0f0f0f;
}

.hrdflix-card-image a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 15;
}

.hrdflix-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hrdflix-card:hover .hrdflix-card-img {
  transform: scale(1.1);
}

.hrdflix-card-content {
  padding: 1.25rem;
  background: linear-gradient(145deg, var(--bg-white) 0%, var(--bg-light) 100%);
  border-top: 1px solid var(--border-light);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ranking-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 5;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-rating,
.text-yellow-400,
.star-rating {
  color: var(--rating-yellow);
}

.card-rating {
  font-size: 0.875rem;
  font-weight: 500;
}

.text-yellow-400 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text-dark);
  text-shadow: none;
  letter-spacing: -0.02em;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-gray);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.card-badge {
  position: relative;
  overflow: hidden;
  padding: 0.35rem 0.8rem;
  background: var(--hero-purple);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.card-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.hrdflix-card:hover .card-badge::before {
  left: 100%;
  transition: left 0.6s ease;
}

.hrdflix-card {
  will-change: transform, box-shadow;
}

.hrdflix-card:focus {
  outline: 2px solid rgba(229, 9, 20, 0.6);
  outline-offset: 2px;
}

.hrdflix-card:focus:not(:focus-visible) {
  outline: none;
}

.hrdflix-card[aria-pressed="true"],
.hrdflix-card:active {
  transform: scale(1.01) translateY(-4px);
  transition: all 0.1s ease;
}

.hrdflix-card.loading,
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.swiper {
  overflow: hidden;
  padding: 0.8rem 0;
}

.swiper-slide {
  transition: transform 0.3s ease;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.9);
  width: 50px;
  height: 100%;
  margin-top: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
  opacity: 1;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 24px;
  font-weight: bold;
}

.swiper-button-prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.swiper-button-next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.ai-chat-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--hrdflix-red), #ff6b35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
  transition: var(--transition-base);
  z-index: 1000;
}

.ai-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.ai-chat-container {
  position: fixed;
  bottom: 100px;
  right: 2rem;
  width: 350px;
  height: 500px;
  background: var(--bg-dark);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 1001;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-header {
  padding: 1rem;
  background: linear-gradient(135deg, var(--hrdflix-red), #ff6b35);
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 1024px) {
  .section-title {
    font-size: 1.5rem;
  }

  .hero-content {
    max-width: 60%;
    left: 3%;
    top: 40%;
  }

  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .hero-description {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
  }

  .hero-buttons {
    flex-direction: row;
    align-items: flex-start;
  }

  .hero-btn {
    min-width: 180px;
  }

  .content-section {
    padding: 1.5rem 3%;
  }

  .ai-chat-container {
    width: 300px;
    height: 450px;
    right: 1rem;
  }

  .hrdflix-card {
    border-radius: 10px;
  }
  
  .hrdflix-card:hover {
    transform: scale(1.02) translateY(-4px);
  }
  
  .play-button {
    width: 4rem;
    height: 4rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    margin-top: 50px;
  }

  .category-nav{
    top: 53px;
  }

  .section-title {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  .hero-section {
    height: 80vh;
  }

  .hero-content {
    max-width: 80%;
    left: 4%;
    top: 45%;
    text-align: left;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    margin-bottom: 2rem;
  }

  .hero-buttons {
    gap: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    min-width: 200px;
  }

  .hrdflix-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .category-list {
    gap: 1rem;
  }
  
  .hrdflix-card {
    border-radius: 8px;
    width: 100%;
  }

  .hrdflix-card-image {
    display: block;
    visibility: visible;
    opacity: 1;
  }
  
  .hrdflix-card:hover {
    transform: scale(1.01) translateY(-2px);
  }
  
  .hrdflix-card-overlay {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }
  
  .card-subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .card-meta {
    margin-top: 0.5rem;
  }
  
  .card-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
  }
  
  .play-button {
    width: 3.5rem;
    height: 3.5rem;
  }
  
  .play-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .ranking-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    top: 0.75rem;
    left: 0.75rem;
  }
  
  .ai-chat-container {
    width: calc(100vw - 2rem);
    height: 400px;
    right: 1rem;
    left: 1rem;
    bottom: 80px;
  }
  
  .ai-chat-button {
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    margin-top: 40px;
  }

  .category-nav{
    top: 40px;
  }
  .section-title {
    font-size: 1.1rem;
    line-height: 1.2;
    padding-right: 10px;
  }

  .section-header {
    padding: 0 10px;
    margin-bottom: 1rem;
  }

  .hrdflix-content {
    padding: 1rem 0.5rem;
  }

  .content-section {
    margin-bottom: 2rem;
  }

  .swiper {
    padding: 0.5rem 0;
  }

  .hrdflix-card {
    width: 100%;
    min-width: 240px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .hrdflix-card-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 160px;
    background: #f0f0f0;
  }

  .hrdflix-card-img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hrdflix-card-content {
    padding: 0.8rem;
  }
  
  .card-title {
    font-size: 0.85rem;
  }
  
  .card-subtitle {
    font-size: 0.75rem;
  }
  
  .play-button {
    width: 3rem;
    height: 3rem;
  }
  
  .play-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

.animate-fadeIn {
  animation: fadeInUp 0.8s ease forwards;
}

.float-animation {
  animation: float 2s ease-in-out infinite;
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.star-rating .star {
  font-size: 0.875rem;
}

.star-rating .rating-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.25rem;
}