/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Theme - Linear/Vercel inspired */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --card-bg: #1c2128;
  --border-color: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  
  /* Accent Colors - Linear purple */
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);
  
  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Subtle background pattern */
  background-image: 
    radial-gradient(ellipse at top, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
}

/* Background noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

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

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

/* Quote Card */
.quote-container {
  text-align: center;
  width: 100%;
}

.quote-card {
  display: block;
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Subtle glow effect on hover */
.quote-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.quote-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--accent);
}

.quote-card:hover::before {
  opacity: 0.05;
}

.quote-card > * {
  position: relative;
  z-index: 1;
}

#quote-text {
  font-size: 1.625rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

#quote-author {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: normal;
  font-weight: 400;
}

#quote-author::before {
  content: "— ";
}

.hint {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Quote Detail */
.quote-detail {
  width: 100%;
  text-align: center;
}

.quote-detail blockquote {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quote-detail cite {
  display: block;
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-style: normal;
  margin-bottom: 2rem;
  font-weight: 400;
}

.quote-detail cite::before {
  content: "— ";
}

/* Actions */
.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn.primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn.primary:active {
  transform: translateY(0);
}

.btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn.secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Back Link */
#back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}

#back-link:hover {
  color: var(--text-primary);
}

/* Footer */
footer {
  padding: 1.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#quote-text:empty,
#quote-author:empty {
  animation: pulse 1.5s ease-in-out infinite;
  background: var(--bg-tertiary);
  border-radius: 0.25rem;
  color: transparent;
}

/* Quote icon decoration */
.quote-card::after {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.1;
  font-family: Georgia, serif;
}

/* Responsive */
@media (max-width: 640px) {
  #quote-text {
    font-size: 1.375rem;
  }
  
  .quote-card {
    padding: 2rem 1.5rem;
  }
  
  .quote-detail blockquote {
    font-size: 1.5rem;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .quote-card::after {
    font-size: 3rem;
    top: 0.5rem;
    left: 1rem;
  }
}
