/* ============================================
   NEO-BRUTALISM THEME
   Modern, clean, bold, professional but edgy
   ============================================ */

:root {
  /* Neo-Brutalist Colors */
  --primary: #FF6B35;        /* Bold orange */
  --secondary: #F7931E;      /* Bright yellow-orange */
  --accent: #00D9FF;         /* Cyan accent */
  --accent-alt: #FF3366;     /* Hot pink */
  --black: #000000;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-mid: #CCCCCC;
  --gray-dark: #1A1A1A;
  
  /* Semantic mappings */
  --bg-light: var(--white);
  --bg-dark: var(--gray-dark);
  --card-light: var(--white);
  --card-dark: #2A2A2A;
  --text-light: var(--black);
  --text-dark: var(--white);
  --border-light: var(--black);
  --border-dark: var(--white);
}

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

/* GLOBAL STYLES */
body {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 600;
  background: var(--white);
  color: var(--black);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

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

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Layout */
.main {
  max-width: 430px;
  margin: 6vh auto 0 auto;
  padding: 0 0.7em 2.8em 0.7em;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* TYPOGRAPHY */
h1 {
  font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
  font-size: 2.2em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--black);
  margin-top: 0;
  margin-bottom: 1em;
}

.dark h1 {
  color: var(--white);
}

.movie-title {
  font-family: 'Arial Black', sans-serif;
  font-weight: 900;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: 1.19em;
  margin-bottom: 0.08em;
  text-align: center;
  display: inline;
}

.dark .movie-title {
  color: var(--white);
}

/* CARDS */
.card {
  width: 100%;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--black);
  padding: 2.2em 2em 2em;
  margin-bottom: 2.6em;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--black);
}

.dark .card {
  background: var(--card-dark);
  border-color: var(--white);
  box-shadow: 6px 6px 0 var(--white);
  color: var(--white);
}

.dark .card:hover {
  box-shadow: 8px 8px 0 var(--white);
}

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

.fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

/* BUTTONS */
.upload-label,
#tryAnother,
.action-btn,
.filter-action-btn {
  background: var(--primary);
  color: var(--white);
  border: 3px solid var(--black);
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.9em 1.8em;
  box-shadow: 4px 4px 0 var(--black);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
  display: inline-block;
  text-align: center;
  margin-bottom: 2em;
}

.upload-label:hover,
#tryAnother:hover,
.action-btn:hover,
.filter-action-btn:hover {
  background: var(--secondary);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--black);
}

.upload-label:active,
#tryAnother:active,
.action-btn:active,
.filter-action-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--black);
}

.dark .upload-label,
.dark #tryAnother,
.dark .action-btn,
.dark .filter-action-btn {
  border-color: var(--white);
  box-shadow: 4px 4px 0 var(--white);
}

.dark .upload-label:hover,
.dark #tryAnother:hover,
.dark .action-btn:hover,
.dark .filter-action-btn:hover {
  box-shadow: 2px 2px 0 var(--white);
}

.action-btn.secondary {
  background: var(--white);
  color: var(--black);
  border: 3px solid var(--black);
}

.action-btn.secondary:hover {
  background: var(--gray-light);
}

.dark .action-btn.secondary {
  background: var(--gray-dark);
  color: var(--white);
  border-color: var(--white);
}

.dark .action-btn.secondary:hover {
  background: var(--black);
}

/* File upload */
.file-upload input[type="file"] {
  display: none;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Progress bar */
.progress-bar {
  width: 100%;
  background: var(--gray-light);
  border: 3px solid var(--black);
  border-radius: 4px;
  height: 12px;
  overflow: hidden;
  margin: 1em 0;
  display: none;
}

.dark .progress-bar {
  background: var(--gray-dark);
  border-color: var(--white);
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Error states */
.error-state,
.warning-state,
.success-state,
.info-state {
  padding: 1em 1.5em;
  border: 3px solid var(--black);
  border-radius: 4px;
  margin: 1em 0;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.3s ease-out;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--black);
}

.error-state {
  background: var(--accent-alt);
  color: var(--white);
}

.warning-state {
  background: var(--secondary);
  color: var(--black);
}

.success-state {
  background: #10B981;
  color: var(--white);
}

.info-state {
  background: var(--accent);
  color: var(--black);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3em 2em;
  color: var(--black);
}

.dark .empty-state {
  color: var(--white);
}

.empty-state-icon {
  font-size: 3em;
  margin-bottom: 0.5em;
  opacity: 0.6;
}

.empty-state h3 {
  margin: 0.5em 0;
  font-size: 1.2em;
  font-weight: 900;
  color: var(--primary);
}

.empty-state p {
  margin: 0.5em 0 1.5em 0;
  line-height: 1.5;
  font-size: 0.95em;
}

.empty-state-steps {
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
}

.empty-state-steps ol {
  padding-left: 1.2em;
}

.empty-state-steps li {
  margin: 0.5em 0;
  line-height: 1.4;
}

.empty-state a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.empty-state a:hover {
  text-decoration: none;
}

/* MOVIE POSTER */
.movie-poster {
  width: 220px;
  min-width: 160px;
  max-width: 99%;
  border: 4px solid var(--black);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--black);
  background: #ebedf2;
  object-fit: cover;
  margin: 0 auto 1.3em auto;
  display: block;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.movie-poster:hover {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--black);
}

