:root {
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.3);
  
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-hover-bg: rgba(255, 255, 255, 0.9);
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.theme-gold {
  --bg-gradient-start: #fffbeb;
  --bg-gradient-end: #fef3c7;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.3);
}

body.theme-ultra {
  --bg-gradient-start: #000000;
  --bg-gradient-end: #1a0024;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent: #d946ef;
  --accent-hover: #c026d3;
  --accent-glow: rgba(217, 70, 239, 0.6);
  
  --panel-bg: rgba(10, 10, 20, 0.9);
  --panel-border: rgba(217, 70, 239, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(217, 70, 239, 0.15);
  
  --card-bg: rgba(20, 10, 30, 0.7);
  --card-hover-bg: rgba(40, 20, 60, 0.9);
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

body.theme-ultra .site-header h1 {
  background: linear-gradient(to right, #e879f9, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

body.theme-ultra .logo {
  filter: drop-shadow(0 0 8px rgba(217, 70, 239, 0.8));
}

body.theme-ultra .plan-card.ultra {
  border: 2px solid #d946ef;
  box-shadow: 0 0 30px rgba(217, 70, 239, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-sponsor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
}

/* On mobile, hide the sponsor in header to save space, or stack it */
@media (max-width: 768px) {
  .header-sponsor {
    display: none;
  }
}

.sponsor-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.sponsor-name {
  color: #3b82f6;
  font-weight: 700;
  text-decoration: none;
}

.sponsor-name:hover {
  text-decoration: underline;
}

.logo { 
  font-size: 1.75rem; 
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.plan-badge {
  padding: 0.35rem 0.85rem;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.plan-badge.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.plan-badge.ultra {
  background: linear-gradient(135deg, #d946ef, #a855f7);
  color: white;
  border: none;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.5);
  animation: pulse-glow 2s infinite;
}

body.theme-ultra .msg.assistant .bubble {
  background: rgba(30, 0, 40, 0.8);
  border: 1px solid #d946ef;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.3);
  color: #f8fafc;
  backdrop-filter: blur(4px);
}

body.theme-ultra .msg.user .bubble {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  border: none;
}

.nav-btn {
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary);
}

#loginBtn {
  background: var(--text-primary);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#loginBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
  background: #0f172a;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 2rem;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 150px);
}

/* Search Panel */
.search-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.5s ease-out;
}

#searchInput {
  width: 100%;
  padding: 1.25rem 2rem;
  font-size: 1.25rem;
  border: 2px solid transparent;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: scale(1.01);
}

.quick-topics {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  background: white;
  border: 1px solid var(--panel-border);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.chip:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px var(--accent-glow);
}

/* Content Grid */
.content {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform 0.3s;
}

/* Results Column */
#results {
  height: 650px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.6s ease-out;
}

.results-header {
  display: flex;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.5);
}

.tab {
  flex: 1;
  background: none;
  border: none;
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: linear-gradient(to bottom, transparent, rgba(37, 99, 235, 0.05));
}

#localResults, #webResults {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) transparent;
}

.result-item {
  padding: 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1rem;
  background: var(--card-bg);
  border: 1px solid transparent;
}

.result-item:hover {
  background: var(--card-hover-bg);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--panel-border);
}

.result-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.result-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.result-summary {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Detail */
.article-detail {
  padding: 3rem;
  min-height: 650px;
  animation: fadeIn 0.7s ease-out;
  background: rgba(255, 255, 255, 0.9);
}

.article-title {
  margin-top: 0;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.article-meta {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--panel-border);
  font-size: 1rem;
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #334155;
}

.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.6;
}

/* Chat Section */
.chat {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  height: 600px;
  animation: fadeIn 0.8s ease-out;
}

.chat-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
}

.chat-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.msg {
  max-width: 85%;
  padding: 1.25rem;
  border-radius: 16px;
  line-height: 1.6;
  position: relative;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease-out;
}

.msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.msg.assistant {
  align-self: flex-start;
  background: white;
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--panel-border);
}

.chat-input {
  padding: 1.5rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

#chatInput {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1rem;
  resize: none;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s;
  background: white;
}

#chatInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

button {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

button:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#chatSend {
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 4px 6px var(--accent-glow);
}

#chatSend:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--accent-glow);
}

/* Pricing Overlay - Animated Background */
@keyframes meshGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.pricing-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(-45deg, #0f172a, #1e293b, #0f172a, #312e81);
  background-size: 400% 400%;
  animation: meshGradient 15s ease infinite;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pricing-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Glassmorphism Content Box */
.pricing-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3.5rem;
  border-radius: 40px;
  max-width: 1200px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5), 
              inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(40px) perspective(1000px) rotateX(10deg);
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: auto;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-overlay.active .pricing-content {
  transform: scale(1) translateY(0) perspective(1000px) rotateX(0deg);
}

