/* ══════════════════════════════════════════
   PDF Summarizer · pdf-styles.css
   Paleta: Azul profundo #2A52A8
══════════════════════════════════════════ */

:root {
  --bg: #F0F4FC;
  --bg-card: #FFFFFF;
  --bg-card2: #F7F9FE;
  --ink: #0D1B3E;
  --ink-soft: #4A5878;
  --ink-muted: #9AA3B8;
  --accent: #2A52A8;
  --accent-light: #E8EEFF;
  --accent-hover: #1E3D80;
  --premium: #1B6B3A;
  --premium-bg: #E8F5EE;
  --border: #D8E0F0;
  --border-focus: #2A52A8;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 2px 20px rgba(13, 27, 62, 0.07);
  --shadow-lg: 0 8px 40px rgba(13, 27, 62, 0.12);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

.screen {
  display: none;
}

.screen.active {
  display: flex;
}

#auth-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(42, 82, 168, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(42, 82, 168, 0.05) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeUp 0.5s ease both;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.brand-icon {
  font-size: 22px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-note {
  font-size: 12px;
  color: var(--ink-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-google {
  background: var(--bg-card);
  color: var(--ink);
  border: 1.5px solid var(--border);
  width: 100%;
}

.btn-google:hover {
  border-color: #4285F4;
  background: #F0F4FF;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
  width: 100%;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 13px 28px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42, 82, 168, 0.3);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
  font-size: 13px;
  padding: 9px 18px;
  margin-top: 8px;
}

.btn-ghost:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.btn-premium {
  background: var(--premium);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-premium:hover {
  background: #145230;
  transform: translateY(-1px);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.btn-icon:hover {
  color: var(--ink);
  background: var(--border);
}

.btn-icon-sm {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition);
}

.btn-icon-sm:hover {
  color: var(--ink);
  background: var(--border);
}

#app-screen {
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 244, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-sm .brand-name {
  font-size: 19px;
}

.brand-sm .brand-icon {
  font-size: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
}

.usage-badge.premium {
  background: var(--premium-bg);
  color: var(--premium);
}

.app-main {
  flex: 1;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  margin-bottom: 8px;
  animation: fadeUp 0.5s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 12px;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 480px;
  line-height: 1.6;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeUp 0.4s ease both;
}

.upload-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-inner {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.upload-inner.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-icon {
  font-size: 48px;
}

.upload-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
}

.upload-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.upload-limit {
  font-size: 12px;
  color: var(--ink-muted);
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-light);
  border: 1px solid rgba(42, 82, 168, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.file-icon {
  font-size: 24px;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.file-size {
  font-size: 12px;
  color: var(--ink-muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-count {
  font-size: 12px;
  color: var(--ink-muted);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.spinner {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s ease-in-out infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  40% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

.loading-text {
  font-size: 14px;
  color: var(--ink-soft);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-card {
  padding: 24px;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.result-icon {
  font-size: 20px;
}

.result-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}

.result-content {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  white-space: pre-wrap;
}

.limit-banner {
  background: var(--premium-bg);
  border: 1.5px solid #B8DEC9;
  border-radius: var(--radius);
  padding: 20px 24px;
  animation: fadeUp 0.3s ease both;
}

.limit-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.limit-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.limit-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--premium);
  margin-bottom: 2px;
}

.limit-sub {
  font-size: 13px;
  color: #4A8A68;
}

.error-banner {
  background: #FFF3F0;
  border: 1.5px solid #FFB8A8;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #8B2A1A;
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}

.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 600px) {
  .auth-card {
    padding: 36px 24px;
  }

  .app-main {
    padding: 32px 16px 60px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .limit-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .btn-primary {
    width: 100%;
  }
}