/* CSS Variables */
:root {
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-foreground: #ffffff;
  --background: #ffffff;
  --foreground: #171717;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --card: #fafafa;
  --card-border: #eeeeee;
  --radius: 0.5rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
}

.user-name {
  font-weight: 500;
}

.usage-badge, .pro-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.usage-badge {
  background: var(--muted);
  color: var(--muted-foreground);
}

.pro-badge {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
}

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

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}

.btn-ghost:hover {
  background: var(--muted);
  color: var(--foreground);
}

.btn-full {
  width: 100%;
}

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

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--muted) 0%, var(--background) 100%);
  padding: 3rem 0;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Search */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.1);
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.category-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: all 0.15s ease;
}

.category-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.category-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Personas Section */
.personas-section {
  padding: 2rem 0 4rem;
}

.personas-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .personas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .personas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .personas-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Persona Card */
.persona-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.persona-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.persona-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.persona-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.2), rgba(29, 78, 216, 0.1));
  color: var(--primary);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.persona-avatar.large {
  width: 5rem;
  height: 5rem;
  font-size: 1.5rem;
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.category-business { background: #dbeafe; color: #1e40af; }
.category-tech { background: #ede9fe; color: #6d28d9; }
.category-creative { background: #fce7f3; color: #be185d; }
.category-leadership { background: #fef3c7; color: #b45309; }
.category-philosophy { background: #e0e7ff; color: #4338ca; }
.category-science { background: #cffafe; color: #0e7490; }
.category-finance { background: #dcfce7; color: #15803d; }
.category-marketing { background: #ffedd5; color: #c2410c; }
.category-sports { background: #fee2e2; color: #b91c1c; }
.category-entertainment { background: #ffe4e6; color: #be123c; }

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

.persona-role {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.persona-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Persona Detail */
.persona-detail {
  padding: 2rem 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 2rem;
}

.back-link:hover {
  text-decoration: underline;
}

.persona-detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.persona-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.persona-content {
  max-width: 800px;
}

.persona-section {
  margin-bottom: 2rem;
}

.persona-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.principles-list {
  list-style: disc;
  padding-left: 1.5rem;
}

.principles-list li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

.prompt-box {
  background: var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.prompt-text {
  font-family: monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Upgrade Page */
.upgrade-section {
  padding: 4rem 0;
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
}

.upgrade-container {
  display: flex;
  justify-content: center;
}

.upgrade-card {
  max-width: 400px;
  text-align: center;
  padding: 2.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.upgrade-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.2), rgba(29, 78, 216, 0.1));
  color: var(--primary);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.upgrade-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.upgrade-subtitle {
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.upgrade-names {
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.pricing {
  margin-bottom: 1.5rem;
}

.price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
}

.period {
  font-size: 1rem;
  color: var(--muted-foreground);
}

.benefits-list {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.benefits-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}

.upgrade-card .btn {
  width: 100%;
  margin-bottom: 0.75rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact a {
  color: var(--primary);
  text-decoration: underline;
}

.footer-contact a:hover {
  color: var(--primary-hover);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: underline;
}

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