:root {
  --primary: #60a5fa;
  --secondary: #94a3b8;
  --background: #0f172a;
  --text: #e2e8f0;
  --card-bg: #1e293b;
  --accent: #3b82f6;
  --hover: #1e40af;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.cover {
  min-height: 45vh;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: var(--text);
  opacity: 0;
  animation: fadeInSlideUp 1.2s ease-out forwards;
  text-align: center;
}

.cover h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeInSlideUp 0.8s ease-out 0.6s forwards;
}

.cover h2 {
  font-size: 1.2rem;
  opacity: 0;
  animation: fadeInSlideUp 0.8s ease-out 0.9s forwards;
}

.day-jumper {
  background: var(--card-bg);
  padding: 1rem;
  margin: -2rem auto 2rem;
  border-radius: 1rem;
  max-width: 1200px;
  box-shadow: 0 4px 20px -1px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeInSlideUp 0.8s ease-out 1.2s forwards;
}

.jumper-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.jump-btn {
  background: var(--background);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--primary);
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jump-btn:hover {
  transform: none;
  background: var(--background);
  box-shadow: none;
  border-color: var(--primary);
}

.jump-btn:active {
  transform: none;
}

.jump-btn .editable-content {
  display: block;
  min-width: 40px;
  transition: all 0.2s ease;
}

.jump-btn .editable-content:focus {
  background: rgba(96, 165, 250, 0.1);
  outline: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.jump-btn span[contenteditable="true"]:empty::before {
  content: attr(data-translate);
  color: var(--secondary);
  opacity: 0.7;
}

.jump-btn span {
  font-size: 0.8em;
  color: var(--primary);
  opacity: 0.9;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.workout-card {
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 20px -1px rgba(0,0,0,0.5);
  transition: transform 0.2s ease-in-out;
  margin-bottom: 2rem;
  border: 1px solid rgba(96, 165, 250, 0.1);
  position: relative;
}

.workout-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px -1px rgba(0,0,0,0.7);
}

.workout-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-top-left-radius: 1.5rem;
  border-bottom-left-radius: 1.5rem;
}

.workout-card h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--hover);
  padding-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.workout-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  font-size: 0.9rem;
}

.workout-table th,
.workout-table td {
  padding: 0.75rem;
}

.workout-table th:nth-child(1),
.workout-table td:nth-child(1) {
  width: 35%;
}

.workout-table th:nth-child(2),
.workout-table td:nth-child(2),
.workout-table th:nth-child(3),
.workout-table td:nth-child(3),
.workout-table th:nth-child(4),
.workout-table td:nth-child(4) {
  width: 12%;
  text-align: center;
}

.workout-table th:nth-child(5),
.workout-table td:nth-child(5) {
  width: 29%;
}

.editable {
  background: var(--card-bg);
  font-weight: 600;
  color: #60a5fa;
  border: none;
  transition: all 0.2s ease;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  width: 90%;
}

.editable:hover {
  background: #2d3748;
  color: #93c5fd;
  transform: translateX(5px);
}

.editable:focus {
  background: #374151;
  color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
  transform: translateX(5px);
}

.workout-table td:first-child .editable {
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--card-bg), #2d3748);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.workout-table td:first-child .editable:hover {
  background: linear-gradient(145deg, #2d3748, var(--card-bg));
  color: #93c5fd;
  transform: translateX(8px);
}

.weekly-overview {
  background: var(--card-bg);
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.info-card {
  background: #1a2234;
  padding: 1.25rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease;
  border: 1px solid rgba(96, 165, 250, 0.1);
}

.info-card:hover {
  transform: translateY(-2px);
}

.info-card h3,
.info-card h4 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.info-card p,
.info-card li {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer {
  background: var(--card-bg);
  text-align: center;
  margin-top: 4rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--hover);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

.logo {
  width: 200px;
  height: 200px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.3));
  opacity: 0;
  animation: fadeInScale 1s ease-out 0.3s forwards;
}

.logo:hover {
  filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.5));
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--hover);
  z-index: 1000;
}

.scroll-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary);
  width: var(--scroll);
}

.language-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  background: var(--card-bg);
  padding: 0.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--primary);
}

.language-toggle select {
  background: var(--background);
  color: var(--text);
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  outline: none;
}

.language-toggle .earth-emoji {
  font-size: 1.2rem;
  animation: rotate 10s linear infinite;
}

.fixed-buttons-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  z-index: 1000;
  flex-wrap: wrap;
  justify-content: center;
}

.fixed-buttons-container button {
  background: var(--primary);
  color: var(--background);
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  white-space: nowrap;
  min-width: 200px;
}

.action-buttons {
  position: fixed;
  bottom: 8rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
  z-index: 1000;
  flex-direction: column;
}

.action-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: bold;
}

.action-button.reset {
  background: #ef4444;
  color: white;
}

.action-button.save {
  background: var(--primary);
  color: var(--background);
}

.editable-content:focus {
  outline: none;
  background: rgba(96, 165, 250, 0.1);
  padding: 0.25rem 0.5rem;
}

.exercise-link {
  margin-left: 8px;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  font-size: 1.1em;
}

.exercise-link:hover {
  color: var(--accent);
}

.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.video-modal-content {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 800px;
}

.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-url-input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 1rem;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--primary);
  border-radius: 0.25rem;
}

.exercise-video-link {
  margin-left: 8px;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  font-size: 1.1em;
}

.delete-card-btn:hover {
  background: #dc2626 !important;
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cover {
    min-height: 35vh;
    padding: 1rem;
  }

  .cover h1 {
    font-size: 1.6rem;
  }

  .cover h2 {
    font-size: 1rem;
  }

  .logo {
    width: 120px;
    height: 120px;
  }

  .jumper-container {
    gap: 0.5rem;
  }

  .jump-btn {
    min-width: 60px;
    font-size: 0.9rem;
  }

  .jump-btn span {
    font-size: 0.7em;
  }

  .workout-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .workout-card h3 {
    font-size: 1.2rem;
  }

  .workout-table {
    font-size: 0.8rem;
  }

  .workout-table th,
  .workout-table td {
    padding: 0.5rem;
  }

  .editable {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .language-toggle {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem;
  }

  .language-toggle select {
    font-size: 0.9rem;
    padding: 0.25rem;
  }

  .fixed-buttons-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
  }

  .fixed-buttons-container button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-width: 0;
  }

  .action-buttons {
    bottom: unset;
    top: 4rem;
    right: 1rem;
  }

  .action-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .exercise-link {
    font-size: 1.2em;
    padding: 0.3rem;
  }

  .action-buttons {
    bottom: 0.5rem;
    right: 0.5rem;
    gap: 0.5rem;
  }

  .action-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* Animations */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media print {
  body {
    background: white;
    color: black;
  }
  
  .overview, .workout-card, table, .info-card {
    break-inside: avoid;
  }
  
  table {
    page-break-inside: avoid;
  }
}