body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
  color: white;
  text-align: center;
}

/* Title */
h1 {
  margin-top: 20px;
}

/* Search */
.search-box {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(10px);
}

input {
  padding: 12px;
  width: 260px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: white;
  outline: none;
  transition: 0.3s;
}

input:focus {
  border-color: red;
  box-shadow: 0 0 10px rgba(255,0,0,0.3);
}

button {
  padding: 12px 18px;
  background: linear-gradient(45deg, red, #ff4d4d);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.3s;
  font-weight: bold;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,0,0,0.4);
}

button:active {
  transform: scale(0.95);
}

/* Player */
.player {
  width: 90%;
  max-width: 900px;
  margin: 20px auto;
}

video {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,0,0,0.3);
}

/* Results */
#results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
}

.video-card {
  margin: 12px;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  padding-bottom: 10px;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255,0,0,0.3);
}

.video-card img {
  width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  transition: 0.3s;
}

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

.loading {
  font-size: 18px;
  margin-top: 20px;
  color: #aaa;
}

.error {
  color: #ff4d4d;
  margin-top: 20px;
  font-weight: bold;
}

/* Credit */
.credit {
  margin-top: 30px;
  color: #aaa;
}

.pexels-credit {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.pexels-credit a {
  color: #aaa;
  text-decoration: none;
}

.pexels-credit a:hover {
  color: white;
}

.author {
  font-size: 12px;
  color: #ccc;
}

.author a {
  color: #fff;
  text-decoration: none;
}

/* 🌞 LIGHT MODE */
body.light {
  background: #ffffff;
  color: #000000;
}

body.light input {
  background: #f0f0f0;
  color: #000;
}

body.light .video-card {
  background: #ffffff;
  color: #000;
}

body.light button {
  background: #f0f0f0;
  color: #000;
  border: 1px solid #ccc;
}

/* Fix video shadow in light mode */
body.light video {
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Fix search box */
body.light .search-box {
  backdrop-filter: none;
}

/* Fix author text */
body.light .author {
  color: #555;
}

body.light .author a {
  color: #000;
}

/* Fix links */
body.light .pexels-credit a {
  color: #333;
}

/* Fix hover shadows */
body.light .video-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
  transition: background 0.3s, color 0.3s;
}

#themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
}

/* 🔲 SKELETON LOADING */
.skeleton-card {
  width: 200px;
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    #1a1a1a 25%,
    #2a2a2a 50%,
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
