/* ========================================
   KRYDE - Global Stylesheet
   ======================================== */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --color-cyan: #00d4ff;
  --color-error: #ff5050;
  --color-success: #00d4ff;
  --border-color: rgba(0, 212, 255, 0.15);
  --border-color-light: rgba(0, 212, 255, 0.2);
  --border-color-hover: rgba(0, 212, 255, 0.5);
  --transition: all 0.3s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.5px;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--color-cyan), var(--color-error));
  width: 0%;
  z-index: 9999;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

h1 { font-size: 3rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* ========================================
   LAYOUT
   ======================================== */

header {
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  animation: fadeInLeft 0.8s ease;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-cyan), transparent);
  opacity: 0;
  animation: borderPulse 3s ease-in-out infinite 0.5s;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem;
}

footer {
  text-align: center;
  padding: 3rem 4rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  margin-top: 4rem;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* ========================================
   COMPONENTS - HEADER
   ======================================== */

.logo-container {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.logo-symbol {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  cursor: pointer;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.logo-text:hover {
  color: var(--color-cyan);
}

.domain {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ========================================
   COMPONENTS - BREADCRUMB
   ======================================== */

.breadcrumb {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 0.9rem;
  animation: fadeInUp 0.8s ease;
}

.breadcrumb a {
  color: var(--color-cyan);
  transition: var(--transition);
}

.breadcrumb a:hover {
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* ========================================
   COMPONENTS - BUTTONS
   ======================================== */

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  border-radius: 4px;
}

.btn-primary {
  background: var(--color-cyan);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #00b8cc;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-cyan);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.btn-danger {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: var(--color-error);
}

.btn-danger:hover {
  background: rgba(255, 80, 80, 0.2);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-cyan);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease;
}

.btn-back:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  transform: translateX(-4px);
}

/* ========================================
   COMPONENTS - FORMS
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  transition: var(--transition);
  border-radius: 4px;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
  background: rgba(0, 212, 255, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========================================
   COMPONENTS - CARDS
   ======================================== */

.card {
  padding: 1.5rem;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  transform: translateY(-4px);
}

.card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.card-value {
  font-size: 1.1rem;
  color: var(--color-cyan);
  font-weight: 600;
}

/* ========================================
   COMPONENTS - GRID
   ======================================== */

.grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

/* ========================================
   COMPONENTS - SECTIONS
   ======================================== */

.section {
  margin: 4rem 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
  opacity: 0;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  width: 100%;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--color-cyan), transparent);
}

/* ========================================
   COMPONENTS - MODALS
   ======================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 4px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  border-radius: 4px;
}

.modal-btn-submit {
  background: var(--color-cyan);
  color: var(--bg-primary);
}

.modal-btn-submit:hover {
  background: #00b8cc;
}

.modal-btn-cancel {
  background: rgba(255, 80, 80, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(255, 80, 80, 0.3);
}

.modal-btn-cancel:hover {
  background: rgba(255, 80, 80, 0.2);
}

/* ========================================
   UPDATE MODAL
   ======================================== */

#updateModal .modal-content {
  max-width: 700px;
  max-height: 85vh;
}

.update-modal-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding-bottom: 1.5rem;
}

.update-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.update-modal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.update-modal-body {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.update-modal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.update-modal-body img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  margin: 1.5rem 0;
  cursor: pointer;
  transition: var(--transition);
}

.update-modal-body img:hover {
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.update-modal-footer {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.update-close-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-cyan);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 4px;
  text-transform: uppercase;
}

.update-close-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.6);
}

/* Image Lightbox for fullscreen view */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: pointer;
}

.image-lightbox.active {
  display: flex;
}

.image-lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.image-lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.5);
  color: var(--color-cyan);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.image-lightbox-close:hover {
  background: rgba(0, 212, 255, 0.4);
  border-color: rgba(0, 212, 255, 0.8);
}

/* Clickable update items */
.update-item-clickable {
  cursor: pointer;
  position: relative;
}

.update-item-clickable::after {
  content: '→ Vollständig anzeigen';
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-cyan);
  opacity: 0;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.update-item-clickable:hover::after {
  opacity: 1;
}

/* ========================================
   COMPONENTS - MESSAGES
   ======================================== */

.message {
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  border-radius: 4px;
  animation: slideDown 0.3s ease;
}

.message-success {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-cyan);
}

.message-error {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: var(--color-error);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes borderPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   UTILITIES
   ======================================== */

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 212, 255, 0.2);
  border-top-color: var(--color-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.error {
  text-align: center;
  padding: 4rem 2rem;
}

.error-message {
  font-size: 1.2rem;
  color: var(--color-error);
  margin-bottom: 2rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--color-cyan); }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.hidden { display: none !important; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  header {
    padding: 1.5rem 2rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  main {
    padding: 2rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 90%;
  }
}
