/* =====================================================
   CREATE REEL — Card "Crear Reel" (Stories-style)
   ===================================================== */
.create-reel-card {
  position: relative;
  display: block;
  border: 0;
  cursor: pointer;
  padding: 0;
  background: linear-gradient(135deg, #E30613 0%, #8A0000 100%);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 6px 20px rgba(227,6,19,0.25);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s;
  aspect-ratio: 9 / 16;
  width: 100%;
  font-family: inherit;
}
.create-reel-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 22px 40px rgba(227,6,19,0.45);
}

/* Logo de fondo con blur y baja opacidad */
.create-reel-card-bg {
  position: absolute;
  inset: -20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 70%;
  opacity: 0.12;
  filter: blur(8px) brightness(2);
  transition: opacity 0.3s, transform 0.5s;
}
.create-reel-card:hover .create-reel-card-bg {
  opacity: 0.22;
  transform: scale(1.05);
}

/* Overlay para mejorar contraste */
.create-reel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(227,6,19,0.15) 0%,
    rgba(123,16,16,0.55) 60%,
    rgba(26,0,0,0.85) 100%);
}

/* Contenido centrado */
.create-reel-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px 24px;
  text-align: center;
  color: #fff;
}

/* Botón circular "+" */
.create-reel-card-plus {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: var(--red, #E30613);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto auto 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 -3px 0 rgba(0,0,0,0.08);
  border: 3px solid var(--red, #E30613);
  transition: transform 0.25s, box-shadow 0.25s;
}
.create-reel-card:hover .create-reel-card-plus {
  transform: scale(1.12) rotate(90deg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 -3px 0 rgba(0,0,0,0.08);
}

.create-reel-card-label {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  margin: 0 0 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  letter-spacing: 0.3px;
}
.create-reel-card-sub {
  font-size: 11.5px;
  line-height: 1.4;
  opacity: 0.92;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  max-width: 180px;
}

/* =====================================================
   MODAL "Crear Reel"
   ===================================================== */
.cr-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s;
}
.cr-modal.open { display: flex; opacity: 1; }

.cr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cr-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  padding: 28px;
  z-index: 1;
  animation: crModalIn 0.28s cubic-bezier(.2,.9,.2,1);
}
@keyframes crModalIn {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.cr-modal-x {
  position: absolute;
  top: 12px; right: 14px;
  width: 36px; height: 36px;
  border: 0; background: #f3f4f6;
  border-radius: 50%;
  font-size: 16px;
  color: #4b5563;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.cr-modal-x:hover { background: var(--red, #E30613); color: #fff; transform: rotate(90deg); }

.cr-modal-header {
  display: flex; gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  padding-right: 36px;
}
.cr-modal-header-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--red, #E30613), #8A0000);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(227,6,19,0.4);
}
.cr-modal-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #1a1a1a;
}
.cr-modal-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* Alerts inline */
.cr-alert {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.cr-alert.show { display: block; }
.cr-alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.cr-alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Form */
.cr-form { display: flex; flex-direction: column; gap: 14px; }
.cr-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cr-field { display: flex; flex-direction: column; }
.cr-field label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.cr-req { color: var(--red, #E30613); }
.cr-opt { color: #9ca3af; font-weight: 500; }
.cr-field input,
.cr-field select,
.cr-field textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.cr-field input:focus,
.cr-field select:focus,
.cr-field textarea:focus {
  outline: none;
  border-color: var(--red, #E30613);
  box-shadow: 0 0 0 3px rgba(227,6,19,0.12);
}
.cr-field input[type="file"] {
  padding: 9px 10px;
  background: #fafbfc;
  font-size: 13px;
}
.cr-help {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 6px;
}

/* Checkboxes */
.cr-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #374151;
  line-height: 1.55;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cr-check:hover { background: #f3f4f6; border-color: #d1d5db; }
.cr-check input {
  margin-top: 3px;
  width: 17px; height: 17px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--red, #E30613);
}

/* Actions */
.cr-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s;
}
.cr-btn-ghost {
  background: #fff;
  color: #4b5563;
  border-color: #d1d5db;
}
.cr-btn-ghost:hover { background: #f9fafb; color: #1f2937; }
.cr-btn-primary {
  background: linear-gradient(135deg, var(--red, #E30613), #8A0000);
  color: #fff;
  box-shadow: 0 4px 14px rgba(227,6,19,0.35);
}
.cr-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(227,6,19,0.45);
}
.cr-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.cr-btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: crSpin 0.8s linear infinite;
}
.cr-btn.loading .cr-btn-spinner { display: inline-block; }
.cr-btn.loading .cr-btn-text { opacity: 0.6; }
@keyframes crSpin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .cr-modal-dialog { padding: 22px 18px; max-height: 96vh; }
  .cr-form-row { grid-template-columns: 1fr; }
  .cr-modal-header h2 { font-size: 18px; }
  .cr-modal-header p { font-size: 12px; }
  .cr-actions { flex-direction: column-reverse; }
  .cr-btn { width: 100%; }
  .create-reel-card-plus { width: 54px; height: 54px; }
  .create-reel-card-label { font-size: 13.5px; }
  .create-reel-card-sub { font-size: 10.5px; }
}
