/* RussellReads Book Store - Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #0f0f0f;
  --color-surface: #1a1a1a;
  --color-surface-light: #252525;
  --color-border: #333;
  --color-text: #f5f5f5;
  --color-text-muted: #888;
  --color-accent: #e8b923;
  --color-accent-light: #f5d35b;
  --color-accent-dark: #c99a10;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --font-display: 'Crimson Pro', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 185, 35, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.125rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--color-bg) 0%, #1a1510 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(232, 185, 35, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text {
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(232, 185, 35, 0.15);
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-books {
  display: flex;
  gap: -30px;
  perspective: 1000px;
}

.hero-book {
  width: 200px;
  height: 300px;
  background: var(--color-surface);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: rotateY(-10deg);
  transition: transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.hero-book:nth-child(2) {
  margin-left: -30px;
  transform: rotateY(-5deg) translateZ(20px);
}

.hero-book:hover {
  transform: rotateY(0) translateY(-10px);
}

.hero-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* Books Section */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.book-card {
  background: var(--color-surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.book-cover {
  aspect-ratio: 2/3;
  background: var(--color-surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-text-muted);
  position: relative;
  overflow: hidden;
}

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

.book-number {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.book-info {
  padding: 24px;
}

.book-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.book-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.book-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}

.book-price .current {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.book-price .format {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.book-actions {
  display: flex;
  gap: 12px;
}

.book-actions .btn {
  flex: 1;
}

/* Bundle Section */
.bundle-section {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.bundle-card {
  background: var(--color-bg);
  border-radius: 24px;
  padding: 48px;
  border: 2px solid var(--color-accent);
  position: relative;
  overflow: hidden;
}

.bundle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
}

.bundle-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 4px;
  margin-bottom: 24px;
}

.bundle-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.bundle-description {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 600px;
}

.bundle-books {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.bundle-book-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  padding: 16px;
  border-radius: 12px;
  flex: 1;
  min-width: 250px;
}

.bundle-book-cover {
  width: 60px;
  height: 90px;
  background: var(--color-surface-light);
  border-radius: 4px;
  flex-shrink: 0;
}

.bundle-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.bundle-book-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.bundle-book-info span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.bundle-pricing {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.bundle-price-item {
  display: flex;
  flex-direction: column;
}

.bundle-price-item .label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.bundle-price-item .original {
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-size: 1.25rem;
}

.bundle-price-item .discounted {
  color: var(--color-accent);
  font-size: 2rem;
  font-weight: 700;
}

.bundle-savings {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.bundle-format-select {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.format-option {
  flex: 1;
  padding: 16px 24px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.format-option:hover {
  border-color: var(--color-accent);
}

.format-option.active {
  border-color: var(--color-accent);
  background: rgba(232, 185, 35, 0.1);
}

.format-option .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.format-option .price {
  color: var(--color-accent);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Member Section */
.member-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.member-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.member-form {
  background: var(--color-bg);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.member-form h3 {
  margin-bottom: 8px;
}

.member-form p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.form-message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.member-benefits {
  list-style: none;
}

.member-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.member-benefits .icon {
  width: 48px;
  height: 48px;
  background: rgba(232, 185, 35, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-benefits .icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

.member-benefits h4 {
  margin-bottom: 4px;
}

.member-benefits p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Content Feed Section */
.content-section {
  background: var(--color-bg);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.content-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.content-card:hover {
  border-color: var(--color-accent);
}

.content-card .tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(232, 185, 35, 0.15);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 16px;
}

.content-card h4 {
  margin-bottom: 12px;
}

.content-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.content-card .date {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.content-locked {
  text-align: center;
  padding: 60px 40px;
  background: var(--color-surface);
  border-radius: 16px;
  border: 2px dashed var(--color-border);
}

.content-locked h4 {
  margin-bottom: 8px;
}

.content-locked p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Footer */
.footer {
  padding: 60px 0 30px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-logo span {
  color: var(--color-accent);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copyright {
  width: 100%;
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

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

.modal {
  background: var(--color-surface);
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--color-surface-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--color-accent);
  color: #000;
}

.modal-cover {
  aspect-ratio: 16/9;
  background: var(--color-surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px 24px 0 0;
}

.modal-cover img {
  max-height: 100%;
  max-width: 50%;
  object-fit: contain;
}

.modal-content {
  padding: 40px;
}

.modal-content h2 {
  margin-bottom: 8px;
}

.modal-content .subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.modal-content .description {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.modal-format-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Admin Panel */
.admin-panel {
  padding: 100px 0 60px;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.admin-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.admin-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.admin-tab.active {
  background: var(--color-accent);
  color: #000;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-table th {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tr:hover {
  background: var(--color-surface);
}

.admin-form {
  background: var(--color-surface);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 32px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.admin-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.published {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.status-badge.draft {
  background: rgba(136, 136, 136, 0.15);
  color: var(--color-text-muted);
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  background: var(--color-surface);
  padding: 48px;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--color-border);
}

.login-box h2 {
  text-align: center;
  margin-bottom: 32px;
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .hero h1 { font-size: 2.5rem; }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .member-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .bundle-card {
    padding: 32px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .modal-format-select {
    grid-template-columns: 1fr;
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }
}
