@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap");

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans Devanagari", Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: white !important;
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */
.language-switcher {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid #e91e63;
  background: white;
  color: #e91e63;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-btn:hover {
  background: #fff0f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.lang-btn.active {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

/* ========================================
   FORM CONTAINER
   ======================================== */
.form-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin: 2rem 0;
}

.form-container h3 {
  color: #c2185b;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
  font-size: 1.5rem;
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
  color: white;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.section-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

.section-header i {
  transition: transform 0.3s ease;
}

.section-content {
  padding: 1rem 0;
  animation: slideDown 0.3s ease;
}

.section-content.collapsed {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   FIELD GROUPS
   ======================================== */
.field-group {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.field-group:hover {
  background: #e9ecef;
}

.field-group input,
.field-group select,
.field-group textarea {
  flex: 1;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
  font-family: "Noto Sans Devanagari", Arial, sans-serif;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.field-group small {
  min-width: 140px;
  color: #666;
  font-weight: 500;
  font-size: 0.85rem;
}

.drag-handle {
  cursor: grab;
  color: #adb5bd;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.drag-handle:hover {
  color: #e91e63;
}

.drag-handle:active {
  cursor: grabbing;
}

.remove-field {
  color: #dc3545;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.remove-field:hover {
  color: #c82333;
  transform: scale(1.2);
}

.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* ========================================
   BUTTONS
   ======================================== */
.add-field-btn {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s ease;
  font-weight: 600;
  width: 100%;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.add-field-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%) !important;
  border: none !important;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  border: none !important;
  color: #333 !important;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

/* ========================================
   PHOTO UPLOAD SECTION
   ======================================== */
.photo-upload-wrapper {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 6px 25px rgba(233, 30, 99, 0.15);
}

.photo-upload-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
  color: #c2185b;
  font-weight: 700;
  font-size: 1.1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.photo-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.2);
}

.photo-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.8rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.badge-optional {
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
}

.photo-upload-box {
  border: 2px dashed #e91e63;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-upload-box:hover {
  background: white;
  border-color: #c2185b;
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.1);
}

.photo-upload-box i {
  color: #e91e63;
  margin-bottom: 0.8rem;
}

.photo-upload-box p {
  margin: 0;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
}

.photo-upload-box p strong {
  display: block;
  color: #333;
  margin-bottom: 0.3rem;
}

.photo-preview-container {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  min-height: 160px;
  display: none;
}

.photo-preview-container.active {
  display: block;
}

.photo-preview-image {
  width: 100%;
  height: 100%;
  min-height: 160px;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.photo-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 0.8rem;
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-preview-container:hover .photo-actions {
  opacity: 1;
}

.photo-action-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.photo-action-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.photo-action-btn.danger:hover {
  background: #f44336;
  color: white;
}

/* ========================================
   PREVIEW CONTAINER
   ======================================== */
.preview-container {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin: 2rem 0;
}

.preview-container h3 {
  color: #c2185b;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.preview-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* ========================================
   HEADER TEXT SECTION
   ======================================== */
.form-container textarea {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 1rem;
  transition: all 0.3s ease;
  font-family: "Noto Sans Devanagari", Arial, sans-serif;
  resize: vertical;
}

.form-container textarea:focus {
  outline: none;
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* ========================================
   MODAL IMPROVEMENTS
   ======================================== */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom: none;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: none;
  padding: 1rem 1.5rem 1.5rem;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */
@media (max-width: 768px) {
  /* Container adjustments */
  .container {
    padding: 0 10px;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1.1rem;
  }

  .nav-link {
    margin: 0.3rem 0;
  }

  /* Form container */
  .form-container {
    padding: 1.2rem;
    border-radius: 16px;
    margin: 1rem 0;
  }

  .form-container h3 {
    font-size: 1.2rem;
  }

  /* Section headers */
  .section-header {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .section-header button {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
  }

  /* Field groups */
  .field-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.8rem;
  }

  .field-group small {
    min-width: auto;
    width: 100%;
  }

  .drag-handle {
    display: none;
  }

  /* Photo grid */
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .photo-upload-wrapper {
    padding: 1rem;
  }

  .photo-upload-box {
    min-height: 140px;
    padding: 1.2rem;
  }

  .photo-upload-box i {
    font-size: 2rem !important;
  }

  .photo-upload-box p {
    font-size: 0.8rem;
  }

  .photo-preview-image {
    max-height: 220px;
  }

  .photo-action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
  }

  /* Buttons */
  .btn-primary,
  .btn-success,
  .btn-warning {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Language switcher */
  .language-switcher {
    gap: 0.4rem;
  }

  .lang-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* Modal */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-header h5 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .form-container {
    padding: 1rem;
  }

  .section-header {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
  }

  .field-group {
    padding: 0.6rem;
  }

  .photo-upload-box {
    min-height: 120px;
    padding: 1rem;
  }

  .photo-upload-box i {
    font-size: 1.8rem !important;
  }

  .photo-preview-image {
    max-height: 180px;
  }

  .photo-action-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
    gap: 0.2rem;
  }

  .photo-action-btn i {
    font-size: 0.7rem;
  }
}

/* ========================================
   CROPPER MODAL
   ======================================== */
.crop-container {
  max-height: 500px;
  overflow: hidden;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
}

.crop-container img {
  max-width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .crop-container {
    max-height: 400px;
    padding: 0.5rem;
  }
}

/* ========================================
   GOD PHOTO GALLERY
   ======================================== */
.god-photo-item {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.god-photo-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.god-photo-item:hover img {
  transform: scale(1.05);
  border-color: #e91e63;
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.me-2 {
  margin-right: 0.5rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #e91e63;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c2185b;
}