/* Typography Effects */
.pricing-content h2 {
  margin: 0 0 1rem 0;
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pricing-sub {
  color: #94a3b8;
  margin-bottom: 4rem;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Card Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
  perspective: 1000px;
}

/* Fancy Card Styles */
.plan-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 3rem 2rem;
  text-align: left;
  position: relative;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(20px);
  animation: float 6s ease-in-out infinite;
  animation-play-state: paused;
}

/* Staggered Entrance Animation */
.pricing-overlay.active .plan-card {
  opacity: 1;
  transform: translateY(0);
}

.pricing-overlay.active .plan-card:nth-child(1) { transition-delay: 0.1s; }
.pricing-overlay.active .plan-card:nth-child(2) { transition-delay: 0.2s; }
.pricing-overlay.active .plan-card:nth-child(3) { transition-delay: 0.3s; }
.pricing-overlay.active .plan-card:nth-child(4) { transition-delay: 0.4s; }

.plan-card:hover {
  transform: translateY(-15px) scale(1.03) rotateX(5deg);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 59, 0.7);
  z-index: 10;
  animation-play-state: running;
}

/* Featured Card (Premium) */
.plan-card.featured {
  border: 2px solid rgba(59, 130, 246, 0.5);
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.4), rgba(30, 41, 59, 0.6));
  box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
}

.plan-card.featured:hover {
  transform: translateY(-15px) scale(1.05) rotateX(5deg);
  box-shadow: 0 40px 80px -15px rgba(37, 99, 235, 0.4),
              0 0 30px rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
}

/* Gold Card */
.plan-card.gold {
  border: 2px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.3), rgba(30, 41, 59, 0.6));
  box-shadow: 0 25px 50px -12px rgba(245, 158, 11, 0.2);
}

.plan-card.gold:hover {
  transform: translateY(-15px) scale(1.05) rotateX(5deg);
  box-shadow: 0 40px 80px -15px rgba(245, 158, 11, 0.4),
              0 0 40px rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

/* Plan Name Styling */
.plan-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #f8fafc;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Features List */
.plan-features {
  color: #cbd5e1;
  font-size: 1rem;
}

.plan-features li {
  margin-bottom: 0.8rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.3s;
}

.plan-card:hover .plan-features li:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

/* Button Styling */
.plan-btn {
  width: 100%;
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.plan-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.plan-btn:hover::before {
  left: 100%;
}

.plan-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.plan-card.featured .plan-btn {
  background: #2563eb;
  border: none;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.plan-card.featured .plan-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
}

.plan-card.gold .plan-btn {
  background: linear-gradient(135deg, #d97706, #b45309);
  border: none;
  box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.4);
}

.plan-card.gold .plan-btn:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.6);
  transform: translateY(-2px);
}

/* AI Art Studio Styles */
.art-box {
  width: 90%;
  max-width: 800px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
}

.art-box .login-header {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.art-display {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  gap: 2rem;
  scroll-behavior: smooth;
  min-height: 0; /* Important for flex child scrolling */
  overscroll-behavior: contain;
}

.art-display::-webkit-scrollbar {
  width: 10px;
}

.art-display::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.art-display::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.art-display::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}

.art-placeholder {
  color: var(--text-secondary);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.art-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  animation: fadeIn 1s ease;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dictionary Styles */
.dict-box {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
}

.dict-box .login-header {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--panel-border);
}

.dict-controls {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--panel-border);
}

#dictInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

#dictInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.dict-results {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.dict-placeholder {
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

