*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --card: #22222e;
  --border: #2a2a3a;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #e50914;
  --accent-glow: rgba(229,9,20,0.3);
  --pink: #ff6b9d;
  --radius: 8px;
}
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
input, textarea, button { font-family: inherit; font-size: 0.95rem; }
.hidden { display: none !important; }

/* Login */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 2.5rem; width: 100%; max-width: 380px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.login-logo { font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; letter-spacing: 1px; margin-bottom: 0.3rem; }
.login-logo .logo-nossa { color: #fff; }
.login-logo .logo-flix { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.login-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-input {
  width: 100%; padding: 12px 16px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); margin-bottom: 1rem; outline: none;
  transition: border var(--transition);
}
.login-input:focus { border-color: var(--accent); }
.login-btn {
  width: 100%; padding: 12px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius); font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.login-btn:hover { background: #f40612; box-shadow: 0 0 20px var(--accent-glow); }
.login-error { color: var(--pink); font-size: 0.85rem; margin-top: 0.8rem; min-height: 1.2rem; }

/* Admin Panel */
.admin-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.admin-nav-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 1px; }
.admin-badge {
  font-family: 'Inter', sans-serif; font-size: 0.6rem; font-weight: 700;
  background: var(--accent); color: #fff; padding: 2px 8px;
  border-radius: 4px; vertical-align: middle; text-transform: uppercase;
}
.logout-btn {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  padding: 6px 16px; border-radius: var(--radius); cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover { color: var(--accent); border-color: var(--accent); }

.admin-container { display: flex; min-height: calc(100vh - 56px); }

/* Sidebar */
.admin-sidebar {
  width: 200px; background: var(--surface);
  border-right: 1px solid var(--border); padding: 1rem 0;
  flex-shrink: 0;
}
.sidebar-link {
  display: block; padding: 10px 1.2rem; color: var(--text-dim);
  text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(229,9,20,0.06); }

/* Content */
.admin-content {
  flex: 1; padding: 1.5rem 2rem; overflow-y: auto;
}
.loading { color: var(--text-dim); text-align: center; padding: 3rem; }

.section-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem;
  color: #fff; margin-bottom: 1.5rem; letter-spacing: 1px;
}

/* Cards Grid */
.episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.form-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; overflow: hidden;
}
.form-card-header {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem;
}
.form-card-thumb {
  width: 80px; height: 54px; border-radius: 4px; overflow: hidden;
  background: var(--bg); flex-shrink: 0;
}
.form-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.form-card-thumb .no-photo {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: var(--text-dim); font-size: 0.7rem;
}
.form-card-title { font-weight: 600; font-size: 0.9rem; color: #fff; }

/* Form fields */
.field-label { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; font-weight: 500; }
.field-input {
  width: 100%; padding: 8px 10px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); margin-bottom: 0.6rem; outline: none;
  transition: border 0.2s;
}
.field-input:focus { border-color: var(--accent); }
.field-textarea {
  width: 100%; padding: 8px 10px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); margin-bottom: 0.6rem; outline: none;
  resize: vertical; min-height: 60px; transition: border 0.2s;
}
.field-textarea:focus { border-color: var(--accent); }

/* Hero and Surprise forms */
.hero-form, .surprise-form {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; max-width: 600px;
}
.photo-preview {
  width: 200px; height: 150px; border-radius: var(--radius);
  overflow: hidden; background: var(--bg); margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview .no-photo { color: var(--text-dim); font-size: 0.8rem; }

.file-upload-wrapper { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.file-upload-btn {
  display: inline-block; padding: 8px 16px; background: var(--accent);
  color: #fff; border-radius: 4px; cursor: pointer; font-size: 0.85rem;
  font-weight: 500; transition: all 0.2s;
}
.file-upload-btn:hover { background: #f40612; }
.file-upload-btn input { display: none; }

.save-btn {
  padding: 8px 20px; background: var(--accent); color: #fff;
  border: none; border-radius: 4px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; margin-top: 0.4rem;
}
.save-btn:hover { background: #f40612; box-shadow: 0 0 15px var(--accent-glow); }
.save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; z-index: 9999;
  animation: slideIn 0.3s ease; pointer-events: none;
}
.toast.success { background: #1db954; color: #fff; }
.toast.error { background: var(--accent); color: #fff; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 768px) {
  .admin-sidebar { width: 160px; }
  .admin-content { padding: 1rem; }
  .episodes-grid { grid-template-columns: 1fr; }
}