.dark .movie-poster {
  background: #23243a;
  border-color: var(--white);
  box-shadow: 8px 8px 0 var(--white);
}

.dark .movie-poster:hover {
  box-shadow: 11px 11px 0 var(--white);
}

.movie-poster.loading {
  opacity: 0.7;
}

/* Movie details */
.movie-title-row {
  display: flex;
  flex-direction: row;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.19em;
}

.type-badge {
  display: inline-block;
  font-size: 0.85em;
  font-weight: 900;
  background: var(--accent);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 4px;
  padding: 0.3em 1em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0.27em 0 0.16em 0;
  vertical-align: middle;
  box-shadow: 2px 2px 0 var(--black);
}

.movie-year {
  font-size: 0.99em;
  color: #6b7280;
  margin-bottom: 0.2em;
  text-align: center;
}

.genre-badges {
  margin: 5px 0 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.genre-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--black);
  font-size: 0.94em;
  font-weight: 700;
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 0.3em 0.8em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--black);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.genre-badge:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--black);
}

.ratings-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0 4px 0;
}

.rating-chip {
  display: inline-block;
  font-size: 0.97em;
  border: 3px solid var(--black);
  border-radius: 4px;
  padding: 0.3em 1em;
  background: var(--primary);
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.2s;
}

.rating-chip:hover {
  transform: translateY(-2px);
}

.rating-chip.rating-good {
  background: #10B981;
  color: var(--white);
}

.rating-chip.rating-average {
  background: var(--secondary);
  color: var(--black);
}

.rating-chip.rating-poor {
  background: var(--accent-alt);
  color: var(--white);
}

.movie-meta {
  width: 100%;
  text-align: center;
  margin: 0.1em 0 0.62em 0;
}

.director-block {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 9px;
}

.director-block img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--black);
  background: #eaeefa;
  transition: opacity 0.3s, transform 0.3s;
}

.director-block img:hover {
  transform: scale(1.1);
}

.director-block img.loading {
  opacity: 0.5;
}

.cast-gallery {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
}

.cast-gallery-member {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 74px;
  min-width: 74px;
}

.cast-gallery-member img,
.cast-gallery-member .empty-cast-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--black);
  background: #fafbfc;
  display: block;
  margin-bottom: 0.25em;
  transition: opacity 0.3s, transform 0.3s;
}

.cast-gallery-member img:hover {
  transform: scale(1.1);
}

.cast-gallery-member img.loading {
  opacity: 0.5;
}

.cast-gallery-member .cast-name {
  width: 100%;
  font-size: 0.93em;
  text-align: center;
  white-space: normal;
  line-height: 1.13;
  min-height: 2.3em;
  margin: 0;
}

.movie-desc {
  color: #4f5081;
  font-size: 1.01em;
  text-align: center;
  letter-spacing: 0.013em;
  line-height: 1.56;
  margin: 0.58em 0 1.09em 0;
  min-height: 2.09em;
}

.dark .movie-desc {
  color: #b2bed4;
}

.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.2em 0 0.8em 0;
}

.action-btn {
  padding: 0.6em 1.2em;
  font-size: 0.9em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-links {
  display: flex;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.6em;
  margin-bottom: 0.7em;
}

.platform-links a {
  background: var(--secondary);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.99em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.34em 1.05em 0.38em 1.05em;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.1s, box-shadow 0.1s;
}

.platform-links a:hover,
.platform-links a:focus {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--black);
  outline: none;
}

