/* ========================================
   PLAGUEBIN - Enhanced High-Contrast Theme
   ======================================== */

/* Root Variables */
:root {
  --bg-primary: #000;
  --bg-secondary: #0a0a0a;
  --bg-elevated: #111;
  --fg-primary: #fff;
  --fg-secondary: #e0e0e0;
  --fg-muted: #999;
  --accent: #fff;
  --accent-hover: #f0f0f0;
  --border: #333;
  --border-bright: #666;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(255, 255, 255, 0.05);
  --shadow-md: 0 4px 6px rgba(255, 255, 255, 0.08);
  --shadow-lg: 0 10px 20px rgba(255, 255, 255, 0.12);
  --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.15);
}

/* ========================================
   Base Styles
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--fg-primary);
  color: var(--bg-primary);
}

::-moz-selection {
  background: var(--fg-primary);
  color: var(--bg-primary);
}

/* ========================================
   Navigation
   ======================================== */

nav.navbar {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.95);
}

nav.navbar a {
  color: var(--fg-secondary);
  margin: 0 1.5rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  position: relative;
  padding: 0.5rem 0;
}

nav.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--fg-primary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

nav.navbar a:hover {
  color: var(--fg-primary);
}

nav.navbar a:hover::after {
  width: 100%;
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    margin: 2rem auto;
    padding: 1rem;
  }
}

/* ========================================
   Logo
   ======================================== */

.logo {
  width: 100px;
  height: 100px;
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(var(--shadow-md));
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.logo:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(var(--shadow-glow));
}

/* ========================================
   Typography
   ======================================== */

h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

p {
  margin-bottom: 1rem;
  color: var(--fg-secondary);
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Buttons
   ======================================== */

button {
  background: transparent;
  color: var(--fg-primary);
  border: 2px solid var(--accent);
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  font-family: inherit;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--fg-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
  z-index: -1;
}

button:hover {
  color: var(--bg-primary);
  border-color: var(--fg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:hover::before {
  width: 300%;
  height: 300%;
}

button:active {
  transform: translateY(0);
}

button:focus-visible {
  outline: 2px solid var(--fg-primary);
  outline-offset: 4px;
}

/* ========================================
   Form Elements
   ======================================== */

textarea {
  width: 100%;
  min-height: 350px;
  background: var(--bg-elevated);
  color: var(--fg-primary);
  border: 2px solid var(--border);
  padding: 1.25rem;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  border-radius: var(--radius-md);
  resize: vertical;
  margin-top: 1.5rem;
  transition: all var(--transition-base);
}

textarea:hover {
  background: var(--bg-secondary);
  border-color: var(--border-bright);
}

textarea:focus {
  outline: none;
  border-color: var(--fg-primary);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-glow);
}

textarea::placeholder {
  color: var(--fg-muted);
  opacity: 0.6;
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  color: var(--fg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  transition: all var(--transition-base);
  font-family: inherit;
  font-size: 1rem;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover {
  background: var(--bg-secondary);
  border-color: var(--border-bright);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--fg-primary);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

/* Checkboxes & Labels */
label {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-base);
}

label:hover {
  color: var(--fg-primary);
}

input[type="checkbox"] {
  cursor: pointer;
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  accent-color: var(--fg-primary);
}

/* Form Controls */
.form-controls {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .form-controls {
    flex-direction: column;
  }
  
  .form-controls button {
    width: 100%;
  }
}

/* Expiration Input */
.expiration-input {
  width: 140px !important;
  padding: 0.5rem 0.75rem !important;
  background: var(--bg-elevated) !important;
  border: 2px solid var(--border) !important;
  color: var(--fg-primary) !important;
  border-radius: var(--radius-sm) !important;
  margin: 0 !important;
  font-size: 0.875rem !important;
  transition: all var(--transition-base) !important;
}

.expiration-input:hover {
  border-color: var(--border-bright) !important;
  background: var(--bg-secondary) !important;
}

.expiration-input:focus {
  outline: none !important;
  border-color: var(--fg-primary) !important;
  background: var(--bg-secondary) !important;
}

/* ========================================
   Drop Zone
   ======================================== */

#drop-zone {
  border: 3px dashed var(--border);
  padding: 3rem 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
}

#drop-zone:hover,
#drop-zone.drag-over {
  background: var(--bg-elevated);
  border-color: var(--fg-primary);
  border-style: solid;
  box-shadow: var(--shadow-glow);
}

#drop-zone p {
  font-size: 1.1rem;
  color: var(--fg-secondary);
  margin: 0 auto;
  text-align: center;
  width: 100%;
  display: block;
  transition: color var(--transition-base);
}

#drop-zone:hover p {
  color: var(--fg-primary);
}

/* ========================================
   Back Button
   ======================================== */

#back-button {
  background: none;
  border: none;
  color: var(--fg-secondary);
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#back-button:hover {
  color: var(--fg-primary);
  transform: translateX(-4px);
}

#back-button:focus-visible {
  outline: 2px solid var(--fg-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* ========================================
   Modal
   ======================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 1000;
}

.modal[style*="display: block"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-primary);
  border: 2px solid var(--border-bright);
  padding: 2.5rem;
  width: 90%;
  max-width: 450px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideUp var(--transition-slow);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.modal-content input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  color: var(--fg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  transition: all var(--transition-base);
}

.modal-content input:focus {
  outline: none;
  border-color: var(--fg-primary);
  background: var(--bg-secondary);
}

/* ========================================
   Footer
   ======================================== */

footer.footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 2px solid var(--border);
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-top: 4rem;
}

footer.footer a {
  color: var(--fg-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

footer.footer a:hover {
  color: var(--fg-primary);
  text-decoration: underline;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeInDown {
  animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate__fadeIn {
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--fg-muted);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 6px;
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-muted);
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--fg-primary);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
