/* ─── Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&display=swap');

/* ─── Design tokens ─── */
:root {
  --font-family-dm-mono: 'DM Mono', sans-serif;
  --color-yellow: rgba(239, 255, 98, 1);
  --text-white: rgba(255, 255, 255, 1);
  --text-black: rgba(0, 0, 0, 1);
  --text-muted: rgba(115, 115, 115, 1);
  --text-yellow: rgba(239, 255, 98, 1);
  --text-dark-muted: rgba(92, 92, 92, 1);
}

/* ─── Colour utility classes ─── */
.text-white      { color: var(--text-white); }
.text-black      { color: var(--text-black); }
.text-muted      { color: var(--text-muted); }
.text-yellow     { color: var(--text-yellow); }
.text-dark-muted { color: var(--text-dark-muted); }

/* ─── CSS Reset ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: rgba(30, 30, 30, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--font-family-dm-mono);
}

img { max-width: 100%; height: auto; }

a.prototype-link { text-decoration: none; color: inherit; display: contents; }

/* ─── Language switch — fixed top-right, outside columns ─── */
.lang-switch-row {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-family-dm-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
}

.lang-option {
  color: var(--text-dark-muted);
  cursor: pointer;
  padding: 2px 5px;
  transition: color 0.25s ease;
}
.lang-option.active { color: var(--text-white); }
.lang-option:hover  { color: var(--text-muted); }
.lang-divider { color: var(--text-dark-muted); font-size: 15px; }

/* ─── Outer wrapper ─── */
.controls {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: calc(100vw - 40px);
  max-width: calc(100vw - 40px);
  background-color: rgba(30, 30, 30, 1);
  gap: 0;
  padding: 0;
}

@media (max-width: 1024px) {
  .controls { flex-direction: column; width: 100%; }
}

/* ─── Left column ─── */
.left-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 36%;
  width: 36%;
}

@media (max-width: 1024px) {
  .left-column { width: 100%; flex: none; }
}

/* ─── Video square ─── */
.videoSquare {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: rgba(0, 0, 0, 1);
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
}

@media (max-width: 1024px) {
  .videoSquare { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

#vimeo-player { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
#vimeo-player iframe { width: 100% !important; height: 100% !important; }

/* ─── Menu overlay ─── */
.menu-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(26, 26, 26, 0.98);
  z-index: 1000; display: none; overflow-y: auto; padding: 20px;
}
.menu-overlay.active { display: block; }

.menu-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 2px solid rgba(138, 138, 138, 1);
}

.menu-title {
  color: var(--color-yellow);
  font-family: var(--font-family-dm-mono);
  font-size: 18px; font-weight: bold; margin: 0;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.close-menu {
  background: rgba(57, 57, 57, 1); color: white;
  border: 1px solid rgba(138, 138, 138, 1);
  padding: 5px 15px; cursor: pointer;
  font-family: var(--font-family-dm-mono);
  font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.3s ease;
}
.close-menu:hover { background: rgba(70, 70, 70, 1); }

.menu-items { list-style: none; padding: 0; margin: 0; }

.menu-item {
  padding: 12px 15px; color: white;
  font-family: var(--font-family-dm-mono); font-size: 14px;
  cursor: pointer; border-bottom: 1px solid rgba(57, 57, 57, 1);
  transition: all 0.2s ease; display: flex; align-items: center; gap: 10px;
}
.menu-item:hover { background-color: rgba(36, 36, 36, 1); padding-left: 20px; }
.menu-item.current { background-color: rgba(36, 36, 36, 1); border-left: 4px solid var(--color-yellow); }
.menu-item-number { color: var(--color-yellow); font-weight: bold; min-width: 25px; }

/* ─── Video controls row ─── */
.video-controls { width: 100%; display: flex; justify-content: flex-start; gap: 0; }

/* ─── Buttons ─── */
button {
  padding: 0 20px;
  font-family: var(--font-family-dm-mono);
  font-size: 15px; font-weight: normal;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: none; cursor: pointer; transition: all 0.3s ease;
  height: calc((100vw - 40px) * 0.04);
  min-height: 40px; line-height: normal; margin: 0;
  flex-grow: 0; flex-shrink: 1;
}

#playButton { background-color: rgba(57, 57, 57, 1); color: var(--color-yellow); flex: 1; }
#playButton:hover:not(:disabled) { background-color: rgba(70, 70, 70, 1); }
#playButton:disabled { background-color: rgba(36, 36, 36, 1); color: rgba(115, 115, 115, 1); cursor: not-allowed; }

#menuButton { background-color: rgba(57, 57, 57, 1); color: var(--color-yellow); display: none; }
#menuButton.visible { display: block; }
#menuButton:hover { background-color: rgba(70, 70, 70, 1); }

/* ─── Right section ─── */
.right-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 64%;
}

