* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
}

.screen.active {
  display: block;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: white;
}

.profile-pic {
  width: 40px;
  height: 40px;
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
}

.settings-icon {
  width: 24px;
  height: 24px;
}

.settings-icon img {
  width: 100%;
  height: 100%;
}

/* Content */
.content {
  padding: 0 20px;
}

.greeting {
  margin: 30px 0;
}

.greeting h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.date {
  color: #666;
  font-size: 16px;
}

/* Today's Workout Card */
.today-workout-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.workout-image {
  height: 200px;
  overflow: hidden;
}

.workout-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-info {
  padding: 20px;
}

.workout-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.workout-info p {
  color: #666;
  font-size: 16px;
  margin-bottom: 4px;
}

.workout-duration {
  font-size: 14px;
  margin-bottom: 20px !important;
}

.start-btn {
  background: #007aff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.start-btn:hover {
  background: #0056b3;
}

/* All Workouts Section */
.all-workouts-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.workout-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s;
}

.workout-item:hover {
  transform: translateY(-2px);
}

.workout-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-right: 16px;
  overflow: hidden;
}

.workout-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workout-item-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.workout-item-info p {
  color: #666;
  font-size: 14px;
}

.workout-start-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.2s;
}

.workout-start-btn:hover {
  background: #e0e0e0;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: center;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
  z-index: 1000;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 48px;
  margin: 0 20px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.nav-item.active {
  opacity: 1;
}

.nav-item img {
  width: 24px;
  height: 24px;
}

/* Workout Screen */
.workout-header {
  display: flex;
  align-items: center;
  padding: 60px 20px 20px;
  background: white;
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 16px;
}

.back-btn img {
  width: 24px;
  height: 24px;
}

.workout-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.workout-content {
  padding: 20px;
}

/* Timer Section */
.timer-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.timer-display {
  font-size: 48px;
  font-weight: 300;
  color: #333;
  margin-bottom: 8px;
}

.timer-labels {
  display: flex;
  justify-content: center;
  gap: 50px;
  color: #666;
  font-size: 14px;
}

/* Progress Section */
.progress-section {
  margin-bottom: 20px;
}

.progress-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
}

.progress-bar {
  background: #e0e0e0;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  background: #007aff;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Exercise Section */
.exercise-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.exercise-header {
  margin-bottom: 20px;
}

.exercise-number {
  color: #666;
  font-size: 14px;
  margin-bottom: 4px;
}

.exercise-name {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.exercise-sets {
  color: #666;
  font-size: 16px;
  margin-bottom: 16px;
}

.watch-video-btn {
  background: #f0f0f0;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.exercise-video-container {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}

.exercise-video-container iframe {
  width: 100%;
  height: 100%;
}

.sets-container {
  margin-top: 20px;
}

.set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.set-item:last-child {
  border-bottom: none;
}

.set-label {
  font-weight: 500;
  min-width: 60px;
}

.set-input {
  flex: 1;
  max-width: 120px;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  margin: 0 12px;
}

.set-completed {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* Rest Timer Section */
.rest-timer-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.rest-timer-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.rest-timer {
  margin-bottom: 32px;
}

.rest-time {
  font-size: 72px;
  font-weight: 300;
  color: #007aff;
  margin-bottom: 8px;
}

.rest-labels {
  display: flex;
  justify-content: center;
  gap: 80px;
  color: #666;
  font-size: 14px;
}

.next-exercise-btn,
.finish-workout-btn {
  background: #007aff;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-bottom: 12px;
}

.finish-workout-btn {
  background: #28a745;
}

/* Video Screen */
.video-header {
  position: absolute;
  top: 60px;
  right: 20px;
  z-index: 10;
}

.close-video-btn {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.close-video-btn img {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.video-content {
  width: 100%;
  height: 100vh;
  background: #000;
}

/* Responsive Design */
@media (max-width: 480px) {
  .timer-display {
    font-size: 36px;
  }

  .timer-labels {
    gap: 30px;
  }

  .rest-time {
    font-size: 60px;
  }

  .rest-labels {
    gap: 60px;
  }

  .exercise-name {
    font-size: 20px;
  }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
  .header {
    padding-top: 40px;
  }

  .workout-header {
    padding-top: 40px;
  }
}
