:root {
  --bg-dark: #1a1a2e;
  --card-bg: #16213e;
  --text-light: #fff;
  --text-gray: #d3d3d3;
  --accent-gold: #f8b400;
  --accent-orange: #ff6b35;
  --accent-blue: #05386b;
  --accent-teal: #00a896;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --border-radius: 12px;
  --transition: all 0.4s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Playfair Display', 'Georgia', serif;
  line-height: 1.7;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(248, 180, 0, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(0, 168, 150, 0.05) 0%, transparent 20%),
    linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  position: relative;
}

/* === HEADER === */
header {
  text-align: center;
  padding: 60px 0 30px;
  position: relative;
}

header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-light);
  text-shadow: 0 0 15px rgba(248, 180, 0, 0.6);
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
  border-radius: 2px;
}

/* === NAVBAR === */
nav {
  background-color: rgba(22, 33, 62, 0.85);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  border-bottom: 1px solid rgba(248, 180, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-container a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
}

.nav-container a:hover {
  color: var(--accent-gold);
  background-color: rgba(248, 180, 0, 0.1);
  transform: translateY(-2px);
}

.nav-container a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
  transition: var(--transition);
}

.nav-container a:hover::after {
  width: 80%;
}

/* === HERO SECTION === */
.hero-section {
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
  background: linear-gradient(to right, rgba(5, 56, 107, 0.2), rgba(248, 180, 0, 0.2));
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(248, 180, 0, 0.8);
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

.hero-section p {
  font-size: 1.2rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* === LOGIN & REGISTER FORM === */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  padding: 20px;
}

.login-box {
  background: rgba(22, 33, 62, 0.7);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(248, 180, 0, 0.15);
  transition: var(--transition);
  backdrop-filter: blur(5px);
  max-width: 400px;
  width: 100%;
}

.login-box h2 {
  color: var(--accent-gold);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
}

.login-box input {
  width: 100%;
  padding: 14px;
  margin: 12px 0;
  border: none;
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--text-light);
  font-size: 16px;
  border: 1px solid rgba(248, 180, 0, 0.2);
  transition: var(--transition);
}

.login-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(248, 180, 0, 0.4);
  transform: translateY(-1px);
}

.login-box button {
  width: 100%;
  background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
  color: #1a1a2e;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
}

.login-box button:hover {
  background: linear-gradient(to right, var(--accent-gold), var(--accent-teal));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 180, 0, 0.4);
}

.login-box a {
  color: var(--accent-teal);
  text-decoration: none;
  font-size: 15px;
  display: block;
  text-align: center;
  margin-top: 12px;
}

.login-box a:hover {
  text-decoration: underline;
  color: var(--accent-gold);
}

/* === CTA BUTTONS === */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-login,
.btn-register {
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(248, 180, 0, 0.2);
  border: none;
  cursor: pointer;
}

.btn-login {
  background: linear-gradient(to right, #ff6b35, #f8b400);
  color: #1a1a2e;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(248, 180, 0, 0.4);
  background: linear-gradient(to right, #f8b400, #00a896);
}

.btn-admin {
  background: linear-gradient(to right, #05386b, #00a896);
  color: white;
}

.btn-admin:hover {
  background: linear-gradient(to right, #00a896, #f8b400);
  color: #1a1a2e;
}

.btn-register {
  background: transparent;
  color: #f8b400;
  border: 2px solid #f8b400;
}

.btn-register:hover {
  background: rgba(248, 180, 0, 0.1);
  transform: translateY(-3px);
}

/* === FILM GRID === */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.film-card {
  background: rgba(22, 33, 62, 0.7);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.film-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(248, 180, 0, 0.3);
}

.film-poster {
  position: relative;
  overflow: hidden;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.film-poster img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  transition: var(--transition);
}

.film-poster:hover img {
  transform: scale(1.05);
}

.film-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
  z-index: 10;
}

.film-card:hover .film-overlay {
  opacity: 1;
}

.film-overlay a {
  display: block;
  background: var(--accent-gold);
  color: #1a1a2e;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  font-size: 14px;
  transition: var(--transition);
}

.film-overlay a:hover {
  background: var(--accent-orange);
  transform: translateY(-2px);
}

.film-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.film-info h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--accent-teal);
  font-weight: 600;
}

.release-date {
  color: var(--accent-gold);
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 500;
}

.synopsis {
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-lineclamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === ADMIN ACTIONS === */
.admin-actions {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.btn-primary {
  background: linear-gradient(to right, var(--accent-orange), var(--accent-gold));
  color: #1a1a2e;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(248, 180, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(248, 180, 0, 0.5);
  background: linear-gradient(to right, var(--accent-gold), var(--accent-teal));
}

/* === FILM TABLE CONTAINER === */
.film-table-container {
  margin-top: 30px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background-color: rgba(22, 33, 62, 0.7);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table th,
table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(248, 180, 0, 0.1);
}

table th {
  background-color: rgba(5, 56, 107, 0.6);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

table tr:hover {
  background-color: rgba(248, 180, 0, 0.1);
}

.btn-action {
  color: var(--accent-teal);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-action:hover {
  color: var(--accent-gold);
  background-color: rgba(248, 180, 0, 0.1);
  transform: translateX(2px);
}

.btn-delete {
  color: #ff6b35;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-delete:hover {
  color: #ff5050;
  background-color: rgba(255, 80, 80, 0.1);
}

.btn-back {
  display: inline-block;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-teal));
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 1px;
}

.btn-back:hover {
  background: linear-gradient(to right, var(--accent-teal), var(--accent-gold));
  color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 180, 0, 0.4);
}

/* === MESSAGE === */
.message {
  padding: 14px;
  border-radius: var(--border-radius);
  margin: 16px 0;
  text-align: center;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
}

.message.success {
  background-color: rgba(0, 168, 150, 0.15);
  border-left: 4px solid var(--accent-teal);
  color: var(--accent-teal);
}

.message.error {
  background-color: rgba(255, 107, 53, 0.15);
  border-left: 4px solid var(--accent-orange);
  color: var(--accent-orange);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-gray);
  font-size: 14px;
  border-top: 1px solid rgba(248, 180, 0, 0.1);
  margin-top: 60px;
  font-family: 'Poppins', sans-serif;
}

footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-teal);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }

  nav a {
    margin: 0 10px;
    font-size: 14px;
    padding: 8px 12px;
  }

  .login-box {
    padding: 20px;
  }

  .hero-section h1 {
    font-size: 2.2rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .film-detail-container {
    flex-direction: column;
    gap: 20px;
  }

  .film-poster img {
    width: 100%;
    max-width: 200px;
  }

  .film-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* === FILM DETAIL === */
.film-detail-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-top: 40px;
  padding: 30px;
  background: rgba(22, 33, 62, 0.7);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  max-width: 1000px;
  margin: 40px auto;
}

.film-poster img {
  width: 200px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.film-poster img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.film-info {
  flex: 1;
}

.film-info h2 {
  color: var(--accent-gold);
  font-size: 2rem;
  margin-bottom: 15px;
  font-family: 'Playfair Display', serif;
}

.film-meta {
  color: var(--accent-teal);
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
}

.film-synopsis p {
  color: var(--text-gray);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  word-wrap: break-word;
}

.btn-back {
  display: inline-block;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-teal));
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 1px;
}

.btn-back:hover {
  background: linear-gradient(to right, var(--accent-teal), var(--accent-gold));
  color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 180, 0, 0.4);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .film-detail-container {
    flex-direction: column;
    gap: 20px;
  }

  .film-poster img {
    width: 100%;
    max-width: 200px;
  }
}