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

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #dc2626;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #1f2937;
  --light: #f9fafb;
  --border: #e5e7eb;
  --text: #374151;
  --text-light: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  padding: 20px;
  padding-bottom: 120px;
}

h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 24px;
  font-weight: 600;
  color: var(--dark);
}

p {
  margin: 10px 0;
  color: var(--text);
}

p#error {
  color: var(--danger);
  font-weight: bold;
}

#results {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: var(--shadow);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.card {
  max-width: 500px;
  margin: 40px auto;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  border-radius: 12px;
  background: white;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--light);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
  font-family: "Fira Code", monospace;
}

button {
  padding: 12px 24px;
  margin-top: 10px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card button {
  width: 100%;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.top-bar h2 {
  flex: 1;
  min-width: 200px;
  margin: 0;
  font-size: 28px;
  color: white;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
}

.admin-btn,
.home-btn {
  text-decoration: none;
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  color: var(--primary);
  padding: 10px 16px;
  border-radius: 8px;
  display: inline-block;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid white;
}

.admin-btn:hover,
.home-btn:hover {
  background: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark);
}
}

#results {
  background: white;
  padding: 28px;
  border-radius: 12px;
  margin-bottom: 28px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  animation: slideIn 0.4s ease-out;
}

#content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.timestamps {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 16px 20px;
  color: var(--text-light);
  font-size: 12px;
  border-top: 2px solid var(--border);
  background: white;
  margin: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.timestamps p {
  margin: 4px 0;
  font-weight: 500;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 8px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--danger);
  border-radius: 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  body {
    padding: 12px;
    padding-bottom: 100px;
  }

  .card {
    padding: 24px;
    margin: 30px auto;
    max-width: 100%;
  }

  h2 {
    font-size: 20px;
  }

  .top-bar {
    margin-bottom: 24px;
  }

  .top-bar h2 {
    font-size: 22px;
  }

  .admin-btn,
  .home-btn {
    padding: 10px 14px;
    font-size: 13px;
    flex-shrink: 0;
  }

  input,
  textarea {
    padding: 11px 12px;
    font-size: 16px;
  }

  .card button {
    padding: 11px 20px;
    font-size: 15px;
  }

  textarea {
    min-height: 120px;
  }

  #results,
  #content {
    padding: 20px;
    font-size: 18px;
  }

  .timestamps {
    font-size: 11px;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 8px;
    padding-bottom: 90px;
  }

  .card {
    padding: 20px;
    margin: 20px auto;
  }

  h2 {
    font-size: 18px;
  }

  .top-bar h2 {
    font-size: 18px;
  }

  .admin-btn,
  .home-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  input,
  textarea {
    padding: 10px 11px;
    font-size: 16px;
  }

  .card button {
    padding: 10px 16px;
    font-size: 14px;
    margin-top: 8px;
  }

  textarea {
    min-height: 100px;
  }

  #results,
  #content {
    padding: 16px;
    font-size: 16px;
  }

  .timestamps {
    font-size: 10px;
    padding: 10px 12px;
  }
}