.dark .platform-links a {
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}

.dark .platform-links a:hover {
  box-shadow: 2px 2px 0 var(--white);
}

.trailer {
  margin: 1.2em auto 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

.trailer iframe {
  width: 100%;
  min-width: 250px;
  max-width: 370px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  border: 3px solid var(--black);
  background: #000;
  min-height: 150px;
  margin-bottom: 0;
}

#tryAnother {
  margin: 0.5em auto 0 auto;
  font-size: 1.06em;
  padding: 0.97em 2.2em;
}

#result {
  min-height: 1.4em;
  margin-bottom: 0.8em;
  text-align: center;
}

.stremio-btn {
  margin: 1.3em auto 0 auto;
  background: var(--white);
  color: var(--black);
  border: 3px solid var(--black);
  border-radius: 4px;
  font-size: 0.99em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.49em 1.13em 0.48em 1.13em;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.1s, box-shadow 0.1s;
  text-transform: uppercase;
}

.stremio-btn:hover,
.stremio-btn:focus {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--black);
  outline: none;
}

.stremio-btn img {
  width: 18px;
  height: 18px;
  margin-right: 3px;
}

.title-block {
  text-align: center;
  margin-bottom: 0.24em;
}

/* STATS */
.stats {
  width: 100%;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 1em 1.5em;
  margin-bottom: 1.5em;
  display: none;
  text-align: center;
  box-shadow: 6px 6px 0 var(--black);
}

.dark .stats {
  background: var(--card-dark);
  border-color: var(--white);
  box-shadow: 6px 6px 0 var(--white);
}

.stats.show {
  display: block;
  animation: fadeInUp 0.3s ease-out;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 1em;
}

.stat-item {
  min-width: 70px;
}

.stat-value {
  font-size: 2.5em;
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8em;
  color: var(--black);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3em;
}

.dark .stat-label {
  color: var(--white);
}

/* FILTERS */
.filters,
.history,
.favorites-section,
.watched-section {
  width: 100%;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 1.2em 1.5em;
  margin-bottom: 1.5em;
  display: none;
  box-shadow: 6px 6px 0 var(--black);
}

.dark .filters,
.dark .history,
.dark .favorites-section,
.dark .watched-section {
  background: var(--card-dark);
  border-color: var(--white);
  box-shadow: 6px 6px 0 var(--white);
}

.filters.show,
.history.show,
.favorites-section.show,
.watched-section.show {
  display: block;
  animation: fadeInUp 0.3s ease-out;
}

.filters h3,
.history h3,
.favorites-section h3,
.watched-section h3 {
  margin: 0 0 1em 0;
  font-size: 1em;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-actions {
  display: flex;
  gap: 0.5em;
}

.section-actions button {
  background: var(--secondary);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.3em 0.7em;
  box-shadow: 2px 2px 0 var(--black);
  transition: transform 0.1s, box-shadow 0.1s;
}

.section-actions button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--black);
}

.dark .section-actions button {
  border-color: var(--white);
  box-shadow: 2px 2px 0 var(--white);
}

.dark .section-actions button:hover {
  box-shadow: 1px 1px 0 var(--white);
}

.filter-group {
  margin-bottom: 1em;
}

.filter-group:last-child {
  margin-bottom: 0.5em;
}

.filter-group label {
  display: block;
  margin-bottom: 0.4em;
  font-size: 0.9em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--black);
}

.dark .filter-group label {
  color: var(--white);
}

.filter-group select {
  width: 100%;
  padding: 0.7em;
  border: 3px solid var(--black);
  border-radius: 4px;
  background: var(--white);
  color: var(--black);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--black);
  transition: box-shadow 0.2s;
}

.filter-group select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary);
}

.dark .filter-group select {
  background: var(--gray-dark);
  color: var(--white);
  border-color: var(--white);
  box-shadow: 2px 2px 0 var(--white);
}

.filter-action-btn {
  padding: 0.5em 1em;
  font-size: 0.85em;
  margin: 0.5em 0 0 0;
  width: 100%;
}

/* History/Favorites/Watched */
.history-list,
.favorites-grid,
.watched-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.favorites-grid,
.watched-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1em;
}

.favorite-item,
.watched-item {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--black);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.2s, box-shadow 0.2s;
}

.favorite-item:hover,
.watched-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}

