* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #d4a574;
  --secondary-color: #8b6f47;
  --accent-color: #f5e6d3;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --bg-light: #fafafa;
  --white: #ffffff;
  --success-color: #4caf50;
  --error-color: #f44336;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--text-dark);
}

.admin-container {
  max-width: 900px;
  margin: 0 auto;
}

.admin-header {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-header h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  font-weight: 700;
}

.back-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.admin-content {
  background: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow);
}

.menu-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  padding-bottom: 30px;
  border-bottom: 2px solid var(--bg-light);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h2 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 25px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: var(--transition);
  background: var(--white);
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b6f47' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Image Upload Styles */
.image-upload-container {
  position: relative;
}

.image-upload-container input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background: var(--accent-color);
  color: var(--secondary-color);
  border: 2px dashed var(--primary-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  width: 100%;
  justify-content: center;
}

.upload-label:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.upload-label svg {
  width: 24px;
  height: 24px;
}

.image-preview-container {
  margin-top: 20px;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  overflow: hidden;
}

.preview-placeholder {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

.image-preview-container img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 30px;
  border-top: 2px solid var(--bg-light);
}

.btn {
  padding: 14px 30px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

/* Success Message */
.success-message {
  display: none;
  background: var(--success-color);
  color: var(--white);
  padding: 20px 30px;
  border-radius: 10px;
  margin-top: 20px;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  animation: slideDown 0.4s ease-out;
}

.success-message.show {
  display: flex;
}

.success-message svg {
  width: 24px;
  height: 24px;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header h1 {
    font-size: 1.5rem;
  }

  .admin-content {
    padding: 25px;
  }

  .form-section h2 {
    font-size: 1.3rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .image-preview-container {
    min-height: 150px;
  }

  .image-preview-container img {
    max-height: 300px;
  }
}
