/* Import clean fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Dark Gray Theme Variables */
  --bg-body: #0a0a0a;       /* Very dark charcoal (almost black) */
  --bg-card: #171717;       /* Matte dark gray card */
  --bg-input: #0a0a0a;      /* Input background */
  
  --text-main: #ededed;     /* High contrast white */
  --text-muted: #888888;    /* Muted gray */
  
  --border: #333333;        /* Subtle dark borders */
  --focus-ring: #555555;    /* Focus state */
  
  --primary: #ededed;       /* White for primary buttons */
  --primary-text: #000000;  /* Black text on primary buttons */
  
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  
  /* Browser UI preferences */
  color-scheme: dark;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Aligns content near top */
  box-sizing: border-box;
}

/* Central Container */
.main-wrapper {
  width: 100%;
  max-width: 800px;
  margin-top: 4vh;
}

/* Card Styling */
.content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

/* Brand Header */
.brand-header {
  text-align: center;
  margin-bottom: 30px;
}

.brand-header a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Textarea / Inputs */
textarea {
  width: 100%;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  min-height: 400px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

textarea:focus {
  border-color: var(--text-muted);
}

/* Scrollbar Styling */
textarea::-webkit-scrollbar {
  width: 10px;
}
textarea::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-top: 20px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #ffffff; /* Brighter white on hover */
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 8px 16px;
}

.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* Paste View */
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.meta-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.viewer-content {
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  font-family: 'JetBrains Mono', monospace;
  color: #c9d1d9; /* Standard dark mode code color */
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Actions */
.actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.footer-simple {
  text-align: center;
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* QR Modal */
.qr-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Darker overlay */
  backdrop-filter: blur(4px);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.qr-modal.active { display: flex; }

.qr-box {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
}

.qr-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.qr-close:hover { color: var(--text-main); }

/* QR Code Image specific styling for dark mode */
#qrcode img {
  border: 10px solid white; /* Need white border to make QR readable on dark bg */
  border-radius: 4px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ededed;
  color: black;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.toast.visible { opacity: 1; }

/* Responsive */
@media (max-width: 600px) {
  body { padding: 10px; }
  .content-card { padding: 25px; }
  .actions { flex-direction: column; }
  .btn-outline { width: 100%; }
}

/* HighlightJS Overrides for cleaner look */
pre code.hljs {
  padding: 0;
  background: transparent;
}