@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;700&family=Reddit+Mono&family=VT323&display=swap');

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #000;
  color: #fff;
  font-family: 'Reddit Sans', 'Urbanist', 'VT323', sans-serif;
  overflow-y: auto;
}

body {
  display: block;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 10px;
  box-sizing: border-box;
}

a {
  color: #EBFF00;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a:hover {
  background-color: #f0f0f0;
  color: #36013f;
}

#pageHeader {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 20px;
  padding: 10px;
  box-sizing: border-box;
  text-align: left;
}

#pageHeader h1 {
  margin-top: -20px;
  margin-bottom: 6px;
  font-size: 5rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  font-family: 'VT323', sans-serif;
  text-shadow: 2px 2px #000;
}

#pageHeader h1 .title-highlight {
  display: inline;
  box-shadow: inset 0 -0.4em 0 #EBFF00;
}

#pageHeader .subtitle {
  max-width: 900px;
  margin: 0 0 12px 0;
  font-family: 'Reddit Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #ccc;
}

#pageHeader .credit {
  margin-top: 24px;
  margin-bottom: 0;
  font-family: 'Reddit Mono', monospace;
  font-size: 0.75rem;
  color: #888;
}

#container {
  display: grid;
  grid-template-columns: 2fr 5fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "options textarea"
    "preview preview";
  gap: 24px;
  width: 100%;
  max-width: 1400px;
  min-height: 80vh;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

#options {
  grid-area: options;
  background-color: #111;
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  max-height: 80vh;
  font-size: 1.1rem;
  line-height: 1.4;
}

#toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

#toolbar button {
  background-color: #222;
  color: #EBFF00;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px 14px;
  font-weight: 700;
  font-family: 'Urbanist', sans-serif;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

#toolbar button:hover {
  background-color: #EBFF00;
  color: #000;
}

#toolbar button:focus {
  outline: 2px solid #EBFF00;
  outline-offset: 2px;
}

#textarea {
  grid-area: textarea;
  background-color: #111;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  max-height: 80vh;
}

#textarea textarea {
  flex-grow: 1;
  resize: none;
  font-size: 1rem;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #222;
  color: #eee;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Reddit Sans', sans-serif;
  min-height: 300px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

textarea, #output {
  font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', 'Symbola', 'Arial Unicode MS', monospace, sans-serif !important;
  font-size: 1rem;
  line-height: 1.5;
  color: #eee;
  background-color: #222;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #444;
  resize: none;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

#counter {
  margin-top: 10px;
  color: #aaa;
  font-size: 0.9rem;
  user-select: none;
}

#preview {
  grid-area: preview;
  background-color: #111;
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  font-family: 'Reddit Sans', sans-serif;
  font-size: 1rem;
  white-space: pre-wrap;
  line-height: 1.5;
  color: #eee;
}

#options label,
#options select,
#options input,
#options button {
  display: block;
  width: 100%;
  margin: 10px 0;
  font-size: 1.1rem;
  font-family: 'Urbanist', sans-serif;
  box-sizing: border-box;
}

#options select, 
#options input {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #222;
  color: #eee;
}

#options button {
  background-color: #EBFF00;
  border: none;
  color: #000;
  font-weight: 700;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
}

#options button:hover {
  background-color: #333;
  color: #EBFF00;
}

@media (max-width: 900px) {
  #container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "options"
      "textarea"
      "preview";
    max-height: none;
    gap: 16px;
  }

  #textarea textarea {
    min-height: 200px;
  }

  #options, #textarea, #preview {
    max-height: none;
  }

  #pageHeader {
    width: 100%;
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
    order: -1;
  }
}

#preview h2, #options h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.tweet-box {
  background-color: #222;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: text;
  white-space: pre-wrap;
  transition: background-color 0.3s ease;
  color: #eee;
}

.tweet-box:hover {
  background-color: #333;
}

.tweet-box.copied {
  background-color: #EBFF00;
  color: #000;
  font-weight: 700;
}

#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  margin-top: 10px;
  border-radius: 5px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
}
