body {
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  font-weight: 100;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #f5f5f5;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
}

.input-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.input-container input {
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-right: 10px;
  width: 300px;
}

.input-container button {
  padding: 8px 16px;
  font-size: 16px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.input-container button:hover {
  background: #357abd;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  background: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab.active {
  background: #4a90e2;
  color: white;
}

.tab-content {
  display: none;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-content.active {
  display: block;
}

textarea {
  width: calc(100% - 10px);
  height: 400px;
  font-family: monospace;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.transcript-container {
  max-width: 100%;
  margin: 0 auto;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  margin: 10px 0;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#progressSlider {
  flex-grow: 1;
  margin-right: 10px;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  padding-top: 20px;
  padding-bottom: 20px;
}

#progressSlider::-webkit-slider-runnable-track {
  height: 4px;
  background: #4a90e2;
  border-radius: 2px;
}

#progressSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 20px;
  background: #4a90e2;
  cursor: pointer;
  border-radius: 4px 4px 10px 10px;
  margin-top: -22px;
}

#progressSlider::-webkit-slider-thumb:hover {
  background: #4a90e2aa;
}

#progressTime {
  font-size: 14px;
  color: #666;
  width: 70px;
  text-align: right;
}

.segment {
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  width: calc(99% - 32px);
}

.segment:hover {
  transform: translateX(4px);
  background: #f0f4ff;
}

.segment.active {
  border-color: #4a90e2;
  background: #e8f0fe;
}

.timestamp {
  color: #666;
  font-size: 0.85em;
  margin-bottom: 4px;
}

.text {
  font-size: 1.1em;
  line-height: 1.5;
  color: #333;
}

.loading {
  text-align: center;
  padding: 20px;
  font-style: italic;
  color: #666;
}

#transcript {
  height: 45vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.search-container {
  margin: 10px 0;
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container.active {
  display: flex;
}

.search-container input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.search-container #searchCount {
  color: #666;
  font-size: 14px;
}

.segment.highlight {
  background: #fff3cd;
}

.match-btn {
  padding: 4px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.match-btn:hover {
  background: #f5f5f5;
}

.match-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.copy-btn {
  margin-left: auto;
  padding: 8px 16px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.copy-btn:hover {
  background: #357abd;
}

mark {
  background-color: cyan;
  padding: 0 2px;
  border-radius: 2px;
}

.meta-info {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.meta-info img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

.meta-info h2 {
  margin: 0 0 10px 0;
  font-size: 1.5em;
}

.meta-info .author {
  color: #666;
  margin-bottom: 15px;
}

body:has([data-tab="meta"].active, [data-tab="about"].active) .transcript-container {
  display: none;
}   

body:has([data-tab="meta"].active, [data-tab="about"].active) #searchContainer {
  display: none !important;
}

.play-btn {
  margin-right: 10px;
}   

.video-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 320px;
  height: 240px;
  resize: none;
  overflow: hidden;
  min-width: 200px;
  min-height: 150px;
  max-width: 90vw;
  max-height: 90vh;
  transition: all 0.3s ease;
}

.video-container.minimized {
  width: 160px !important;
  height: 120px !important;
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  margin: -10px -10px 0;
  background: #f5f5f5;
  border-radius: 12px 12px 0 0;
  cursor: grab;
  user-select: none;
}

.video-header:active {
  cursor: grabbing;
}

#player {
  width: 100% !important;
  height: calc(100% - 30px) !important;
  border-radius: 8px;
  border: none;
  transition: all 0.1s ease;
}

#player iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.pip-btn {
  padding: 4px 8px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.pip-btn:hover {
  background: #357abd;
}

/* Add this to highlight the current segment */
.segment.current {
  background: #e3f2fd;
  border-left: 4px solid #4a90e2;
}

/* Tilføj resize håndtag */
.video-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  cursor: nw-resize;
  background: linear-gradient(135deg, transparent 50%, #4a90e2 50%);
  border-radius: 0 0 12px 0;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  cursor: nw-resize;
  background: linear-gradient(135deg, transparent 50%, #4a90e2 50%);
  border-radius: 0 0 12px 0;
  z-index: 2;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  padding: 32px 24px 24px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.3em;
  color: #4a90e2;
}

#languageSelect {
  width: 80%;
  padding: 10px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

#confirmLanguageBtn, #cancelLanguageBtn {
  padding: 8px 20px;
  font-size: 1em;
  border-radius: 8px;
  border: none;
  background: #4a90e2;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

#cancelLanguageBtn {
  background: #aaa;
}

#confirmLanguageBtn:hover {
  background: #357abd;
}

#cancelLanguageBtn:hover {
  background: #888;
}