/* =============================================================================
   GOY ZONE - Brutalist CSS
   Black (#000) and White (#FFF) only. No shadows. No gradients. No mercy.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS Reset
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* -----------------------------------------------------------------------------
   Typography - IBM Plex Mono
   ----------------------------------------------------------------------------- */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/static/fonts/IBMPlexMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -----------------------------------------------------------------------------
   Base Styles
   ----------------------------------------------------------------------------- */
body {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  background-color: #FFF;
  color: #000;
}

a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  background-color: #000;
  color: #FFF;
}

::selection {
  background-color: #000;
  color: #FFF;
}

/* -----------------------------------------------------------------------------
   Layout
   ----------------------------------------------------------------------------- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.container--narrow {
  max-width: 600px;
}

.container--wide {
  max-width: 1000px;
}

/* -----------------------------------------------------------------------------
   Brutalist Components
   ----------------------------------------------------------------------------- */

/* Box */
.box {
  border: 3px solid #000;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.box--inverted {
  background-color: #000;
  color: #FFF;
}

.box--inverted a {
  color: #FFF;
}

.box--inverted a:hover {
  background-color: #FFF;
  color: #000;
}

.box.box--fixed {
  height: 180px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
}

.box.box--fixed p {
  text-align: justify;
}

/* Header */
.header {
  border-bottom: 3px solid #000;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.header__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.header__nav {
  margin-top: 1rem;
}

.header__nav a {
  margin-right: 1.5rem;
  text-transform: uppercase;
  font-size: 0.875rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 3px solid #000;
  margin-bottom: 2rem;
}

.hero__title {
  font-size: 3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.hero__price {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Book Cover */
.book-cover {
  border: 3px solid #000;
  max-width: 300px;
  margin: 0 auto 2rem;
}

.book-cover img {
  width: 100%;
  height: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: 3px solid #000;
  background-color: #FFF;
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: none;
}

.btn:hover {
  background-color: #000;
  color: #FFF;
}

.btn--primary {
  background-color: #000;
  color: #FFF;
}

.btn--primary:hover {
  background-color: #FFF;
  color: #000;
}

.btn--large {
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
}

.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

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

/* Payment Options */
.payment-options {
  display: grid;
  gap: 1rem;
}

.payment-option {
  display: block;
  padding: 1.5rem;
  border: 3px solid #000;
  text-decoration: none;
  text-align: center;
}

.payment-option:hover {
  background-color: #000;
  color: #FFF;
}

.payment-option:hover .payment-option__icon svg {
  fill: #FFF;
}

.payment-option__icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.payment-option__icon svg {
  width: 28px;
  height: 28px;
  fill: #000;
  vertical-align: middle;
}

.payment-option__name {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.payment-option__desc {
  font-size: 0.875rem;
}

/* Invoice / QR Code */
.invoice {
  text-align: center;
}

.invoice__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.invoice__icon {
  display: inline-block;
}

.invoice__icon svg {
  width: 48px;
  height: 48px;
  fill: #000;
}

.invoice__qr {
  border: 3px solid #000;
  padding: 1rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  background-color: #FFF;
}

.invoice__qr img {
  width: 200px;
  height: 200px;
}

.invoice__address {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  word-break: break-all;
  padding: 1rem;
  border: 3px solid #000;
  margin-bottom: 1rem;
  background-color: #FFF;
}

.invoice__amount {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.invoice__status {
  padding: 1rem;
  border: 3px solid #000;
  font-weight: 700;
  text-transform: uppercase;
}

.invoice__status--pending {
  background-color: #FFF;
}

.invoice__status--paid {
  background-color: #000;
  color: #FFF;
}

/* Download Options */
.download-options {
  display: grid;
  gap: 1rem;
}

.download-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border: 3px solid #000;
}

.download-option__format {
  font-weight: 700;
  text-transform: uppercase;
}

.download-option__btn {
  padding: 0.5rem 1rem;
  border: 3px solid #000;
  background-color: #000;
  color: #FFF;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.download-option__btn:hover {
  background-color: #FFF;
  color: #000;
}

/* Download Counter */
.download-counter {
  text-align: center;
  padding: 1rem;
  border: 3px solid #000;
  margin-bottom: 1.5rem;
}

.download-counter__text {
  font-size: 0.875rem;
}

.download-counter__count {
  font-size: 2rem;
  font-weight: 700;
}

/* Section */
.section {
  margin-bottom: 3rem;
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 3px solid #000;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  border-top: 3px solid #000;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer__banner {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.footer__onion {
  margin-top: 1rem;
  font-size: 0.75rem;
  word-break: break-all;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 3px solid #000;
  background-color: #FFF;
  font-family: 'IBM Plex Mono', monospace;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  background-color: #000;
  color: #FFF;
}

label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Messages */
.message {
  padding: 1rem;
  border: 3px solid #000;
  margin-bottom: 1.5rem;
}

.message--error {
  background-color: #000;
  color: #FFF;
}

.message--success {
  border-width: 6px;
}

/* Loading Spinner (CSS only) */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #000;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.spinner--inverted {
  border-color: #FFF;
  border-top-color: transparent;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Blinking cursor effect */
.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Copy to clipboard button */
.copy-btn {
  padding: 0.25rem 0.5rem;
  border: 2px solid #000;
  background-color: #FFF;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-btn:hover {
  background-color: #000;
  color: #FFF;
}

.copy-btn--small {
  padding: 0.2rem 0.4rem;
  font-size: 0.65rem;
}

/* Tables (for admin) */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  border: 2px solid #000;
  text-align: left;
}

th {
  background-color: #000;
  color: #FFF;
  font-weight: 700;
  text-transform: uppercase;
}

tr:nth-child(even) {
  background-color: #f5f5f5;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-small { font-size: 0.875rem; }
.text-large { font-size: 1.25rem; }
.text-mono { font-family: 'IBM Plex Mono', monospace; }
.text-upper { text-transform: uppercase; }
.text-bold { font-weight: 700; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Paperback Mockup */
.paperback-mockup {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Book Covers Side by Side */
.book-covers {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
}

.book-covers__item {
  flex: 1;
  max-width: 48%;
  border: 2px solid #000;
  padding: 0;
  margin: 0;
}

.book-covers__item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Social Share Buttons */
.share-section {
  border-top: 2px solid #000;
  padding-top: 1.5rem;
}

.share-section__title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.share-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #000;
  background-color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  background-color: #000;
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: #000;
  display: block;
}

.share-btn:hover svg {
  fill: #FFF;
}

.copy-link-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border: 2px solid #000;
  background-color: #FFF;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
}

.copy-link-btn:hover {
  background-color: #000;
  color: #FFF;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__price {
    font-size: 1.5rem;
  }

  .btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .book-cover {
    max-width: 200px;
  }

  .book-covers {
    flex-direction: column;
    align-items: center;
  }

  .book-covers__item {
    max-width: 80%;
  }
}
