:root {
  --bg-color: #121212;
  --text-color: #ffffff;
  --card-bg: rgba(30,30,30,0.85);
  --tmdb-color: #1da1f2;
  --imdb-color: #f1c40f;
  --tvdb-color: #4caf50;
  --badge-bg: rgba(42,42,42,0.8);
}

body.light {
  --bg-color: #f5f5f5;
  --text-color: #121212;
  --card-bg: rgba(255,255,255,0.85);
  --tmdb-color: #1da1f2;
  --imdb-color: #f1c40f;
  --tvdb-color: #4caf50;
  --badge-bg: rgba(224,224,224,0.8);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
  background-image: url("https://raw.githubusercontent.com/Murdervan/movie-id-finder/main/image/movie-ID-finder-logo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background-color: rgba(0,0,0,0.6);
  z-index: -1;
}

/* LATEST MOVIES SIDEBAR */
#latest-movies-box {
  position: fixed;
  top: 82px;
  left: 80px;
  width: 360px;
  max-height: 50vh;
  overflow-y: auto;
  background: rgba(20,20,20,0.95);
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  z-index: 9999;
}

#latest-movies-box h2 {
  margin-top: 0;
  font-size: 16px;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
}

.latest-movie-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.latest-movie-poster {
  width: 70px;
  border-radius: 6px;
  flex-shrink: 0;
}

.latest-movie-info {
  font-size: 12px;
  line-height: 1.4;
}

.latest-movie-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.latest-movie-meta {
  font-size: 11px;
  color: #aaa;
}

.latest-movie-rating {
  font-size: 11px;
  margin: 4px 0;
}

