/* =========================================================
   CLEANED templates.css 
   Dark theme + consistent yellow accent buttons (#FFB531)
   ========================================================= */

/* ---------- Section Wrappers ---------- */
.templates-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.templates-section.external-bg {
  background: #1c1c1c;
}

.section-title {
  font-size: 2.4rem;
  text-align: center;
  color: #ffb531;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: #ccc;
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ---------- Template Grid ---------- */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ---------- Template Cards ---------- */
.template-card {
  background: #262626;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.template-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid #ffb531;
}

.template-card .card-content {
  padding: 1.2rem;
  color: #eee;
  text-align: left;
}

.template-card h3 {
  color: #ffb531;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.template-card p {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 1.2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-accent,
.btn-primary {
  background: #ffb531;
  color: #000;
  border: none;
}

.btn-accent:hover,
.btn-primary:hover {
  background: #ffc94d;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 181, 49, 0.5);
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .template-card img {
    height: 180px;
  }

  .templates-section {
    padding: 3rem 1.5rem;
  }
}

/* =====================================================
   Quick Video Editor — Floating Reels-Style Controls
===================================================== */
/* ================= Quick Video Editor ================= */
.editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.editor-container.no-sidebar {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ================= Video Preview ================= */
.preview-area {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
  padding: 40px;
}

.overlay-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
}

.overlay-container video {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

/* ================= Floating Toolbar ================= */
.floating-tools {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  z-index: 999;
  background: rgba(20, 20, 20, 0.9);
  padding: 10px 15px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.floating-tools button {
  background: rgba(35, 35, 35, 0.95);
  color: #ffb531;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.floating-tools button:hover {
  background: #ffb531;
  color: #111;
}

/* ================= Emoji Menu ================= */
.emoji-menu {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.2rem;
  white-space: nowrap;
  z-index: 9999;
}
.emoji-menu span {
  cursor: pointer;
  margin: 0 3px;
}

/* ================= Font Menu ================= */
.font-menu {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 20px;
  background: rgba(40, 40, 40, 0.95);
  border-radius: 10px;
  padding: 8px 10px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
}
.font-menu button {
  background: #ffb531;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.font-menu input[type="color"] {
  width: 30px;
  height: 30px;
  border: none;
  cursor: pointer;
  background: none;
}

/* ================= Filter Presets ================= */
.filter-presets {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.95);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  gap: 6px;
  z-index: 9999;
}
.filter-presets button {
  background: #ffb531;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 4px 8px;
  cursor: pointer;
}

/* ================= Text Overlay ================= */
.editable-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  cursor: move;
  user-select: none;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

/* ================= Filter Effects ================= */
video.filter-glossy { filter: brightness(1.2) contrast(1.1) saturate(1.2); }
video.filter-summer { filter: brightness(1.3) saturate(1.4) hue-rotate(10deg); }
video.filter-vintage { filter: sepia(0.5) contrast(0.9) brightness(1.1); }
video.filter-cool { filter: hue-rotate(180deg) saturate(0.9); }
video.filter-warm { filter: sepia(0.3) brightness(1.2) contrast(1.2); }