/* Enhanced library styles - consistent with reader.css */
:root {
  /* Modern, kid-friendly color scheme - light by default */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #8b8cf8;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #f1f5f9;
  --bg-hover: #f1f5f9;
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  
  --focus: #6366f1;
  --radius: 12px;
  --radius-lg: 16px;
  
  color-scheme: light;
}

/* Dark mode */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: #a5b1ff;
  --accent: #fbbf24;

  --bg-main: #0d1422;
  --bg-card: #162133;
  --bg-sidebar: #142030;
  --bg-hover: #223146;

  --text-primary: #f1f5f9;
  --text-secondary: #c7d2e2;
  --text-muted: #8fa2b8;

  --border: #27374b;
  --border-light: #32465d;

  --shadow-sm: 0 1px 2px -1px rgba(0,0,0,0.8);
  --shadow-md: 0 4px 10px -2px rgba(0,0,0,0.65);
  --shadow-lg: 0 12px 28px -4px rgba(0,0,0,0.7);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg-main);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

/* Back Link */
.back-to-site {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.back-to-site:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.back-to-site:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

.back-to-site:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.back-arrow {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 740px) {
  .back-text {
    display: none;
  }
  .back-to-site {
    padding: 0.5rem;
    border-radius: var(--radius);
    top: 0.75rem;
    left: 0.75rem;
  }
}

/* Header */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  padding: 1rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  width: 48px;
  height: 48px;
  background: var(--gradient-purple);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.logo-badge svg {
  width: 28px;
  height: 28px;
  color: white;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-title {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 900;
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-primary);
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Header Controls */
.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Auth Button */
.auth-button {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-button:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.auth-button.authed {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.auth-button.authed:hover {
  background: #0a966a;
  border-color: #0a966a;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

/* Search */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  padding-right: 2.5rem;
  border-radius: var(--radius);
  width: 220px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  width: 280px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-toggle {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-toggle:hover {
  color: var(--primary);
}

.filter-toggle svg {
  width: 18px;
  height: 18px;
}

/* Filter Panel */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0 auto;
  max-width: 1400px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-panel.active {
  max-height: 300px;
  padding: 1rem;
  margin-top: 0.5rem;
  opacity: 1;
  pointer-events: auto;
}

.filter-section {
  flex: 1;
  min-width: 200px;
}

.filter-heading {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.sort-select {
  appearance: none;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Main Content */
.library-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

.library-header {
  margin-bottom: 2rem;
  text-align: center;
}

#libraryHeading {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

#libraryHeading::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-purple);
  border-radius: 2px;
}

.library-subtitle {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Recent Reading Section */
.recent-reading {
  margin-bottom: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.section-title {
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.recent-books {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-sidebar);
}

.recent-books::-webkit-scrollbar {
  height: 8px;
}

.recent-books::-webkit-scrollbar-track {
  background: var(--bg-sidebar);
  border-radius: 4px;
}

.recent-books::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.recent-books .book-card {
  min-width: 200px;
  max-width: 200px;
}

/* All Books Section */
.collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.results-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

@media (max-width: 640px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
}

/* Book Cards */
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.book-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.cover-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.book-cover.error {
  display: none;
}

.cover-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  font-family: 'Crimson Text', serif;
}

.cover-fallback::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.cover-fallback > * {
  position: relative;
  z-index: 2;
}

.cover-fallback.show {
  display: flex;
}

.cover-fallback-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  color: #ffffff;
}

.cover-fallback-author {
  font-size: 0.8rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  color: #ffffff;
  opacity: 0.95;
}

.cover-fallback-icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.book-card:hover .book-cover {
  transform: scale(1.05);
}

.book-card:hover .cover-fallback {
  transform: scale(1.05);
  transition: transform 0.6s ease;
}

.book-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.book-card:hover .book-ribbon {
  transform: translateX(0);
  opacity: 1;
}

.book-meta {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.book-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.book-author {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.book-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--bg-sidebar);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  gap: 0.25rem;
}

.tag.lang {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.tag.level {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

.tag.progress {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.book-progress {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-track {
  height: 6px;
  background: var(--bg-sidebar);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-purple);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.read-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateY(8px);
}

.book-card:hover .read-button {
  opacity: 1;
  transform: translateY(0);
}

.read-button:hover {
  background: var(--primary-hover);
}

/* Footer */
.app-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section p {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.footer-section small {
  color: var(--text-muted);
}

.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;
}

/* Auth Dialog */
.auth-dialog::backdrop {
  background: rgba(0,0,0,0.55);
}

.auth-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 380px;
  width: 90vw;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.75rem;
}

.auth-form h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
}

.auth-intro {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.auth-input {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

.auth-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-submit, .auth-cancel {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background 0.2s ease;
}

.auth-cancel {
  background: var(--bg-sidebar);
  color: var(--text-secondary);
}

.auth-submit:hover { background: var(--primary-hover); }
.auth-cancel:hover { background: var(--bg-hover); }

.auth-hint {
  margin: 0;
  font-size: 0.7rem;
  color: var(--danger);
  min-height: 1em;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }
  
  .header-controls {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
  }
  
  .search-input {
    width: 100%;
  }
  
  .search-input:focus {
    width: 100%;
  }
  
  .filter-panel {
    flex-direction: column;
    gap: 1rem;
  }
  
  .library-main {
    padding: 1.5rem 1rem;
  }
  
  .recent-books {
    padding-bottom: 1rem;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Educational Use Disclaimer Modal */
.disclaimer-dialog::backdrop {
  background: rgba(0,0,0,0.6);
}

.disclaimer-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 600px;
  width: 95vw;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.disclaimer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 2rem 1.5rem;
}

.disclaimer-content h2 {
  margin: 0;
  font-size: 1.5rem;
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}

.disclaimer-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.disclaimer-body p {
  margin: 0;
  color: var(--text-primary);
}

.disclaimer-body p:first-child {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.disclaimer-body strong {
  color: var(--primary);
  font-weight: 700;
}

.disclaimer-body ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.disclaimer-body li {
  margin-bottom: 0.5rem;
}

.disclaimer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.disclaimer-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.disclaimer-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.disclaimer-buttons {
  display: flex;
  gap: 0.75rem;
}

.disclaimer-accept, .disclaimer-decline {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.disclaimer-accept {
  background: var(--success);
  color: white;
}

.disclaimer-accept:hover {
  background: #059669;
  transform: translateY(-1px);
}

.disclaimer-decline {
  background: var(--danger);
  color: white;
}

.disclaimer-decline:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.disclaimer-accept:focus, .disclaimer-decline:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
}

/* Mobile responsiveness for disclaimer */
@media (max-width: 768px) {
  .disclaimer-content {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  
  .disclaimer-content h2 {
    font-size: 1.25rem;
  }
  
  .disclaimer-body {
    font-size: 0.9rem;
  }
  
  .disclaimer-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .disclaimer-checkbox {
    justify-content: center;
  }
  
  .disclaimer-buttons {
    width: 100%;
  }
  
  .disclaimer-accept, .disclaimer-decline {
    flex: 1;
  }
}
