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

:root {
  --primary-color: #3b6ea8;
  --secondary-color: #7fa8d8;
  --accent-color: #a3bde0;
  --danger-color: #be6a77;
  --text-dark: #1f2f44;
  --text-light: #66798f;
  --bg-light: #eef4fb;
  --white: #ffffff;
  --shadow: 0 3px 14px rgba(43, 71, 107, 0.12);
  --shadow-hover: 0 10px 28px rgba(43, 71, 107, 0.18);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(140deg, #5f86b8 0%, #7fa6d1 50%, #b7cee6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-dark);
}

.container {
  max-width: 600px;
  width: 100%;
  background: #f8fbff;
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
  padding: 40px;
  border: 1px solid #d6e3f2;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: var(--primary-color);
  font-size: 2em;
  margin-bottom: 10px;
}

.header p {
  color: var(--text-light);
  font-size: 1em;
  line-height: 1.6;
}

.alert {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: none;
  animation: slideIn 0.3s ease;
}

.alert.success {
  background-color: #e8f1fb;
  color: #2f5f8f;
  border: 1px solid #cfe1f4;
}

.alert.error {
  background-color: #f8eaee;
  color: #85434c;
  border: 1px solid #edd0d6;
}

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

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

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95em;
}

select, textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #d6e2f0;
  border-radius: 10px;
  font-size: 1em;
  font-family: inherit;
  transition: all 0.3s ease;
}

select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 110, 168, 0.16);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.category-description {
  margin-top: 8px;
  font-size: 0.85em;
  color: var(--text-light);
  font-style: italic;
}

button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

.footer {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #d8e4f2;
}

.footer p {
  color: var(--text-light);
  font-size: 0.9em;
  line-height: 1.6;
}

.admin-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.admin-link:hover {
  color: var(--secondary-color);
}

/* Estilos para imagen */
input[type="file"] {
  padding: 10px;
  border: 2px dashed var(--text-light);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  background: var(--bg-light);
  transition: all 0.3s ease;
}

input[type="file"]:hover {
  border-color: var(--primary-color);
  background: white;
}

.image-preview {
  margin-top: 15px;
}

.preview-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.preview-container img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
}

.remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.remove-image:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.suggestion-image {
  margin: 15px 0;
}

.suggestion-image img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.suggestion-image img:hover {
  transform: scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
  }
  
  .header h1 {
    font-size: 1.5em;
  }
}
