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

:root {
  --primary-color: #f59e0b;
  --primary-hover: #d97706;
  --secondary-color: #8b5cf6;
  --accent-color: #10b981;
  --background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #ddd6fe 100%);
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--background);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

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

.nav-tools select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
}

.ad-banner {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.ad-banner.top {
  border-bottom: 1px solid var(--border);
}

.ad-banner.bottom {
  border-top: 1px solid var(--border);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.main-content {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 2rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.ad-sidebar {
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  border-radius: 8px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.quote-display {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.quote-text {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
  animation: fadeIn 0.5s ease-in;
}

.quote-tag {
  font-size: 0.875rem;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn.primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn.secondary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn.tertiary {
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn.tertiary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn.favorite {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn.favorite:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn.favorite.active {
  background: linear-gradient(135deg, #db2777, #be185d);
}

.btn.share {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn.share:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.share-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-width: 400px;
  width: 90%;
  display: none;
}

.share-menu.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

.share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.share-overlay.active {
  display: block;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.share-option {
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.share-option:hover {
  border-color: var(--primary-color);
  background: #fffbeb;
}

.share-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.favorites-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.favorites-header h3 {
  color: var(--text);
}

.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.favorite-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
}

.favorite-item .quote-text {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.favorite-item .quote-tag {
  font-size: 0.75rem;
}

.favorite-item .remove-favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.favorite-item .remove-favorite:hover {
  color: #ef4444;
}

.no-favorites {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

.no-favorites.hidden {
  display: none;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.8);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

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

.page-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.page-content h1 {
  margin-bottom: 2rem;
  color: var(--text);
}

.page-content h2 {
  margin: 2rem 0 1rem;
  color: var(--text);
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.page-content ol {
  margin-left: 1.5rem;
  color: var(--text-secondary);
}

.page-content li {
  margin-bottom: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.page-section {
  padding: 4rem 0;
}

.contact-section {
  margin-top: 2rem;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.qr-card {
  text-align: center;
  padding: 1.5rem;
  background: #fef3c7;
  border-radius: 12px;
}

.qr-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.qr-card h3 {
  font-size: 1rem;
  color: var(--text);
}

.email-contact {
  text-align: center;
  padding: 1rem;
  background: #fef3c7;
  border-radius: 12px;
}

.email-contact a {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .quote-section {
    padding: 1.5rem;
  }
  .quote-text {
    font-size: 1.25rem;
  }
  .quote-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .favorites-list {
    grid-template-columns: 1fr;
  }
}
