:root {
  --primary-color: #667eea;
  --primary-color-dark: #4a5caa;
  --primary-color-darker: #384681;
  --primary-color-light: #9aabff;

  --secondary-color: #ffc965;

  --primary-grad-1: #9365c2;
  --primary-grad-2: #a25097;
  --primary-grad-3: #a24882;

  --success-color: #28a745;
  --danger-color: #e55362;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;

  --gray: #808080;

  --linear-gradient: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-color-dark),
    var(--primary-color-darker)
  );
}

html {
  height: 100%;
  width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #faf9fd;
}

/* Main Content - nur für Home Page */
body:not(.auth-page) main {
  width: 100%;
  min-height: 100vh;
}

/* Dashboard Styles - nur für Home Page */
#dashboard-container .dashboard-section {
  margin-bottom: 4rem !important; /* Mehr Platz zwischen Sektionen */
}

/* Section Titles - Bessere Trennung und mehr Platz */
#dashboard-container .dashboard-section h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-color-darker);
  margin-bottom: 2rem !important;
  margin-top: 3rem !important;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary-color-light);
  position: relative;
}

#dashboard-container .dashboard-section h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Erste Sektion braucht weniger Abstand oben */
#dashboard-container .dashboard-section:first-child h2 {
  margin-top: 1rem !important;
}

/* Header-Bereiche haben feste Höhe - verhindert Ausdehnung bei leerem Content */
#dashboard-container
  .dashboard-section
  .d-flex.justify-content-between.align-items-center {
  min-height: 60px;
  max-height: 60px;
  flex-shrink: 0;
}

/* Content-Bereiche haben begrenzte Höhe wenn leer */
#dashboard-container .row.justify-content-center {
  min-height: 100px;
}

/* Gradient Divider mit Dots - nur für Dashboard */
#dashboard-container .section-divider-dots {
  display: flex;
  align-items: center;
  margin: 3rem 0 2rem 0;
  opacity: 0.7;
}

#dashboard-container .section-divider-dots::before,
#dashboard-container .section-divider-dots::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary-color-light) 50%,
    transparent 100%
  );
}

#dashboard-container .section-divider-dots .divider-center {
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  margin: 0 1rem;
  box-shadow: 0 0 0 3px var(--primary-color-light);
}

/* Home Page Plan Card Enhancements */
.home-plan-card {
  background: rgb(255, 255, 255, 0.9);
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  width: 450px;
  max-width: 90%;
  backdrop-filter: blur(10px);
}

.home-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Custom Button Style matching plan title color */
.btn-plan-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transition: all 0.2s ease;
}

.btn-plan-primary:hover {
  background-color: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-plan-primary:focus,
.btn-plan-primary:active {
  background-color: var(--primary-color-darker);
  border-color: var(--primary-color-darker);
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Plan Author Styling - nur für Home Page Plan Cards */
.home-plan-card .home-plan-author {
  display: flex;
  align-items: center;
  font-size: 0.85em;
}

.home-plan-card .home-plan-author i {
  margin-right: 0.3rem;
  color: #667eea;
}

.home-plan-card .home-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 1rem;
}

.home-plan-card .home-plan-header .home-plan-title {
  flex: 1;
}

.home-plan-card .home-plan-header .home-plan-author {
  flex-shrink: 0;
  text-align: right;
}

.home-plan-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #667eea;
}

/* Responsive Adjustments for Home Plan Cards */
@media (max-width: 768px) {
  .home-plan-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (min-width: 1200px) {
  .home-plan-card {
    max-width: 400px;
  }
}

/* Empty State Improvements */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #6c757d;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  margin: 1rem;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
  color: #667eea;
}

.empty-state h5 {
  margin-bottom: 1rem;
  color: #495057;
}

.empty-state p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.difficulty-badge {
  font-size: 0.75rem;
}

.category-badge {
  font-size: 0.75rem;
}

/* Filter Controls */
.filter-controls {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

/* Plan Details Modal */
.exercise-item {
  background: #f8f9fa;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.exercise-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.exercise-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.exercise-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.exercise-stat-value {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Loading States */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-controls {
    padding: 0.75rem;
  }

  .filter-controls .d-flex {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-controls .form-select {
    width: 100% !important;
  }
}

/* Error States */
.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 0.375rem;
  text-align: center;
}

/* Success States */
.success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 0.375rem;
  text-align: center;
}

/* ===== BUTTONS === */

.prim-btn {
  margin-right: 8px;
  margin-bottom: 8px;
  color: white !important;
  background-color: var(--primary-color) !important;
  height: 40px;
}
.prim-btn:hover {
  background-color: var(--primary-color-light) !important;
  color: white !important;
}

.sec-btn {
  margin-right: 8px;
  margin-bottom: 8px;
  color: var(--primary-color) !important;
  border: 1px solid var(--primary-color) !important;
  height: 40px;
}

.sec-btn:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.danger-btn {
  margin-right: 8px;
  margin-bottom: 8px;
  color: white !important;
  background-color: var(--danger-color) !important;
  height: 40px !important;
}

.danger-btn:hover {
  background-color: #c03945 !important;
  color: white !important;
}

.btn-outline-gray {
  color: lightslategray !important;
  border: 1px solid #ccc !important;
  height: 40px !important;
}
.btn-outline-gray:hover {
  background-color: lightslategray !important;
  color: white !important;
}

.icon-btn {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px !important;
  margin-bottom: 8px;
  margin-right: 8px;
  padding: 0;
  border: 1px solid var(--gray);
}
.icon-btn:hover {
  background-color: var(--gray) !important;
  color: white !important;
}

/* ===== HEADERS ===== */
.prim-header {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 16px;

  /* Gradient umgehen */
  background: linear-gradient(
    -90deg,
    var(--primary-color),
    var(--primary-color-dark),
    var(--primary-color-darker)
  );
  color: transparent;
  background-clip: text;
}

@media screen and (max-width: 768px) {
  .prim-header {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    block-size: 100%;
  }
}

.header-card {
  color: rgb(0, 0, 0);
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
  transition: all 0.3s;
  max-width: 95%;
}

/* ===== MODAL ===== */

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  /* z index so hoch wie möglich um Bug zu beheben das modal sich versteckt */
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* remove scrollbar */
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

/* ===== Form Styles ===== */

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

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

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}
