/* CSS Variables */
:root {
  --bg-light: oklch(0.98 0.01 120);
  --bg-dark: oklch(0.15 0 0);
  --text-light: oklch(0.145 0 0);
  --text-dark: oklch(0.985 0 0);
  --primary: oklch(0.705 0 0);
  --primary-fg: oklch(0.985 0 0);
  --accent: oklch(0.708 0.15 280);
  --muted: oklch(0.97 0 0);
  --muted-fg: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);

  --font-sans: "Roboto", sans-serif;
  --font-serif: "Playwrite IT Trad", serif;
  --font-type: "Roboto Mono", sans-serif;
  --font-paragraph: "Delius", serif;
  --font-quote: "Walter Turncoat", cursive;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 
body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 1s ease, color 1s ease;
  overflow: hidden;
}

body.memo {
  overflow: auto;
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

#app {
  min-height: 100vh;
  position: relative;
}

#error.hidden { display: none; }
#app.hidden { display: none; }

p.quote {
  font-family: var(--font-quote);
}

.mine {
  color: var(--accent);
}
.hers {
  color: #ef4444;
}


p {
  font-family: var(--font-paragraph);
  padding-bottom: 20px;
  text-align: left;
}


/* Screen Styles */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  
}

.screen.active {
  visibility: visible;
  opacity: 1;
  transition: opacity 1s linear;
  pointer-events: auto;
}

.screen.inactive {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 1s, opacity 1s linear;
}

.screen-content {
  text-align: center;
  max-width: 48rem;
  width: 100%;
  color: #ccc;
}

/* Typography */
.title-large {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  /*margin-bottom: 3rem;*/
}

.title-large u {
 cursor: pointer;
}

.memo .title-large {
  font-family: var(--font-paragraph);
  margin-bottom: 40px;
}

h2.title-large {
  font-size: clamp(1rem, 2.5vw, 2rem);
}

.text-italic, .text-italic button {
  font-style: italic;
  font-family: var(--font-serif);
  line-height: 1.6;
}

.text-large {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--muted-fg);
}

body.dark-mode .text-large {
  color: var(--text-dark);
}

.text-link {
  background: none;
  border: none;
  color: var(--text-light);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  font-size: inherit;
  font-style: inherit;
  transition: color 0.3s ease;
}

body.dark-mode .text-link {
  color: var(--text-dark);
}

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

.chapter-title {
  font-family: var(--font-type);
  font-size: clamp(2.75rem, 4.5vw, 3.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

body.dark-mode .chapter-title {
  color: var(--text-dark);
}

.clickable {
  cursor: pointer;
}

.subtitle {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--muted-fg);
  margin-bottom: 3rem;
  text-align: center;
}

body.dark-mode .subtitle {
  color: var(--text-dark);
}

.typewriter {
  font-family: var(--font-type);
}

.typewriter-text {
  font-family: var(--font-type);
  color: var(--accent);
  position: relative;
}

.typewriter-text::after {
  content: "|";
  animation: blink 1s infinite;
  opacity: 0;
}

.typewriter-text.typing::after {
  opacity: 1;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Button Styles */
.btn {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 3rem;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-serif);
}

.btn-translate {
  background-color: var(--accent);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-accent {
  background-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  opacity: 0.9;
}

/* Translation Screen Styles */
.translation-screen {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.clock-header {
  text-align: center;
  margin-bottom: 1rem;
}

.clock-time {
  font-family: "Courier New", monospace;
  font-size: clamp(3rem, 6vw, 4rem);
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.clock-subtitle {
  font-size: 0.875rem;
  font-family: var(--font-serif);
  color: var(--muted-fg);
  font-style: italic;
  margin-top: 0.5rem;
}

body.dark-mode .clock-subtitle {
  color: var(--text-dark);
  opacity: 0.7;
}

.translation-box {
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.dark-mode .translation-box {
  background-color: oklch(0.25 0 0);
  border-color: oklch(0.35 0 0);
}

.translation-text {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-family: var(--font-serif);
  line-height: 1.6;
  color: var(--text-light);
  transition: opacity 1.5s ease;
}

body.dark-mode .translation-text.highlight {
  color: #ef4444;
}

body.dark-mode .translation-text {
  color: var(--text-dark);
}

.translation-text.fading {
  opacity: 0;
}

/* Screen 11 Styles */
.we-want-title {
  font-family: var(--font-type);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  margin-bottom: 2rem;
}

body.dark-mode .we-want-title {
  color: var(--text-dark);
}

.words-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.word-item {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.word-item .highlight {
  color: #ef4444;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s ease;
}

.word-item .highlight:hover {
  color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  .screen {
    padding: 1rem;
  }

  .btn {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
  }

  .translation-box {
    padding: 2rem;
  }
}