/* ID STYLING (TMDB + IMDb) */
.latest-movie-id {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

/* TMDB ID */
.tmdb-id {
  color: var(--tmdb-color); /* blå */
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

/* IMDb ID */
.imdb-id {
  color: #f5c518; /* IMDb gul */
  cursor: pointer;
  font-weight: 600;
  user-select: all;
}

.tmdb-id:hover,
.imdb-id:hover {
  text-shadow: 0 0 6px currentColor;
}

/* RELEASE DATE FARVER */
.release-date-red {
  color: #ff3b3b;
  font-weight: 600;
}

.release-date-neon {
  color: #39ff14;
  font-weight: 600;
  text-shadow: 0 0 6px #39ff14;
}

.latest-movie-info a {
  font-size: 11px;
  color: var(--tmdb-color);
  text-decoration: none;
}

.latest-movie-info a:hover {
  text-decoration: underline;
}

.release-info-box {
  position: fixed;
  top: 30px;
  left: 80px;

  display: flex;
  flex-direction: column;
  gap: 6px;

  font-size: 12px;
  color: #fff;

  background-color: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;

  padding: 6px 10px;
  line-height: 1.3;

  font-weight: 500;

  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);

  width: fit-content;
  max-width: 420px;

  z-index: 2147483646;
}

.release-info-box div {
  display: flex;
  align-items: center;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.color-dot.green {
  background: #39ff14;
  box-shadow: 0 0 6px #39ff14;
}

.color-dot.red {
  background: #ff3b3b;
  box-shadow: 0 0 6px #ff3b3b;
}

@media (max-width: 1200px) {
  #latest-movies-box {
    display: none;
  }
}

@media (max-width:768px){
  body { background-size: contain; background-position: center top; }
}

main { display:flex; flex-direction:column; align-items:center; padding:60px 20px 30px; flex:1; width:100%; box-sizing:border-box; }

.title-container { text-align:center; margin-bottom:8px; }
.title-container h1 { font-size:60px; font-weight:bold; margin:0; background:linear-gradient(90deg, var(--tmdb-color), var(--imdb-color)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; text-shadow:2px 2px 8px rgba(0,0,0,0.7); }
.subtitle { font-size:18px; color:#ccc; margin-top:2px; margin-bottom:0; }

.poster-wrap { width:100px; display:flex; flex-direction:column; align-items:center; text-align:center; flex-shrink:0; }
.poster-emoji { font-size:35px; margin-top:12px; line-height:1; }
.poster-type { font-size:18px; opacity:0.75; margin-top:12px; line-height:1; white-space:normal; text-align:center; color:white; text-shadow:5px 5px 10px black; }

.feedback-btn { position:fixed; bottom:56px; left:16px; display:flex; align-items:center; gap:6px; font-size:13px; color:#fff; background-color:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2); border-radius:6px; padding:6px 10px; line-height:1.3; font-weight:500; box-shadow:0 2px 6px rgba(0,0,0,0.25); backdrop-filter:blur(6px); z-index:2147483647; }
.feedback-btn:hover { background-color: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); transform: translateY(-1px); }

.github-icon { width:16px; height:16px; opacity:0.85; }
.star-note { display:inline-flex; align-items:center; gap:6px; margin:4px 0; font-size:11px; color:#fff; font-weight:500; background-color:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2); border-radius:999px; padding:6px 10px; box-shadow:0 2px 6px rgba(0,0,0,0.2); backdrop-filter:blur(6px); width:fit-content; max-width:420px; }
.star-note .github-link { color: var(--tmdb-color); font-weight:800; text-decoration:none; }

/* Warning box */
#warning-btn {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:500;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color:#ff4d4d;
  background-color:rgba(0,0,0,0.6);
  border-radius:6px;
  padding:6px 10px;
  box-shadow:0 2px 6px rgba(0,0,0,0.25);
  backdrop-filter:blur(6px);
  position:fixed;
  bottom:16px;
  left:16px;
  max-width:300px;
  line-height:1;
  z-index:2147483647;
}


input { width:100%; max-width:500px; padding:12px 15px; font-size:16px; border-radius:8px; border:none; margin-bottom:20px; background-color:var(--card-bg); color:var(--text-color); }
input:focus { outline:2px solid var(--tmdb-color); }

#results { width:100%; max-width:800px; display:flex; flex-direction:column; gap:20px; }

.movie { display:flex; gap:20px; align-items:flex-start; background-color:var(--card-bg); padding:15px; border-radius:12px; transition:transform 0.2s, box-shadow 0.2s; }
.movie:hover { transform:translateY(-2px); box-shadow:0 4px 15px rgba(0,0,0,0.4); }
.movie img { width:100px; border-radius:8px; flex-shrink:0; }
.movie-info { display:flex; flex-direction:column; gap:8px; flex-grow:1; }
.movie-info b { font-size:20px; color:var(--tmdb-color); }
.movie-info p { font-size:14px; color:#ccc; margin:4px 0; }

.badges { display:flex; gap:6px; flex-wrap:wrap; }
.badge { background-color: var(--badge-bg); padding:2px 6px; border-radius:6px; font-size:12px; color:var(--text-color); }

.id-box { display:flex; justify-content:space-between; align-items:center; background-color: var(--badge-bg); padding:8px 12px; border-radius:8px; font-size:14px; gap:10px; border:2px solid transparent; }
.id-box a { color:var(--text-color); text-decoration:none; font-weight:bold; }
.tmdb { border-color:var(--tmdb-color); }
.imdb { border-color:var(--imdb-color); }
.tvdb { border-color:var(--tvdb-color); }

.open-btn { background-color:var(--tvdb-color); border:none; border-radius:4px; color:#fff; padding:2px 6px; font-size:12px; cursor:pointer; text-decoration:none; transition:background-color 0.2s; }
.open-btn:hover { background-color:#3e8e41; }

.copy-btn { background-color: var(--tmdb-color); border:none; border-radius:4px; color:#fff; padding:2px 6px; font-size:12px; cursor:pointer; transition:background-color 0.2s; }
.copy-btn:hover { background-color:#0d8ddb; }
.copy-btn.copied { background-color:#2ecc71 !important; }

footer { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background-color: var(--card-bg); padding:15px 0; border-top:2px solid #333; }
footer p { margin:0; color:var(--text-color); font-size:14px; text-align:center; font-weight:bold; }
footer a { margin:0; color:var(--tmdb-color); font-size:14px; text-decoration:none; font-weight:bold; }
footer a:hover { text-decoration:underline; color:#0d8ddb; }
/* Go to Top Button */
#topBtn { display:none; position:fixed; bottom:50px; right:20px; z-index:99; font-size:18px; border:none; outline:none; background-color:var(--tmdb-color); color:white; cursor:pointer; padding:10px 15px; border-radius:50%; box-shadow:0 2px 6px rgba(0,0,0,0.5); transition:background-color 0.3s; }
#topBtn:hover { background-color:#0d8ddb; }
