/* --- VARIABLES & RESET --- */
:root {
  --bg-color: #1a1a1a;       /* Dark Grey Background */
  --card-bg: #252525;        /* Slightly lighter for cards */
  --text-main: #e0e0e0;      /* Off-white text */
  --accent-blue: #3b007bd5;    /* Bright Electric Blue */
  --accent-hover: #2e005fd5;   /* Darker Blue for hover */
  --nav-bg: #333333;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* --- NAVBAR (Updated to avoid conflict with movie lists) --- */
.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--nav-bg);
  border-bottom: 2px solid var(--accent-blue); /* Blue accent border */
}

.navbar li {
  float: left;
}

.navbar li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.navbar li a:hover {
  background-color: #111111;
  border-bottom: 2px solid var(--accent-blue); /* subtle lift effect */
}

/* --- NAVBAR ACTIVE STATE --- */
.navbar li a.active {
  background-color: #111111;
  border-bottom: 2px solid var(--accent-blue);
  color: white;
}

/* --- FORMS (Login & Register) --- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh; /* Full screen height minus padding */
}

form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border-top: 3px solid var(--accent-blue); /* Blue accent top */
  width: 300px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #bbb;
}

input[type="text"], 
input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  background-color: #333;
  border: 1px solid #444;
  border-radius: 4px;
  color: white;
  box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-blue); /* Blue glow on focus */
}

input[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: var(--accent-hover);
}

.error {
  color: #ff6b6b;
  margin-bottom: 15px;
  text-align: center;
  font-size: 0.9em;
}

/* --- MOVIE LIST STYLES (Formerly internal CSS) --- */
.content {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
  color: var(--accent-blue);
}

/* Search Bar */
.search-bar {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}
.search-bar input[type="text"] {
  margin-bottom: 0; /* Override generic form style */
}

/* --- SEARCH BAR OVERRIDES --- */
/* This removes the "Login Card" look from the search bar */
form.search-bar {
  padding: 0;               /* Remove the big 40px padding */
  background-color: transparent; /* Remove the grey background box */
  box-shadow: none;         /* Remove the shadow */
  border: none;             /* Remove the blue top border */
  width: 100%;              /* Allow it to stretch across the page */
  max-width: 100%;          /* Override the 300px limit */
  display: flex;            /* Keep the inputs in a row */
  gap: 10px;                /* Space between input and button */
  align-items: center;
}

/* Make the search text box grow to fill space */
form.search-bar input[type="text"] {
  flex-grow: 1;
  margin-bottom: 0;
}

/* --- FILE TREE (UNIFIED) --- */
.file-tree {
  list-style-type: none;
  padding-left: 0;
}

.file-tree li {
  padding: 8px 0;
  border-bottom: 1px solid #333;
}

/* 1. Folders (Series) */
.series {
  cursor: pointer;
  font-weight: bold;
  color: var(--text-main); /* Default: Off-White */
  transition: color 0.2s;
}

.series:hover {
  color: var(--accent-blue); /* Hover: Blue */
}

.series:before {
  content: "▶";
  color: var(--accent-blue);
  margin-right: 8px;
  font-size: 0.8em;
  display: inline-block;
  transition: transform 0.2s;
}

.series.open:before {
  transform: rotate(90deg);
}

/* 2. Files (Movies) */
.file-tree a {
  color: var(--text-main); /* Default: Off-White (Matches Folders) */
  text-decoration: none;
  display: inline-block; /* Required for transform */
  transition: all 0.2s ease;
}

.file-tree a:hover {
  color: var(--accent-blue); /* Hover: Blue */
  transform: translateX(5px); /* Slide effect (Animation) */
}

/* 3. Sub-lists (Nested items) */
.sub-list {
  display: none;
  padding-left: 20px;
  margin-top: 5px;
  border-left: 1px solid #444;
}

.sub-list li {
  border-bottom: none;
}

/* --- FLOATING BUTTON (Register) --- */
.register-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  background-color: var(--accent-blue);
  color: white;
  border-radius: 50px; /* Pill shape */
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.register-btn:hover {
  background-color: var(--accent-hover);
  color: white; 
}

/* --- REGISTRATION SPECIFIC --- */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px; /* Spacing between fields */
}

/* Override default input margin for wrapped inputs */
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  margin-bottom: 0;
  padding-right: 40px; /* Space for the eye icon */
}

/* The Eye Icon Button */
.toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.toggle-btn:hover {
  opacity: 1;
}

/* SVG Icon Color */
.toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-main); /* Matches the main text color */
}

.back-link {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: #888;
  font-size: 0.9em;
}

.back-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* --- VIDEO / IFRAME STYLING --- */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: black;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  border: 1px solid #444;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Optional: constrain width so it's not massive on big monitors */
.video-wrapper-centered {
  max-width: 900px; /* Standard nice player width */
  margin: 0 auto;   /* Centers the player */
}

/* --- REQUEST PAGE STYLING --- */
textarea {
  width: 100%;
  height: 120px;
  padding: 10px;
  background-color: #333; /* Matches inputs */
  color: white;
  border: 1px solid #444;
  border-radius: 4px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 20px;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}