html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.25), 0 0 0 0.25rem #6366f1;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* 다크 테마 스타일 */
.navbar {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.navbar-brand, .nav-link {
  color: #e2e8f0 !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #60a5fa !important;
  transform: translateY(-1px);
}

.card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-header {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.8) 0%, rgba(71, 85, 105, 0.8) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 12px 12px 0 0;
}

.table {
  color: #e2e8f0;
  margin-bottom: 0;
}

.table-dark {
  background-color: transparent;
}

.table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: rgba(148, 163, 184, 0.15);
  padding: 1rem;
  vertical-align: middle;
}

.table > thead > tr > th {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.6) 0%, rgba(71, 85, 105, 0.6) 100%);
  color: #f1f5f9;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(99, 102, 241, 0.5);
  padding: 1rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(30, 41, 59, 0.4);
}

.table-hover > tbody > tr:hover > * {
  background-color: rgba(99, 102, 241, 0.15) !important;
  transition: background-color 0.2s ease;
}

.table-responsive {
  border-radius: 8px;
  overflow: hidden;
}

.form-control {
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  background-color: rgba(30, 41, 59, 0.9);
  border-color: #6366f1;
  color: #f1f5f9;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(71, 85, 105, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(71, 85, 105, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(14, 165, 233, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -1px rgba(16, 185, 129, 0.4);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.alert {
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(10px);
}

.alert-info {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #bae6fd;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

footer {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  backdrop-filter: blur(10px);
}

footer a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #60a5fa;
}

h2, h5 {
  color: #f1f5f9;
  font-weight: 600;
}

/* 테이블 썸네일 스타일 */
.video-thumbnail {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.4);
}

.table-thumbnail {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* 넷플릭스 스타일 비디오 리스트 뷰 */
#videoListContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.netflix-card-style {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(30, 30, 30, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.netflix-header {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.98) 0%, rgba(50, 50, 50, 0.98) 100%);
  border-bottom: 2px solid rgba(229, 9, 20, 0.8);
  padding: 1.5rem 1.25rem;
}

.netflix-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.netflix-list-header {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.98) 100%);
  border-bottom: 2px solid rgba(229, 9, 20, 0.8);
  padding: 1.5rem 1.25rem;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 160px 100px 100px 130px 1fr 180px 160px;
  gap: 1.5rem;
  align-items: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 기존 video-list-header를 사용하는 경우도 2배 크기 적용 */
.video-list-header {
  font-size: 1.4rem !important;
}

.netflix-list-item {
  background: rgba(20, 20, 20, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  margin-bottom: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  width: 100%;
  display: block;
}

.netflix-list-item:hover {
  background: rgba(40, 40, 40, 0.9);
  border-left: 4px solid #e50914;
  transform: translateX(4px);
}

.netflix-list-row {
  display: grid;
  grid-template-columns: 160px 100px 100px 130px 1fr 180px 160px;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.netflix-thumbnail {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.netflix-list-item:hover .netflix-thumbnail {
  transform: scale(1.05);
}

.netflix-title-text {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.netflix-meta {
  color: #b3b3b3;
  font-size: 0.9rem;
  font-weight: 500;
}

.video-count {
  color: #e50914;
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.netflix-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  color: #ffffff;
  text-decoration: none;
}

.netflix-icon-btn:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

.netflix-icon-btn.btn-primary {
  background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  border-color: #e50914;
}

.netflix-icon-btn.btn-primary:hover {
  background: linear-gradient(135deg, #f40612 0%, #c40815 100%);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.netflix-icon-btn.btn-info {
  background: linear-gradient(135deg, #0071eb 0%, #0051a5 100%);
  border-color: #0071eb;
}

.netflix-icon-btn.btn-info:hover {
  background: linear-gradient(135deg, #0080ff 0%, #0060c5 100%);
  box-shadow: 0 6px 20px rgba(0, 113, 235, 0.5);
}

.netflix-icon-btn.btn-success {
  background: linear-gradient(135deg, #46d369 0%, #2ea043 100%);
  border-color: #46d369;
}

.netflix-icon-btn.btn-success:hover {
  background: linear-gradient(135deg, #56e379 0%, #3eb053 100%);
  box-shadow: 0 6px 20px rgba(70, 211, 105, 0.5);
}

.netflix-table-responsive {
  background: rgba(20, 20, 20, 0.8);
  border-radius: 0 0 8px 8px;
}

.thumbnail-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-title {
  color: #f1f5f9;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  color: #cbd5e1;
  font-size: 0.875rem;
}

.video-count {
  color: #60a5fa;
  font-weight: 600;
}

/* 테이블 스크롤 */
.table-responsive {
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px;
}

/* 스크롤바 스타일링 */
.table-responsive::-webkit-scrollbar {
  width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* 입력 그룹 스타일 */
.input-group .form-control {
  border-radius: 8px 0 0 8px;
}

.input-group .btn {
  border-radius: 0 8px 8px 0;
}

.input-group-lg .form-control {
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
}

.input-group-text {
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

/* 넷플릭스 스타일 */
.netflix-container {
  padding: 0;
  background-color: #0f0f0f;
  min-height: 100vh;
}

.hero-section {
  position: relative;
  height: 70vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-content {
  padding: 3rem;
  max-width: 600px;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-description {
  font-size: 1.2rem;
  color: #e5e5e5;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.categories-container {
  padding: 2rem 3rem;
}

.category-row {
  margin-bottom: 3rem;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.category-carousel-container {
  position: relative;
  margin-bottom: 2rem;
}

.category-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.category-cards-container {
  display: flex;
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  padding: 1rem 0;
}

.carousel-nav-btn {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
  font-size: 1.5rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-nav-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-prev {
  left: -25px;
}

.carousel-next {
  right: -25px;
}

.netflix-card {
  flex: 0 0 300px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.netflix-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.netflix-card img {
  width: 100%;
  height: 169px; /* 16:9 비율 (300px * 9/16 = 168.75px) */
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.netflix-card:hover .card-overlay {
  opacity: 1;
}

.card-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #b3b3b3;
  font-size: 0.8rem;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: #e5e5e5;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-content.bg-dark {
  background-color: #1a1a1a !important;
  border: 1px solid #333;
}

.modal-header.border-secondary {
  border-bottom: 1px solid #444 !important;
}

.modal-body img {
  max-width: 100%;
  height: auto;
}
