* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: left;
  margin: 0;
}

.media-player {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 600px;
}

.media-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.media-upload-button {
  padding: 6px 12px;
  border: 2px solid white;
  border-radius: 4px;
  background: transparent;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.media-upload-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.play-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  min-width: 40px;
}

.play-button:hover {
  background: white;
  transform: scale(1.1);
}

.time-display {
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  min-width: 100px;
}

.progress-fill {
  height: 100%;
  background: white;
  transition: width 0.1s linear;
}

.controls {
  padding: 8px 10px;
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.upload-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons {
  display: flex;
  gap: 6px;
}

.button {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  background: #667eea;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.button.primary {
  background: #10b981;
}

.button.primary:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.file-name {
  color: #495057;
  font-weight: 500;
  padding: 4px 8px;
  background: white;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  font-size: 0.85rem;
}

.editor {
  padding: 10px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  padding: 16px 12px;
  color: #6c757d;
}

.empty-state p {
  font-size: 1rem;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry {
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 8px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.entry:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.entry.focused {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

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

.entry-id {
  font-weight: 700;
  font-size: 0.95rem;
  color: #667eea;
}

.delete-button {
  background: #dc3545;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.delete-button:hover {
  background: #c82333;
  transform: scale(1.1);
}

.timecodes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.timecode-field {
  flex: 1;
  min-width: 160px;
}

.timecode-separator {
  font-size: 1.1rem;
  color: #667eea;
  font-weight: 700;
}

.timecode-field label,
.text-field label {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
  color: #495057;
  font-size: 0.8rem;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 4px 6px;
  border: 2px solid #dee2e6;
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
  resize: vertical;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.text-field {
  margin-top: 4px;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.3rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-section,
  .action-buttons {
    justify-content: center;
  }

  .timecodes {
    flex-direction: column;
  }

  .timecode-separator {
    transform: rotate(90deg);
  }
}
