body {
    margin: 0;
    background: #141414;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
}

/* ---------- LOGIN ---------- */

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: #1f1f1f;
    padding: 40px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

.login-box input {
    width: 280px;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background: #e50914;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

#login-error {
    color: #ff4c4c;
}

/* Movie count in top-left of the movies div */
#movieCount {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.9rem;
    color: #aaa;      /* subtle gray */
    font-weight: 500;
    z-index: 10;
}
#app {
    position: relative; /* required for absolute positioning inside */
}

/* ---------- APP ---------- */

/* Header styling */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #222;
    color: #fff;
    position: relative; /* allows absolute positioning inside */
}

/* Title */
header h1 {
    margin: 0 0 10px 0;
}

/* Search input inside header */
#searchInput {
    width: 300px;
    max-width: 90%;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
    font-size: 16px;
}

/* ---------- MOVIE GRID ---------- */

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.movie {
    transition: transform 0.2s ease;
    cursor: pointer;
}

.movie:hover {
    transform: scale(1.05);
}

.movie img {
    width: 100%;
    border-radius: 6px;
}

.movie-title {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
}

.file-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.folder, .file {
  display: flex;
  flex-direction: column; /* stack icon above name */
  align-items: center;    /* center horizontally */
  justify-content: center;
  width: 120px;           /* adjust size as needed */
  padding: 10px;
  margin: 5px;
  cursor: pointer;
  text-align: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.folder:hover, .file:hover {
  background-color: #333;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

/* Modal content box */
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    max-width: 600px;
    color: black;
}

.downloadBtn {
  display: inline-block;
  padding: 10px 15px;
  background: #0078ff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

#logoutBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    background-color: #555;
    color: #fff;
    cursor: pointer;
}

/* Alphabet bar styling */
#alphabetBar {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    flex-wrap: wrap;
}

#alphabetBar .alphaBtn {
    margin: 2px;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    background-color: #444;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
}

#alphabetBar .alphaBtn:hover {
    background-color: #666;
}

/* Icon styling */
.icon {
  font-size: 40px;   /* larger than text */
  margin-bottom: 5px;
}

/* Name styling */
.name {
  font-size: 14px;
  word-break: break-word;
}