@font-face {
  font-family: 'GT Maru';
  src: url('/public/fonts/GT-Maru-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'GT Maru';
  src: url('/public/fonts/GT-Maru-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'GT Maru Emoji';
  src: url('/public/fonts/GT-Maru-Emoji-Color.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

:root {
  --pink: #ff69b4;
  --teal: #20b2aa;
  --bg: #fafafa;
  font-family: 'GT Maru Emoji', 'GT Maru', system-ui, -apple-system, sans-serif;
}

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

body {
  background: var(--bg);
  min-height: 100vh;
  padding: 2rem;
}

main {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border: 2px solid black;
  padding: 2rem;
}

h1 {
  font-family: 'GT Maru Emoji', 'GT Maru', system-ui;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.instructions {
  text-align: center;
  padding: 1rem;
  margin-bottom: 2rem;
  background: #f5f5f5;
  border: 2px solid black;
}

.instructions p {
  margin: 0;
  line-height: 1.5;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 1rem;
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.camera-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.video-preview, .gif-preview {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background: #f5f5f5;
  border: 2px solid black;
  overflow: hidden;
  object-fit: cover;
}

.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  font-weight: 700;
  color: var(--pink);
  z-index: 10;
  pointer-events: none;
}

.camera-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.chat-input {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.text-input {
  font-size: 1rem;
  padding: 0.75rem;
  border: 2px solid black;
  font-family: inherit;
  resize: none;
  width: 100%;
}

.text-input:focus {
  outline: none;
  border-color: var(--pink);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-to-bluesky {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.post-to-bluesky input[type="checkbox"] {
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
}

.char-count {
  font-size: 0.85rem;
  color: #666;
}

.button {
  padding: 0.75rem 1.5rem;
  background: white;
  color: black;
  border: 2px solid black;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.button:hover:not(:disabled) {
  background: var(--teal);
  color: white;
}

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

.button-primary {
  background: var(--pink);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: var(--teal);
}

.warning {
  padding: 1rem;
  background: #fff9db;
  border: 2px solid #ffeb3b;
  color: #333;
  font-weight: 700;
  text-align: center;
}

.auth-section {
  padding: 1.5rem;
  background: #f5f5f5;
  border: 2px solid black;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info span {
  font-weight: 700;
  color: var(--pink);
}

.messages-section {
  margin-top: 2rem;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  background: #f5f5f5;
  border: 2px solid black;
  min-height: 200px;
}

.messages:empty::after {
  content: "No messages yet. Be the first to chat!";
  display: block;
  text-align: center;
  color: #999;
  padding: 2rem;
}

.message {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 2px solid black;
}

.message-gif {
  width: 200px;
  height: 150px;
  border: 2px solid black;
  object-fit: cover;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-text {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.message-time {
  font-size: 0.85rem;
  color: #666;
}

.message-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.message-handle {
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}

.message-handle:hover {
  text-decoration: underline;
}

.message-did {
  color: #666;
  font-family: monospace;
  font-size: 0.85rem;
  text-decoration: none;
}

.message-did:hover {
  text-decoration: underline;
}