/* Globale Resets & Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #0c0c0c;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 12px;
}

/* Smartphone-artiger Container */
.app-container {
  width: 100%;
  max-width: 450px;
  height: 92vh;
  max-height: 850px;
  background-color: #121212;
  border-radius: 25px;
  border: 1px solid #222222;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header */
.app-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #151515;
}

.app-header h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.music-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.music-btn.active {
  background: rgba(0, 230, 118, 0.2);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.35);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.music-icon {
  font-size: 16px;
}

/* App Content Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

/* Screens */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.screen.active {
  display: flex;
}

/* Statistik-Karte */
.stats-card {
  background-color: rgba(0, 230, 118, 0.07);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.stats-emoji {
  font-size: 32px;
  margin-right: 14px;
}

.stats-info {
  display: flex;
  flex-direction: column;
}

.stats-label {
  color: #888888;
  font-size: 12px;
}

.stats-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.section-title {
  font-size: 14px;
  color: #888888;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Muskelgruppen Grid & Karten */
.muscle-groups-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

.group-card {
  height: 105px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.group-card:active {
  transform: scale(0.98);
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  cursor: pointer;
  height: 100%;
}

.card-icon {
  font-size: 28px;
}

.card-text {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.card-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.add-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #00e676;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.add-btn:active {
  transform: scale(1.2);
}

.arrow-icon {
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  padding: 8px;
}

/* Detailansicht */
.back-navigation {
  margin-bottom: 12px;
}

.text-btn {
  background: none;
  border: none;
  color: #888888;
  font-size: 14px;
  cursor: pointer;
}

.group-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.exercises-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.exercise-card {
  background-color: #1e1e1e;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.exercise-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ex-name {
  font-size: 15px;
  font-weight: 700;
}

.ex-pause {
  font-size: 11px;
  color: #888888;
}

.exercise-badges {
  display: flex;
  gap: 6px;
}

.info-badge {
  background-color: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
}

.badge-label {
  font-size: 8px;
  color: #888888;
}

.badge-value {
  font-size: 11px;
  font-weight: 700;
  color: #00e676;
}

.action-footer {
  margin-top: 16px;
}

/* Buttons */
.primary-btn {
  width: 100%;
  background-color: #00e676;
  color: #000000;
  border: none;
  border-radius: 25px;
  height: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-btn:active {
  transform: scale(0.97);
}

.danger-btn {
  background: none;
  border: none;
  color: #ff5252;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
}

.secondary-btn {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm {
  height: 38px;
  font-size: 14px;
}

/* Aktives Workout Screen */
.active-header {
  text-align: center;
  margin-bottom: 16px;
}

.progress-indicator {
  color: #888888;
  font-size: 13px;
  font-weight: 600;
}

.active-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

.exercise-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.exercise-reps-target {
  font-size: 16px;
  color: #00e676;
  margin-bottom: 24px;
}

.set-counter-card {
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.set-label {
  font-size: 10px;
  color: #888888;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.set-value {
  font-size: 38px;
  font-weight: 800;
}

.workout-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Pause UI */
.pause-label {
  font-size: 18px;
  font-weight: 700;
  color: #888888;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.timer-ring-container {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.timer-ring {
  position: absolute;
  transform: rotate(-90deg);
}

.timer-ring-progress {
  transition: stroke-dashoffset 0.2s linear;
}

.timer-text {
  font-size: 32px;
  font-weight: 800;
}

.next-step-label {
  color: #888888;
  font-size: 14px;
  margin-bottom: 24px;
}

/* Modals */
.modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #1e1e1e;
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  max-width: 340px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-center {
  text-align: center;
}

.modal-content h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.modal-content p {
  color: #888888;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

label {
  font-size: 11px;
  color: #888888;
  font-weight: 600;
}

input {
  background-color: #121212;
  border: 1px solid #333333;
  border-radius: 8px;
  height: 38px;
  padding: 0 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
}

input:focus {
  outline: none;
  border-color: #00e676;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.flat-btn {
  background: none;
  border: none;
  color: #888888;
  cursor: pointer;
  font-weight: 600;
  padding: 0 10px;
}

/* Utilities */
.hidden {
  display: none !important;
}

.pulse-effect {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 230, 118, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}