/* Grundlegende Stile */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background-color: #0a1128;
  color: white;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* Dynamischer Hintergrund */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a1128 0%, #1a2a6c 50%, #0a1128 100%);
  background-size: 400% 400%;
  z-index: -1;
  animation: gradientBG 150s ease infinite;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-header h1 {
  font-size: 2rem;
  margin-bottom: 0;
  color: white;
  display: flex;
  align-items: center;
}

.admin-header h1 i {
  margin-right: 10px;
  color: #e9c46a;
}

.back-link {
  display: flex;
  align-items: center;
  color: #e9c46a;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #f4a261;
}

.back-link i {
  margin-right: 5px;
}

/* Message Styles */
.message {
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 14px;
  transition: opacity 0.5s ease;
  animation: slideDown 0.5s ease;
}

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

.message.success {
  background-color: rgba(46, 204, 113, 0.3);
  border-left: 4px solid #2ecc71;
}

.message.error {
  background-color: rgba(231, 76, 60, 0.3);
  border-left: 4px solid #e74c3c;
}

/* Tabs */
.admin-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
}

.tab-button {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 2px solid transparent;
}

.tab-button:hover {
  color: #e9c46a;
  background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
  color: #e9c46a;
  border-bottom-color: #2a9d8f;
  background: rgba(255, 255, 255, 0.1);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease;
}

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

.tab-content.active {
  display: block;
}

.tab-content h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #e9c46a;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #e9c46a;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2a9d8f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.3);
}

.form-group input[type="color"] {
  width: 50px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.form-group.checkbox input[type="checkbox"] {
  margin-right: 10px;
}

.form-group.checkbox label {
  margin-bottom: 0;
  cursor: pointer;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.btn i {
  margin-right: 5px;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.btn.primary {
  background-color: #2a9d8f;
  background-image: linear-gradient(to bottom, #2a9d8f, #218879);
}

.btn.primary:hover {
  background-color: #218879;
  background-image: linear-gradient(to bottom, #218879, #1a7268);
  transform: translateY(-2px);
}

.btn.primary:active {
  transform: translateY(1px);
}

.btn.secondary {
  background-color: #6c757d;
  background-image: linear-gradient(to bottom, #6c757d, #5a6268);
}

.btn.secondary:hover {
  background-color: #5a6268;
  background-image: linear-gradient(to bottom, #5a6268, #495057);
  transform: translateY(-2px);
}

.btn.secondary:active {
  transform: translateY(1px);
}

.btn.danger {
  background-color: #e76f51;
  background-image: linear-gradient(to bottom, #e76f51, #d65f41);
}

.btn.danger:hover {
  background-color: #d65f41;
  background-image: linear-gradient(to bottom, #d65f41, #c54e30);
  transform: translateY(-2px);
}

.btn.danger:active {
  transform: translateY(1px);
}

.btn.warning {
  background-color: #f39c12;
  background-image: linear-gradient(to bottom, #f39c12, #e67e22);
}

.btn.warning:hover {
  background-color: #e67e22;
  background-image: linear-gradient(to bottom, #e67e22, #d35400);
  transform: translateY(-2px);
}

.btn.warning:active {
  transform: translateY(1px);
}

/* Widget Settings */
.widget-settings {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.widget-settings h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #e9c46a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

/* Upload Section */
.upload-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #e9c46a;
}

.upload-section .help-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
}

.current-image {
  margin: 10px 0;
  max-width: 300px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.current-image img {
  width: 100%;
  height: auto;
  display: block;
}

.current-image.logo {
  max-width: 150px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 10px;
}

/* Image Actions */
.image-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Layout Settings */
.layout-widget {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.layout-widget h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #e9c46a;
  display: flex;
  align-items: center;
}

.layout-widget h3 i {
  margin-right: 8px;
  color: #2a9d8f;
}

.layout-widget .widget-order {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.layout-widget .widget-order label {
  margin-right: 10px;
  font-weight: 500;
  font-size: 14px;
  color: #e9c46a;
}

.layout-widget .widget-order input[type="number"] {
  width: 60px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}

.layout-widget .widget-size {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.layout-widget .widget-size label {
  margin-right: 10px;
  font-weight: 500;
  font-size: 14px;
  color: #e9c46a;
}

.layout-widget .widget-size select {
  width: 120px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}

/* Content Tab */
.content-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.content-section h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #e9c46a;
}

.content-section p {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.content-textarea {
  width: 100%;
  min-height: 200px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header h1 {
    margin-bottom: 10px;
  }

  .admin-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
  }

  .tab-button {
    padding: 10px 15px;
  }

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

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 12px;
  }
}
