
/* short_drama_video/frontend/css/style.css */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #8b5cf6;
  --dark-bg: #0f172a;
  --dark-bg-lighter: #1e293b;
  --gray-text: #94a3b8;
  --light-text: #e2e8f0;
}

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

body {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-lighter) 100%);
  color: var(--light-text);
  font-family: 'Source Sans Pro', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}

/* Button Styles */
.btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

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

/* Drama Card Animation */
.drama-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.drama-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.drama-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.drama-card:hover img {
  transform: scale(1.05);
}

.drama-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  transition: background 0.3s ease;
}

.drama-card:hover .drama-overlay {
  background: linear-gradient(0deg, rgba(79,70,229,0.8) 0%, rgba(0,0,0,0) 100%);
}

/* Badge Styles */
.badge {
  position: absolute;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 10;
}

.trending-badge {
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: white;
}

.history-badge {
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
}

.new-badge {
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

/* Play Page Styles */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  background-color: #000;
}

.video-container iframe, 
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Episode Styles */
.episode-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.75rem;
}

.episode-btn {
  background: rgba(30, 41, 59, 0.5);
  color: var(--light-text);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.episode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.episode-active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border-color: transparent;
}

/* Comment Styles */
.comment-card {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.comment-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.comment-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  color: var(--light-text);
  resize: none;
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Loading Animation */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .drama-card img {
    height: 200px;
  }
}

@media (max-width: 640px) {
  .drama-card img {
    height: 180px;
  }
  
  .episode-container {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}

/* Navigation Styles */
.nav-link {
  color: var(--gray-text);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
}

.nav-link:hover, 
.nav-link.active {
  color: var(--light-text);
}

.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* Search Bar Styles */
.search-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 0.25rem 0.5rem;
  width: 100%;
}

/* Header Banner Styles */
.header-absolute {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero-banner {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Micro-interactions */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category Navigation */
.category-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-pill {
  background: rgba(30, 41, 59, 0.5);
  color: var(--light-text);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-pill:hover, .category-active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

/* Back Button */
.back-btn {
  transition: all 0.3s ease;
}

.back-btn:hover {
  transform: translateX(-5px);
  color: var(--primary-light);
}

/* Logo Text */
.logo {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
