/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Spline Sans", "Noto Sans", sans-serif;
  background-color: #141118;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Accessibility styles */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #8E4FFF;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Layout styles */
.layout-container {
  display: flex;
  height: 100%;
  min-height: 100vh;
  flex-direction: column;
  flex-grow: 1;
}

.layout-content-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  border-bottom: 1px solid #2f2938;
  padding: 12px 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  color: white;
}

.logo {
  width: 32px;
  height: 32px;
}

.logo-text {
  color: white;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 32px;
}

.nav-link {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: white;
}

.nav-link.active {
  color: white;
  font-weight: 500;
}

/* Search styles */
.search-container {
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

.search-label {
  display: flex;
  flex-direction: column;
  min-width: 160px;
  height: 40px;
  max-width: 256px;
}

.search-input-group {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: stretch;
  border-radius: 8px;
  height: 100%;
}

.search-icon {
  color: #a89db8;
  display: flex;
  border: none;
  background-color: #2f2938;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  border-radius: 8px 0 0 8px;
  border-right: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  resize: none;
  overflow: hidden;
  border-radius: 0 8px 8px 0;
  color: white;
  outline: none;
  border: none;
  background-color: #2f2938;
  height: 100%;
  padding: 0 16px 0 8px;
  font-size: 16px;
  font-weight: normal;
  line-height: normal;
}

.search-input::placeholder {
  color: #a89db8;
}

/* Main content styles */
.main-content {
  padding: 0 40px;
  display: flex;
  flex: 1;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Page header styles */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-filter-text {
  color: #9ca3af;
  font-size: 14px;
}

.filter-button {
  color: #60a5fa;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
}

.filter-button:hover {
  color: #93c5fd;
}

.back-link {
  color: #60a5fa;
  text-decoration: none;
}

.back-link:hover {
  color: #93c5fd;
}

/* Date filter styles */
.date-filter {
  display: none;
  background-color: #2f2938;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.date-filter.show {
  display: block;
}

.date-filter-content {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.date-input-group {
  display: flex;
  flex-direction: column;
}

.date-label {
  color: #a89db8;
  font-size: 12px;
  margin-bottom: 4px;
}

.date-input {
  background-color: #1f1b2e;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #4b5563;
  outline: none;
}

.date-input:focus {
  border-color: #60a5fa;
}

.date-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #4b5563;
  color: white;
}

.btn-secondary:hover {
  background-color: #374151;
}

/* Language filter styles */
.language-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-select {
  background-color: #2f2938;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #4b5563;
  outline: none;
  font-size: 14px;
}

.language-select:focus {
  border-color: #60a5fa;
}

/* Clip grid styles */
.clip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .clip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .clip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .clip-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.no-clips {
  color: #9ca3af;
  text-align: center;
  padding: 32px 0;
}

/* Clip card styles */
.clip-card {
  background-color: #1f1b2e;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.clip-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.clip-thumbnail-container {
  position: relative;
  cursor: pointer;
}

.clip-thumbnail {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.clip-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.clip-thumbnail-container:hover .clip-overlay {
  opacity: 1;
}

.play-icon {
  width: 56px;
  height: 56px;
  color: white;
}

.clip-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.clip-views {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.clip-featured {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #eab308;
  color: black;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.clip-content {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: inherit;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clip-content:hover {
  background-color: #2a2438;
  transition: background-color 0.2s;
}

.clip-title {
  color: white;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.clip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #9ca3af;
}

.clip-broadcaster {
  color: #9ca3af;
}

.clip-time {
  color: #6b7280;
}

/* Pagination styles */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.pagination-info {
  color: #9ca3af;
  font-size: 14px;
}

.pagination-button {
  padding: 8px 16px;
  background-color: #2f2938;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.pagination-button:hover {
  background-color: #3a3447;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.close-modal:hover {
  color: #d1d5db;
}

.modal-content {
  display: flex;
  justify-content: center;
}

/* Utility classes */
.space-y-6 > * + * {
  margin-top: 24px;
}

.hidden {
  display: none;
}

/* Custom datetime-local input styling */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .clip-card {
    border: 2px solid #ffffff;
  }
  
  .nav-link {
    border-bottom: 2px solid transparent;
  }
  
  .nav-link:hover,
  .nav-link.active {
    border-bottom-color: #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .clip-card:hover {
    transform: none;
  }
  
  .clip-overlay {
    transition: none;
  }
}

/* Responsive styles */
@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    white-space: normal;
  }

  .header-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
  }

  .nav {
    margin-left: 0;
    gap: 16px;
  }

  .search-container {
    width: 100%;
  }
  
  .search-label {
    width: 100%;
    max-width: 100%;
  }

  .main-content {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .page-header-right {
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-title {
    font-size: 20px;
  }

  .date-filter-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px;
  }
  .main-content {
    padding: 12px;
  }
  .logo-text {
    display: none;
  }
}

:root {
  --primary-color: #6441a5;
  --secondary-color: #f0f0f0;
} 