/* VideoClips4Sale - Main Stylesheet */

:root {
  --primary: #FF6B6B;
  --primary-dark: #ee5a52;
  --secondary: #667eea;
  --success: #51cf66;
  --warning: #ffd43b;
  --danger: #ff6b6b;
  --dark: #212529;
  --light: #f8f9fa;
  --gray: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 12px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero .input-group {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
}

.hero input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 6px 0 0 6px;
}

.hero button {
  padding: 12px 24px;
  border-radius: 0 6px 6px 0;
  background: white;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* Grid */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f0f0f0;
  position: relative;
}

.card-body {
  flex: 1;
  padding: 20px;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.card-text {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-footer {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.card-body .fa {
  margin-right: 0.4rem;
}

/* Video Cards */
.video-card {
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.video-card .card-image {
  position: relative;
}

.video-thumbnail {
  position: relative;
  background-color: #f0f0f0;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.thumbnail-gallery {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Video Detail Pages */
.video-preview {
  aspect-ratio: 16/9;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-specs-section {
  border-left: 4px solid var(--primary);
}

.specs-table {
  width: 100%;
  font-size: 0.95rem;
}

.specs-table td {
  padding: 0.5rem 0;
  border: none;
  vertical-align: middle;
}

.specs-table tr:not(:last-child) {
  border-bottom: 1px solid #e9ecef;
}

.specs-table td:first-child {
  width: 40%;
  color: var(--gray);
  font-weight: 500;
  padding-right: 1.5rem;
}

.specs-table td:last-child {
  color: var(--dark);
}

.specs-card {
  border: none;
  box-shadow: var(--shadow);
}

.specs-card .card-header {
  border-bottom: none;
  font-weight: 600;
  padding: 1rem;
}

.specs-card .card-body {
  padding: 1rem;
}

/* Specs Page Layout */
.specs-group {
  margin-bottom: 2rem;
}

.specs-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.spec-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.spec-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
}

/* Compact Specs Grid for Sidebar */
.specs-grid-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.spec-item-compact {
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.spec-item-compact small {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.1rem;
  line-height: 1;
}

.spec-item-compact .fw-bold {
  font-size: 0.8rem;
  color: var(--dark);
  line-height: 1.2;
}

/* Frames Gallery */
.frames-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.frame-item {
  display: flex;
  flex-direction: column;
}

.frame-image {
  box-shadow: var(--shadow);
}

.frame-image:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Video Page Compact Styling */
.col-lg-8 h1 {
  margin-bottom: 0.5rem;
}

.col-lg-8 h5 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.col-lg-8 > div {
  margin-bottom: 1.5rem;
}

.col-lg-4 .card {
  margin-bottom: 1rem;
}

.card-body {
  padding: 1rem !important;
}

/* Video Preview Navigation */
#videoPreview {
  position: relative !important;
}

.video-nav-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 45px !important;
  height: 45px !important;
  border: none !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: white !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  z-index: 1000 !important;
  padding: 0 !important;
}

.video-nav-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.video-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.video-nav-prev {
  left: 15px;
}

.video-nav-next {
  right: 15px;
}

#currentFrame {
  font-weight: 600;
}

.price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
}

.duration-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Icons */
.fa, .fas, .far, .fab, .fal {
  margin-right: 0.4rem;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

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

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

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

.btn-secondary:hover {
  background: #5a66d8;
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

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

.btn-outline-secondary {
  border: 2px solid var(--gray);
  color: var(--gray);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--gray);
  color: white;
}

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.1rem;
}

.btn-block, .w-100 {
  width: 100%;
  display: block;
  text-align: center;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark);
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
}

/* Navbar */
.navbar {
  background: white;
  box-shadow: var(--shadow);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  gap: 30px;
  list-style: none;
  margin-left: auto;
  align-items: center;
}

.navbar-nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.navbar-nav a:hover {
  color: var(--primary);
}

.navbar-nav .fa {
  margin-right: 0.4rem;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 40px 20px;
  margin-top: 60px;
}

footer h5 {
  color: white;
  margin-bottom: 1rem;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
  color: white;
}

footer .text-white-50 {
  color: rgba(255, 255, 255, 0.5);
}

footer hr {
  border-color: rgba(255, 255, 255, 0.1);
}

footer .fa {
  margin-right: 0.4rem;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.table th {
  background: var(--light);
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.table .fa {
  margin-right: 0.5rem;
}

.table tbody tr:hover {
  background: var(--light);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: #333;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge .fa {
  margin-right: 0.3rem;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-color: #bee5eb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.alert .fa {
  margin-right: 0.5rem;
}

/* Progress Bar */
.progress {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.6s ease;
}

/* Dropdowns */
.dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--light);
  color: var(--primary);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--gray); }
.text-white { color: white; }
.text-dark { color: var(--dark); }
.text-decoration-none { text-decoration: none; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.px-2 { padding-left: 1rem; padding-right: 1rem; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.bg-light { background: var(--light); }
.bg-dark { background: var(--dark); color: white; }
.bg-white { background: white; }

.border { border: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-0 { border: none; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 12px; }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }

/* Lists */
.list-group {
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.list-group-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: white;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background: var(--light);
}

.list-group-item-action {
  cursor: pointer;
}

.list-group-item .fa {
  margin-right: 0.5rem;
}

/* Modals/Panels */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

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

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .navbar-nav {
    gap: 15px;
    margin-top: 1rem;
  }

  .hero input {
    border-radius: 6px;
  }

  .hero button {
    border-radius: 6px;
  }

  .table {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 15px;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.slide-up {
  animation: slideUp 0.3s ease;
}

/* Print styles */
@media print {
  .navbar, footer, .btn, .alert { display: none; }
  body { background: white; }
}