.dark .favorite-item,
.dark .watched-item {
  background: var(--gray-dark);
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}

.dark .favorite-item:hover,
.dark .watched-item:hover {
  box-shadow: 5px 5px 0 var(--white);
}

.favorite-item img,
.watched-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.favorite-item-title,
.watched-item-title {
  padding: 0.5em;
  font-size: 0.85em;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-item-remove,
.watched-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid var(--white);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.2s;
}

.favorite-item:hover .favorite-item-remove,
.watched-item:hover .watched-item-remove {
  opacity: 1;
}

.favorite-item-remove:hover,
.watched-item-remove:hover {
  background: var(--accent-alt);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.8em;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.history-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}

.dark .history-item {
  background: var(--gray-dark);
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}

.dark .history-item:hover {
  box-shadow: 5px 5px 0 var(--white);
}

.history-poster {
  width: 40px;
  height: 60px;
  border-radius: 4px;
  border: 2px solid var(--black);
  object-fit: cover;
  background: #ebedf2;
}

.dark .history-poster {
  background: #23243a;
  border-color: var(--white);
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-weight: 700;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 0.8em;
  color: #6b7280;
  margin-top: 0.2em;
}

.dark .history-meta {
  color: #9ca3af;
}

.history-indicators {
  display: flex;
  gap: 4px;
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.9em;
}

/* Shortcuts hint */
.shortcuts-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: 8px;
  padding: 0.8em 1em;
  font-size: 0.85em;
  color: var(--black);
  box-shadow: 6px 6px 0 var(--black);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
  max-height: 80vh;
  overflow-y: auto;
}

.dark .shortcuts-hint {
  background: var(--card-dark);
  border-color: var(--white);
  color: var(--white);
  box-shadow: 6px 6px 0 var(--white);
}

.shortcuts-hint.show {
  opacity: 1;
  transform: translateY(0);
}

.shortcuts-hint kbd {
  background: var(--gray-light);
  border: 2px solid var(--black);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.8em;
  font-family: monospace;
  font-weight: 700;
}

.dark .shortcuts-hint kbd {
  background: var(--gray-dark);
  border-color: var(--white);
}

/* Theme toggle */
#darkSwitch {
  position: fixed;
  right: 28px;
  top: 24px;
  z-index: 20;
  font-size: 2em;
  background: var(--primary);
  border: 3px solid var(--black);
  border-radius: 50%;
  padding: 0.3em;
  box-shadow: 3px 3px 0 var(--black);
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

#darkSwitch:hover {
  transform: translate(-2px, -2px) scale(1.1);
  box-shadow: 5px 5px 0 var(--black);
}

#darkSwitch:active {
  transform: scale(0.95);
}

#darkSwitch:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.dark #darkSwitch {
  background: var(--secondary);
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}

.dark #darkSwitch:hover {
  box-shadow: 5px 5px 0 var(--white);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--black);
  color: var(--white);
  border: 3px solid var(--primary);
  border-radius: 4px;
  padding: 1em 1.5em;
  box-shadow: 4px 4px 0 var(--primary);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90%;
  text-align: center;
  font-weight: 700;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Swipe indicators */
.swipe-indicator {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2em;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 50;
}

.swipe-indicator.left {
  left: 20px;
}

.swipe-indicator.right {
  right: 20px;
}

.swipe-indicator.show {
  opacity: 0.5;
}

/* GEOMETRIC DECORATIONS */
.main::before {
  content: '';
  position: fixed;
  top: 100px;
  right: 50px;
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid var(--accent);
  opacity: 0.3;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

.main::after {
  content: '';
  position: fixed;
  bottom: 150px;
  left: 30px;
  width: 80px;
  height: 80px;
  background: var(--secondary);
  border: 3px solid var(--black);
  border-radius: 50%;
  opacity: 0.3;
  z-index: -1;
  animation: float 8s ease-in-out infinite reverse;
}

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

.dark .main::after {
  border-color: var(--white);
}

/* Responsive design */
@media (max-width: 500px) {
  .main {
    padding: 0 0.2em;
    margin-top: 4vh;
  }
  
  .card {
    padding: 1.4em 0.4em 1.5em;
  }
  
  .trailer iframe {
    max-width: 100%;
  }
  
  .shortcuts-hint {
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
  }
  
  .filters,
  .stats,
  .history,
  .favorites-section,
  .watched-section {
    padding: 1em;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main::before,
  .main::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}