.dict-word {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dict-phonetic {
  color: var(--accent);
  font-family: monospace;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.dict-meaning {
  margin-bottom: 1.5rem;
}

.dict-part-of-speech {
  font-weight: 700;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: inline-block;
  background: rgba(0,0,0,0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.dict-def {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.dict-example {
  color: var(--text-secondary);
  font-style: italic;
  margin-left: 1rem;
  font-size: 0.95rem;
}

/* Ultra Theme Dictionary Overrides */
body.theme-ultra .dict-box {
  border: 1px solid #d946ef;
  box-shadow: 0 0 40px rgba(217, 70, 239, 0.2);
}

body.theme-ultra .dict-part-of-speech {
  background: rgba(217, 70, 239, 0.2);
  color: #e879f9;
}

body.theme-ultra #dictInput {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(217, 70, 239, 0.3);
  color: #f8fafc;
}

.art-controls {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

#artPrompt {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  font-size: 1rem;
}

#artPrompt:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.15);
}

.art-status {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: rgba(0, 0, 0, 0.8);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d946ef, #8b5cf6);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #d946ef;
}

.status-text {
  color: #f8fafc;
  font-size: 0.9rem;
  font-family: monospace;
}

/* Ultra Theme Art Overrides */
body.theme-ultra .art-box {
  border: 1px solid #d946ef;
  box-shadow: 0 0 50px rgba(217, 70, 239, 0.2);
}

body.theme-ultra #generateArtBtn {
  background: linear-gradient(135deg, #d946ef, #a855f7);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.4);
  border: none;
}

body.theme-ultra #generateArtBtn:hover {
  box-shadow: 0 0 40px rgba(217, 70, 239, 0.6);
  transform: translateY(-2px);
}

/* Ultra Mode Styles */
@keyframes cosmic-pulse {
  0% { background-position: 0% 50%; box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
  50% { background-position: 100% 50%; box-shadow: 0 0 50px rgba(236, 72, 153, 0.6); }
  100% { background-position: 0% 50%; box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
}

@keyframes holographic {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.plan-card.ultra {
  grid-column: 1 / -1; /* Spans full width if grid allows, or just looks massive */
  border: 2px solid transparent;
  background: linear-gradient(#0f172a, #0f172a) padding-box,
              linear-gradient(45deg, #FF0080, #FF8C00, #40E0D0, #7928CA, #FF0080) border-box;
  position: relative;
  overflow: hidden;
  animation: cosmic-pulse 8s ease infinite;
}

.plan-card.ultra::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.1), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.plan-card.ultra .plan-name {
  background: linear-gradient(to right, #ff00cc, #333399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: holographic 10s linear infinite;
}

.plan-card.ultra .plan-tag {
  background: linear-gradient(90deg, #7928CA, #FF0080);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
  font-size: 0.9rem;
  padding: 8px 20px;
}

.plan-card.ultra:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 0 80px rgba(121, 40, 202, 0.4);
}

.plan-card.ultra .plan-btn {
  background: linear-gradient(90deg, #FF0080, #7928CA, #FF0080);
  background-size: 200% auto;
  animation: meshGradient 3s linear infinite;
  border: none;
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: 0 0 30px rgba(121, 40, 202, 0.4);
}

.plan-card.ultra .plan-btn:hover {
  background-position: right center;
  box-shadow: 0 0 50px rgba(255, 0, 128, 0.6);
  transform: scale(1.05);
}

.plan-card.ultra .plan-features li:hover {
  background: linear-gradient(90deg, rgba(255, 0, 128, 0.1), transparent);
  color: #ff00cc;
  text-shadow: 0 0 10px rgba(255, 0, 204, 0.5);
}

.link-btn {
  background: none;
  border: none;
  color: #64748b;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.link-btn:hover {
  color: #334155;
}

/* Benefit Interactions */
.plan-features li {
  cursor: help;
  position: relative;
}

.plan-features li:hover {
  color: #2563eb;
  transform: translateX(5px);
  background: rgba(37, 99, 235, 0.05);
}

.plan-card.gold .plan-features li:hover {
  color: #d97706;
  background: rgba(217, 119, 6, 0.05);
}

.benefit-box {
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.benefit-box #benefitTitle {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2rem;
}

.benefit-box #benefitDescription {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #475569;
}

/* Login Modal */
.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-modal.hidden {
  display: none;
}

.login-box {
  background: white;
  padding: 3rem;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: fadeIn 0.3s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h2 {
  font-size: 1.75rem;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  font-weight: 800;
}

.login-header p {
  color: #64748b;
  margin: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #f8fafc;
}

.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.forgot-pass {
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.submit-btn {
  width: 100%;
  background: #0f172a;
  color: white;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.submit-btn:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.divider {
  display: flex;
  align-items: center;
  margin: 2rem 0;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e2e8f0;
}

.divider span {
  padding: 0 1rem;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #64748b;
}

.login-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.close-modal {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  font-size: 1rem;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.close-modal:hover {
  color: #0f172a;
  background: #e2e8f0;
  transform: rotate(90deg);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--panel-border);
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.creator-signature {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.creator-signature strong {
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

body.theme-ultra .creator-signature strong {
  background: linear-gradient(135deg, #d946ef, #a855f7, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(217, 70, 239, 0.5);
  animation: neonPulse 2s infinite alternate;
}

/* Sponsored Ad Styles */
.sponsored-ad {
  margin-bottom: 1.5rem;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.4);
  padding: 0;
  overflow: hidden;
  position: relative;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.5rem;
  display: inline-block;
  border-bottom-right-radius: 4px;
}

.ad-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem 1rem 1rem;
}

.ad-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: serif;
  color: black;
  box-shadow: var(--shadow-sm);
}

.ad-text {
  flex: 1;
}

.ad-text h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.ad-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ad-cta {
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.ad-cta:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.promo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8rem 1.5rem;
  border-radius: 99px;
  color: white;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.promo-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.promo-icon {
  font-size: 1.2rem;
}

.promo-text {
  font-size: 1rem;
  font-weight: 500;
}

.promo-text strong {
  color: #fbbf24; /* Amber-400 */
}

.promo-benefits {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: -1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.promo-benefits span {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Utilities */
.hidden { display: none !important; }
.blur { filter: blur(4px); pointer-events: none; }