@media (max-width: 1024px) {
  .right-section { width: 100%; flex: none; }
}

/* ─── Title bar ─── */
.textRectangle {
  width: 100%;
  height: calc((100vw - 40px) * 0.04);
  min-height: 40px;
  background-color: rgba(138, 138, 138, 1);
  padding: 0;
  display: flex;
  align-items: center;
  flex-grow: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.textRectangle p {
  margin: 0;
  color: white;
  font-family: var(--font-family-dm-mono);
  font-weight: 300;
  font-size: 19.43px;
  letter-spacing: 0.04em;
  line-height: 36.4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  background-color: rgba(0, 0, 0, 1);
  padding: 10px;
  margin-right: 8px;
  width: calc(100% - 8px);
}

#currentTitle { color: var(--text-white); }

.title-year {
  color: var(--text-muted);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 300;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .textRectangle { width: 100%; height: auto; }
}

/* ─── Content rectangle ─── */
.contentRectangle {
  width: 100%;
  flex: 1 1 auto;
  background-color: rgba(36, 36, 36, 1);
  overflow: hidden;
  padding: 0;
  position: relative;
}

.contentRectangle img { width: 100%; height: 100%; object-fit: cover; }
.contentRectangle iframe { width: 100%; height: 100%; border: none; }

.contentRectangle .html-content {
  padding: 20px; color: var(--text-white);
  font-family: var(--font-family-dm-mono);
  font-weight: 300; font-size: 15px; line-height: 27.4px;
  overflow-y: auto; height: 100%;
}

.contentRectangle .html-content h2 { display: none; }
.contentRectangle .html-content p { line-height: 1.6; }
.contentRectangle .html-content a { color: var(--color-yellow); text-decoration: underline; }
.contentRectangle .html-content a:hover { text-decoration: none; }

@media (max-width: 1024px) {
  .contentRectangle { width: 100%; height: auto; aspect-ratio: 16 / 9; flex: none; }
}

/* ─── Tabs ─── */
.tabs-container { width: 100%; height: 100%; display: flex; flex-direction: column; }

.tab-buttons {
  display: flex;
  background-color: rgba(0, 0, 0, 1);
  border-bottom: 1px solid rgba(138, 138, 138, 1);
}

.tab-button {
  flex: 1; padding: 10px;
  background: rgba(0, 0, 0, 1); color: var(--text-muted);
  border: none; cursor: pointer;
  font-family: var(--font-family-dm-mono);
  font-size: 15px; font-weight: normal;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: all 0.3s ease;
  border-right: 1px solid rgba(57, 57, 57, 1);
}
.tab-button:last-child { border-right: none; }
.tab-button.active { background: rgba(36, 36, 36, 1); color: var(--color-yellow); font-weight: bold; }
.tab-button:hover { background: rgba(36, 36, 36, 1); }

.tab-content { display: none; flex: 1; overflow-y: auto; }
.tab-content.active { display: block; }
.tab-content .html-content { padding: 20px; height: 100%; }
.tab-content iframe { width: 100%; height: 100%; }
