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

:root {
  /* Color Palette */
  --primary-color: #007AFF;
  --secondary-color: #5856D6;
  --success-color: #34C759;
  --warning-color: #FF9500;
  --error-color: #FF3B30;
  --background-color: #F2F2F7;
  --card-background: #FFFFFF;
  --text-primary: #1C1C1E;
  --text-secondary: #8E8E93;
  --border-color: #E5E5EA;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Page Management */
.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  max-width: 300px;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--spacing-lg);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.loading-content p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--border-radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  transition: width 0.3s ease;
}

/* Homepage Styles */
.homepage-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  padding: 0 0 var(--spacing-xs);
}

.logo-container {
  max-width: 600px;
  margin: 0 auto;
}

.logo {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0;
}

.tagline {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  font-weight: 400;
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-lg) var(--spacing-3xl);
}

.search-section {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.search-title {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.search-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.search-form {
  margin-bottom: var(--spacing-3xl);
}

.search-box {
  display: flex;
  gap: var(--spacing-md);
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-sm);
  box-shadow: 0 4px 20px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.url-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--font-size-base);
  padding: var(--spacing-lg);
  background: transparent;
  color: var(--text-primary);
}

/* Prevent red border on invalid input before submission */
.url-input:invalid {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* Prevent browser default validation styling */
.url-input:user-invalid {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* Only show validation styles on focus and after user interaction */
.url-input:focus:invalid {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* Also prevent on search-box container */
.search-box:has(.url-input:invalid) {
  border-color: var(--border-color) !important;
}

.search-box:has(.url-input:user-invalid) {
  border-color: var(--border-color) !important;
}

.url-input::placeholder {
  color: var(--text-secondary);
}

.analyze-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.analyze-button:hover {
  background: #0056CC;
  transform: translateY(-1px);
}

.analyze-button:active {
  transform: translateY(0);
}

.analyze-button:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
}

.form-error {
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-md);
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.terms-agreement {
  margin-top: var(--spacing-md);
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.terms-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-text {
  user-select: none;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.terms-link:hover {
  color: #0056CC;
  text-decoration: underline;
}

.features {
  margin-top: var(--spacing-3xl);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.feature-card {
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-lg);
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
}

.footer {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.footer p {
  margin: var(--spacing-xs) 0;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 var(--spacing-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Results Page Styles */
.results-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
}

.back-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: var(--font-size-base);
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  transition: background-color var(--transition-fast);
}

.back-button:hover {
  background: var(--background-color);
}

.header-info {
  text-align: center;
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

/* Analyzed URL Display (inside status message) */
.analyzed-url-display {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

.analyzed-url-label {
  color: var(--text-secondary);
  margin-right: var(--spacing-xs);
  font-weight: 400;
}

.analyzed-url {
  color: var(--color-primary);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease;
}

.analyzed-url:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.share-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.share-button:hover {
  background: var(--background-color);
  color: var(--text-primary);
}

/* Score Section */
.score-section {
  margin-bottom: var(--spacing-3xl);
}

.score-container {
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-2xl);
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2xl);
}

.score-circle-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-display {
  position: absolute;
  text-align: center;
}

.score-value {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.score-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-grade {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-top: var(--spacing-xs);
}

.score-details {
  flex: 1;
  text-align: left;
}

.site-type, .processing-time {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.site-type:last-child, .processing-time:last-child {
  border-bottom: none;
}

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

.type-value, .time-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Categories Section */
.categories-section {
  margin-bottom: var(--spacing-3xl);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.category-grid {
  background: var(--card-background);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-card {
  background: transparent;
  border-radius: 0;
  padding: var(--spacing-lg) 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--transition-normal);
}

.category-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.category-card:first-child {
  padding-top: 0;
}

.category-card:hover {
  opacity: 0.9;
}

/* Category Toggle Button */
.category-toggle {
  width: 100%;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1px solid #BAE6FD;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-sm) 0 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #0369A1;
  transition: all var(--transition-normal);
}

.category-toggle:hover {
  background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.2);
}

.category-toggle.open {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  color: white;
  border-color: #0284C7;
}

.category-toggle .toggle-text {
  flex: 1;
  text-align: left;
}

.category-toggle .toggle-icon {
  font-size: var(--font-size-xs);
  margin-left: var(--spacing-sm);
  transition: transform var(--transition-normal);
}

.card-header {
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-xs) 0;
}

.card-body {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.category-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.category-score {
  font-size: var(--font-size-lg);
  font-weight: 700;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-full);
  background: var(--background-color);
}

.category-progress {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.category-progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width var(--transition-slow);
}

.category-items {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Recommendations Section */
.recommendations-section {
  margin-bottom: var(--spacing-3xl);
}

.priority-filters {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid var(--border-color);
  background: var(--card-background);
  color: var(--text-secondary);
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--font-size-sm);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Recommendations Intro Section - LP Style */
.recommendations-intro {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFFAFA 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-2xl) var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.12);
  position: relative;
  overflow: hidden;
}

.recommendations-intro::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 59, 48, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.intro-hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.intro-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.intro-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.intro-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

.highlight-count {
  color: #FF3B30;
  font-weight: 700;
  font-size: 1.2em;
}

.intro-issues-list {
  background: white;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 1;
}

.issues-enumeration {
  margin: 0;
  padding-left: var(--spacing-xl);
  list-style-position: outside;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-sm) var(--spacing-lg);
}

.issues-enumeration li {
  font-size: var(--font-size-md);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 500;
}

/* Sales Section Styles */
.intro-sales-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

.sales-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.sales-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.sales-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.sales-icon {
  font-size: 2rem;
}

.sales-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
}

.sales-description {
  font-size: var(--font-size-base);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

.sales-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sales-benefits li {
  padding: var(--spacing-sm) 0;
  font-size: var(--font-size-sm);
  line-height: 1.6;
  opacity: 0.95;
}

.sales-cta-button {
  width: 100%;
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-xl);
  background: white;
  color: #667eea;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sales-cta-button:hover {
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sales-cta-button:active {
  transform: translateY(0);
}

.issues-header {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  font-weight: 600;
}

.intro-risks-container {
  position: relative;
  z-index: 1;
  margin-bottom: var(--spacing-lg);
}

.risks-header {
  text-align: center;
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.intro-risks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.risk-item {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}

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

.risk-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
}

.risk-text {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.intro-highlight {
  background: linear-gradient(135deg, #FF3B30 0%, #FF6B63 100%);
  color: white;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  position: relative;
  z-index: 1;
}

/* Grid Layout for Other Items */
.recommendations-grid {
  margin-top: var(--spacing-xl);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

/* Compact Card for Other Items */
.recommendation-card-compact {
  background: var(--card-background);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-md);
  border-left: 3px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  opacity: 0;
  transform: translateY(10px);
}

.recommendation-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.recommendation-card-compact.high-priority {
  border-left-color: #FF3B30;
}

.recommendation-card-compact.medium-priority {
  border-left-color: #FF9500;
}

.recommendation-card-compact.low-priority {
  border-left-color: #34C759;
}

.compact-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--text-secondary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--font-size-xs);
  flex-shrink: 0;
}

.recommendation-card-compact.high-priority .compact-number {
  background: #FF3B30;
}

.recommendation-card-compact.medium-priority .compact-number {
  background: #FF9500;
}

.recommendation-card-compact.low-priority .compact-number {
  background: #34C759;
}

.compact-content {
  flex: 1;
  min-width: 0;
}

.compact-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.compact-impact {
  font-size: var(--font-size-xs);
  color: #FF3B30;
  font-weight: 500;
  line-height: 1.3;
}

/* TOP Priority Cards (detailed) */
.recommendation-card {
  background: var(--card-background);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  border-left: 3px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.3s ease-out forwards;
}

.recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recommendation-card.high-priority {
  border-left-color: #FF3B30;
  background: linear-gradient(to right, #FFF5F5 0%, var(--card-background) 10%);
}

.recommendation-card.medium-priority {
  border-left-color: #FF9500;
  background: linear-gradient(to right, #FFF9F0 0%, var(--card-background) 10%);
}

.recommendation-card.low-priority {
  border-left-color: #34C759;
  background: linear-gradient(to right, #F0FFF4 0%, var(--card-background) 10%);
}

.recommendation-header {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.recommendation-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--text-secondary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.recommendation-card.high-priority .recommendation-number {
  background: #FF3B30;
}

.recommendation-card.medium-priority .recommendation-number {
  background: #FF9500;
}

.recommendation-card.low-priority .recommendation-number {
  background: #34C759;
}

.recommendation-info {
  flex: 1;
}

.recommendation-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.recommendation-impact {
  font-size: var(--font-size-sm);
  color: #FF3B30;
  font-weight: 500;
  margin-top: var(--spacing-xs);
}

.recommendation-category {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority-badge {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.priority-badge.high {
  background: #FFE5E5;
  color: var(--error-color);
}

.priority-badge.medium {
  background: #FFF3E0;
  color: var(--warning-color);
}

.priority-badge.low {
  background: #E8F5E8;
  color: var(--success-color);
}

.recommendation-content {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.recommendation-issue {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
}

.recommendation-suggestion {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.recommendation-implementation {
  background: var(--background-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-sm);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  overflow-x: auto;
  margin: var(--spacing-md) 0;
}

/* Recommendations CTA Section - Enhanced LP Style */
.category-cta-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.recommendations-cta {
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-2xl) var(--spacing-xl);
  margin-top: var(--spacing-lg);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.recommendations-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: white;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-message {
  font-size: 1rem;
  color: white;
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-button.primary {
  background: white;
  color: #007AFF;
}

.cta-button.primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid white;
  backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--spacing-3xl);
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

/* Details Section */
.details-section {
  margin-bottom: var(--spacing-3xl);
}

.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.section-toggle:hover {
  background: var(--background-color);
}

.toggle-icon {
  transition: transform var(--transition-normal);
}

.section-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.details-content {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.details-content.expanded {
  max-height: 2000px;
}

.details-content.collapsed {
  max-height: 0;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}

.detail-category {
  background: var(--background-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
}

.detail-category h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.detail-name {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.detail-score {
  font-weight: 600;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
}

.detail-score.passed {
  background: #E8F5E8;
  color: var(--success-color);
}

.detail-score.failed {
  background: #FFE5E5;
  color: var(--error-color);
}

/* Error Page */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-lg);
}

.error-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

.retry-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.retry-button:hover {
  background: #0056CC;
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .analyze-button {
    justify-content: center;
    width: 100%;
  }
  
  .score-container {
    flex-direction: column;
    text-align: center;
  }
  
  .score-details {
    text-align: center;
    width: 100%;
  }
  
  .results-header {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }
  
  .priority-filters {
    flex-wrap: wrap;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .homepage-container {
    padding: var(--spacing-md);
  }
  
  .logo {
    font-size: var(--font-size-2xl);
  }
  
  .search-title {
    font-size: var(--font-size-xl);
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .results-container {
    padding: var(--spacing-md);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Category Inline Expansion Styles */
/* Category card base styles are at line 478 */

.category-card.expanded {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--primary-color);
}

.expand-indicator {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  margin-left: auto;
}

.category-summary {
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.category-details-expanded {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border-top: 2px solid var(--border-color);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-top: var(--spacing-md);
  padding: var(--spacing-lg);
}

.details-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

.details-header h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

/* Inline Items List */
.inline-item {
  background: white;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.inline-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inline-item.passed {
  border-left: 4px solid var(--success-color);
  background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
}

.inline-item.failed {
  border-left: 4px solid var(--error-color);
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Inline Improvement Summary */
.inline-improvement-summary {
  background: linear-gradient(135deg, #fff3cd 0%, #fef7e0 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  border: 1px solid #ffeaa7;
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.inline-improvement-summary.success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-color: #b8daff;
}

.summary-icon {
  font-size: var(--font-size-2xl);
  flex-shrink: 0;
}

.summary-content h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.summary-content p {
  color: var(--text-secondary);
  margin: 0;
}

.improvement-list {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0 0 0;
}

.improvement-list li {
  padding: var(--spacing-xs) 0;
  position: relative;
  padding-left: var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  line-height: 1.5;
}

.improvement-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.improvement-list li.more-items {
  color: var(--text-secondary);
  font-style: italic;
}

/* Category Modal Styles - Improved UI */
.category-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: var(--card-background);
  border-radius: var(--border-radius-xl);
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.modal-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: var(--font-size-xl);
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  flex: 1;
}

/* Modal Summary Section */
.modal-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-xl);
}

.summary-score {
  text-align: center;
}

.score-circle-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--spacing-sm);
}

.score-number {
  font-size: var(--font-size-3xl);
  font-weight: bold;
  color: var(--text-primary);
}

.score-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.score-grade {
  font-size: var(--font-size-lg);
  font-weight: 600;
  padding: var(--spacing-xs) var(--spacing-md);
  background: white;
  border-radius: var(--border-radius-full);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-stats {
  display: flex;
  gap: var(--spacing-xl);
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: bold;
  color: var(--text-primary);
}

/* Items Header with Legend */
.items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--border-color);
}

.items-header h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.legend {
  display: flex;
  gap: var(--spacing-lg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.status-icon {
  font-size: var(--font-size-lg);
  font-weight: bold;
}

.status-icon.passed {
  color: var(--success-color);
}

.status-icon.failed {
  color: var(--error-color);
}

/* Detailed Items List */
.items-list {
  margin-bottom: var(--spacing-xl);
}

.detail-item {
  background: var(--background-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-item.passed {
  border-left: 4px solid var(--success-color);
}

.detail-item.failed {
  border-left: 4px solid var(--error-color);
}

.item-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.item-status {
  font-size: var(--font-size-xl);
  width: 30px;
  text-align: center;
  font-weight: bold;
}

.item-status.status-good {
  color: var(--success-color);
}

.item-status.status-bad {
  color: var(--error-color);
}

.item-name {
  flex: 1;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-primary);
}

.item-score-bar {
  position: relative;
  width: 150px;
  height: 24px;
  background: white;
  border-radius: var(--border-radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.score-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  transition: width 0.5s ease;
  border-radius: var(--border-radius-full);
}

.score-text {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-primary);
}

.item-recommendation {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: rgba(255, 149, 0, 0.1);
  border-radius: var(--border-radius-sm);
  margin-left: 46px;
}

.rec-icon {
  font-size: var(--font-size-sm);
}

.rec-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Improvement Summary */
.improvement-summary {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.improvement-summary h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.improvement-summary h5::before {
  content: "🎯";
  font-size: var(--font-size-xl);
}

.improvement-list {
  list-style: none;
  padding: 0;
}

.improvement-list li {
  padding: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
  position: relative;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  line-height: 1.6;
}

.improvement-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.font-weight-bold {
  font-weight: 600;
}

.color-primary {
  color: var(--primary-color);
}

.color-secondary {
  color: var(--text-secondary);
}

.color-success {
  color: var(--success-color);
}

.color-warning {
  color: var(--warning-color);
}

.color-error {
  color: var(--error-color);
}
/* =================================================================
   UI Redesign: Card-based Layout for Results Page
   ================================================================= */

/* Score Section - New Layout */
.score-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-2xl);
  border: 1px solid var(--border-color);
  margin-bottom: var(--spacing-3xl);
}

.score-circle-wrapper {
  position: relative;
  flex-shrink: 0;
}

.score-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.score-circle-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.score-circle-grade {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-text .score-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-color);
}

.score-text .score-grade {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.25rem;
  color: var(--text-secondary);
}

.score-info {
  flex: 1;
}

.score-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.score-status {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #FFF9F0 0%, #FFFBF5 100%);
  border-radius: var(--border-radius-md);
  border-left: 4px solid #FF9500;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.1);
}

.score-status.danger {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFFAFA 100%);
  border-left-color: #FF3B30;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.1);
}

.score-status.success {
  background: linear-gradient(135deg, #F0FFF4 0%, #F7FFF9 100%);
  border-left-color: #34C759;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.1);
}

.status-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.status-text {
  color: var(--text-primary);
  line-height: 1.7;
  font-size: var(--font-size-lg);
  flex: 1;
}

/* Category Scores Breakdown */
.category-scores-breakdown {
  margin-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.category-score-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.category-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
}

.category-score-name {
  color: var(--text-primary);
  font-weight: 500;
}

.category-score-value {
  color: var(--text-secondary);
  font-weight: 600;
}

.category-score-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.category-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.category-score-fill.danger {
  background: linear-gradient(90deg, #FF3B30 0%, #FF6B63 100%);
}

.category-score-fill.warning {
  background: linear-gradient(90deg, #FF9500 0%, #FFB340 100%);
}

.category-score-fill.success {
  background: linear-gradient(90deg, #34C759 0%, #5DD97C 100%);
}

.score-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.meta-item {
  display: flex;
  gap: var(--spacing-sm);
  font-size: var(--font-size-md);
  margin: 0;
}

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

.meta-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Category Cards Section */
.section-subtitle {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.category-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Category card styles moved to line 478 */

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card-title-icon {
  font-size: 1.25rem;
}

.score-bar {
  height: 8px;
  background: #E5E5E5;
  border-radius: 4px;
  overflow: hidden;
  margin-top: var(--spacing-xs);
  margin-bottom: 0;
}

.score-fill {
  height: 100%;
  transition: width 0.8s ease-out;
  border-radius: 4px;
}

.score-fill.danger {
  background: #FF3B30;
}

.score-fill.warning {
  background: #FF9500;
}

.score-fill.success {
  background: #34C759;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.issue-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) 0;
  font-size: var(--font-size-md);
}

.issue-item::before {
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.issue-item.fail {
  color: var(--text-primary);
}

.issue-item.fail::before {
  content: "×";
  color: #FF3B30;
}

.issue-item.warn {
  color: var(--text-primary);
}

.issue-item.warn::before {
  content: "△";
  color: #FF9500;
}

.issue-item.pass {
  color: var(--text-secondary);
}

.issue-item.pass::before {
  content: "○";
  color: #34C759;
}

/* Responsive Design */
@media (max-width: 767px) {
  .score-container {
    flex-direction: column;
    text-align: center;
  }

  .score-circle-wrapper svg {
    width: 160px;
    height: 160px;
  }

  .score-circle-wrapper svg circle {
    cx: 80;
    cy: 80;
    r: 64;
  }

  .score-info {
    width: 100%;
  }

  .score-title {
    font-size: var(--font-size-lg);
  }

  .score-meta {
    align-items: center;
  }

  .category-card {
    padding: var(--spacing-lg);
  }

  .card-title {
    font-size: var(--font-size-md);
  }

  .issue-item {
    font-size: var(--font-size-sm);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .score-circle-wrapper svg {
    width: 180px;
    height: 180px;
  }

  .score-circle-wrapper svg circle {
    cx: 90;
    cy: 90;
    r: 72;
  }

  .category-cards,
  .recommendations-list {
    max-width: 90%;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .category-cards,
  .recommendations-list {
    max-width: 800px;
    margin: 0 auto;
  }

  .score-container,
  .category-grid {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ====================
   GEO Scores Section
   ==================== */

.geo-scores-wrapper {
  margin: var(--spacing-3xl) 0;
}

.geo-scores-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

.geo-scores-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.geo-scores-title .geo-icon {
  font-size: var(--font-size-3xl);
}

.geo-scores-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
}

/* GEO Conversion Box */
.geo-conversion-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.geo-conversion-text {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.6;
}

.geo-scores-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  max-width: 800px;
  margin: 0 auto;
}

/* GEO Score Card */
.geo-score-card {
  background: var(--card-background);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.geo-score-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.geo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-lg);
}

.geo-engine-info {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  flex: 1;
}

.geo-engine-icon {
  font-size: 2rem;
  line-height: 1;
}

.geo-engine-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.geo-engine-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.geo-score-badge {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  background: var(--background-color);
}

.geo-score-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
}

.geo-score-grade {
  font-size: var(--font-size-lg);
  font-weight: 600;
  opacity: 0.7;
}

/* Grade Colors */
.grade-a { background: #e6f7ed; color: #0f6937; }
.grade-b { background: #e6f4ff; color: #0066cc; }
.grade-c { background: #fff7e6; color: #cc6600; }
.grade-d { background: #fff0e6; color: #cc3300; }
.grade-e { background: #ffe6e6; color: #990000; }
.grade-f { background: #f2f2f7; color: #666666; }

/* Progress Bar */
.geo-progress-container {
  margin-bottom: var(--spacing-lg);
}

.geo-progress-bar {
  width: 100%;
  height: 24px;
  background: var(--background-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  position: relative;
}

.geo-progress-fill {
  height: 100%;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--spacing-sm);
  transition: width 0.6s ease;
  position: relative;
}

.geo-progress-text {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Strengths */
.geo-strengths {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: #e6f7ed;
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--success-color);
}

.geo-section-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.geo-strength-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.geo-strength-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
}

.geo-strength-category {
  color: var(--text-primary);
}

.geo-strength-score {
  font-weight: 600;
  color: var(--success-color);
}

/* Suggestions */
.geo-suggestions {
  padding: var(--spacing-md);
  background: #fff7e6;
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--warning-color);
}

.geo-suggestion-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.geo-suggestion-item {
  padding: var(--spacing-sm);
  background: white;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.geo-suggestion-item[data-priority="high"] {
  border-left: none;
}

.geo-suggestion-item[data-priority="medium"] {
  border-left: none;
}

.geo-suggestion-item[data-priority="low"] {
  border-left: none;
}

.geo-suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.geo-suggestion-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.geo-suggestion-impact {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--primary-color);
  background: #e6f4ff;
  padding: 2px 8px;
  border-radius: 12px;
}

.geo-suggestion-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.geo-show-more {
  margin-top: var(--spacing-sm);
  width: 100%;
  padding: var(--spacing-sm);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--primary-color);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.geo-show-more:hover {
  background: var(--background-color);
  border-color: var(--primary-color);
}

.geo-no-suggestions {
  text-align: center;
  padding: var(--spacing-lg);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
  .geo-scores-section {
    padding: 0 var(--spacing-md);
  }

  .geo-scores-grid {
    grid-template-columns: 1fr;
  }

  .geo-score-card {
    padding: var(--spacing-lg);
  }

  .geo-engine-name {
    font-size: var(--font-size-base);
  }

  .geo-score-value {
    font-size: var(--font-size-xl);
  }
}

/* ========================================
   Contact Form Modal
   ======================================== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--spacing-md);
  overflow-y: auto;
  backdrop-filter: blur(4px);
  transition: opacity var(--transition-base);
}

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

/* Modal Container */
.modal-container {
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--background-color);
  color: var(--text-primary);
}

.modal-close:active {
  transform: scale(0.95);
}

/* Modal Body */
.modal-body {
  padding: var(--spacing-xl);
  overflow-y: auto;
  flex-grow: 1;
}

.modal-description {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--error-color);
  margin-left: 2px;
}

.form-input,
.form-textarea {
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  background-color: var(--card-background);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0;
  cursor: pointer;
  font-size: var(--font-size-sm);
}

.form-checkbox {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-text {
  flex: 1;
  color: var(--text-secondary);
}

.checkbox-text .link {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-family);
}

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

.btn-primary:hover {
  background-color: #0051D5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

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

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

.btn-secondary:hover {
  background-color: #E5E5EA;
}

/* Form Error */
.form-error {
  padding: var(--spacing-md);
  background-color: #FFEBEE;
  border-left: 4px solid var(--error-color);
  border-radius: var(--border-radius-sm);
  color: #C62828;
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-md);
}

.form-error.hidden {
  display: none;
}

/* Form Success */
.form-success {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

.form-success.hidden {
  display: none;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--spacing-lg);
  animation: successPop 0.5s ease-out;
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.success-message {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    animation: modalSlideUp 0.3s ease-out;
  }

  @keyframes modalSlideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
    position: sticky;
    top: 0;
    background: var(--card-background);
    z-index: 1;
  }

  .modal-title {
    font-size: var(--font-size-lg);
  }

  .modal-body {
    padding: var(--spacing-lg);
  }

  .form-actions {
    flex-direction: column-reverse;
  }

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

/* Small Mobile */
@media (max-width: 480px) {
  .modal-header {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .modal-body {
    padding: var(--spacing-md);
  }

  .form-input,
  .form-textarea {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* ========================================
   Terms & Privacy Policy Modal Styles
   ======================================== */

/* Document Modal Container */
.modal-document {
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Scrollable Modal Body for Long Documents */
.modal-scrollable {
  overflow-y: auto;
  max-height: calc(90vh - 150px);
  padding: var(--spacing-lg) var(--spacing-xl);
}

/* Document Content */
.document-content {
  color: var(--text-primary);
  line-height: 1.8;
}

.document-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.document-section {
  margin-bottom: var(--spacing-xl);
}

.document-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

.document-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

.document-section p {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.document-section ul {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  list-style: disc;
}

.document-section li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  line-height: 1.7;
}

.document-section li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.document-section a.link {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.document-section a.link:hover {
  color: var(--primary-dark);
}

.document-footer {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Modal Footer for Close Button */
.modal-footer {
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--card-background);
  border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
}

.modal-footer .btn-primary {
  min-width: 120px;
}

/* Mobile Responsive for Document Modals */
@media (max-width: 768px) {
  .modal-document {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-scrollable {
    max-height: calc(100vh - 130px);
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    border-radius: 0;
  }

  .document-section h3 {
    font-size: 1rem;
  }

  .document-section h4 {
    font-size: 0.9375rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .modal-scrollable {
    padding: var(--spacing-md);
  }

  .document-section ul {
    margin-left: var(--spacing-md);
  }
}

/* ========================================
   Google Forms Integration
   ======================================== */

.google-form-body {
  padding: var(--spacing-lg) var(--spacing-xl);
}

.google-form-container {
  width: 100%;
  height: 1200px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: #f9f9f9;
}

.google-form-container iframe {
  border: none;
  width: 100%;
  height: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .google-form-body {
    padding: var(--spacing-md);
  }
  
  .google-form-container {
    height: 100vh;
    border-radius: 0;
  }
}

/* ========================================
   GEO Scores Lock/Blur Overlay
   ======================================== */

.geo-scores-locked {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.geo-scores-blurred {
  pointer-events: none;
  user-select: none;
  position: relative;
}

/* Gradient blur effect - top clear, bottom blurred */
.geo-scores-blurred::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.7) 60%,
    rgba(255, 255, 255, 0.95) 100%
  );
  backdrop-filter: blur(0px);
  pointer-events: none;
  z-index: 1;
}

.geo-scores-overlay {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.98) 30%
  );
  z-index: 10;
}

.unlock-content {
  text-align: center;
  max-width: 800px;
  padding: var(--spacing-2xl);
}

.unlock-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-lg);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.unlock-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.unlock-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-2xl);
}

.unlock-button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  padding: var(--spacing-md) var(--spacing-2xl);
  font-size: var(--font-size-lg);
  font-weight: 600;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.unlock-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 122, 255, 0.4);
}

.unlock-button:active {
  transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .unlock-content {
    padding: var(--spacing-lg);
  }

  .unlock-icon {
    font-size: 3rem;
  }

  .unlock-title {
    font-size: var(--font-size-xl);
  }

  .unlock-description {
    font-size: var(--font-size-sm);
  }

  .unlock-button {
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: var(--font-size-base);
  }
}

/* ============================================
   Contact Modal Styles
   ============================================ */

.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.contact-modal.active {
  display: flex;
}

.contact-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.contact-modal-content {
  position: relative;
  background: var(--card-background);
  border-radius: var(--border-radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  padding: var(--spacing-2xl);
}

.contact-modal-close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  z-index: 1;
}

.contact-modal-close:hover {
  background: var(--background-color);
  color: var(--text-primary);
}

.contact-modal-header {
  margin-bottom: var(--spacing-xl);
}

.contact-modal-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.contact-modal-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.5;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.form-group .required {
  color: var(--error-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group input[readonly] {
  background: var(--background-color);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--primary-color);
  text-decoration: underline;
}

.checkbox-label a:hover {
  text-decoration: none;
}

.form-actions {
  margin-top: var(--spacing-sm);
}

.btn-submit {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-xl);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-submit:hover:not(:disabled) {
  background: #0066DD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-message {
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  text-align: center;
  margin-top: var(--spacing-md);
}

.form-message.success {
  background: rgba(52, 199, 89, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.form-message.error {
  background: rgba(255, 59, 48, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Modal Mobile Responsive */
@media (max-width: 768px) {
  .contact-modal {
    padding: var(--spacing-sm);
  }

  .contact-modal-content {
    padding: var(--spacing-lg);
    max-height: 95vh;
  }

  .contact-modal-title {
    font-size: var(--font-size-xl);
  }

  .contact-modal-subtitle {
    font-size: var(--font-size-sm);
  }

  .btn-submit {
    font-size: var(--font-size-base);
  }
}

/* ============================================
   Sales Cards Styles (in Recommendations)
   ============================================ */

.intro-sales-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

.sales-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  transition: all var(--transition-normal);
}

.sales-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.sales-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.sales-icon {
  font-size: 2.5rem;
}

.sales-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
}

.sales-description {
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

.sales-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xl) 0;
}

.sales-benefits li {
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) 0;
  opacity: 0.9;
}

.sales-cta-button {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-xl);
  background: white;
  color: #667eea;
  border: none;
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sales-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.sales-cta-button:active {
  transform: translateY(0);
}

/* Mobile Responsive for Sales Cards */
@media (max-width: 768px) {
  .intro-sales-section {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .sales-card {
    padding: var(--spacing-lg);
  }

  .sales-title {
    font-size: var(--font-size-lg);
  }

  .sales-description {
    font-size: var(--font-size-sm);
  }
}

/* ===================================
   Pricing Section (Results Page)
   =================================== */

.pricing-section {
  background: var(--bg-color);
  padding: 4rem 2rem;
  margin: 2rem 0;
  border-top: 2px solid var(--border-color);
}

.pricing-container {
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pricing-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: 3rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.pricing-card-featured {
  border-color: var(--primary-color);
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
  transform: scale(1.02);
}

.pricing-card-featured:hover {
  transform: translateY(-8px) scale(1.02);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-color), #66BB6A);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.pricing-card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.pricing-price {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.price-period {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.btn-pricing {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  margin-top: auto;
}

.btn-featured {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.btn-featured:hover {
  background: #66BB6A;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  transform: translateY(-2px);
}

.btn-premium {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-premium:hover {
  background: linear-gradient(135deg, #FF8E53, #FF6B6B);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  transform: translateY(-2px);
}

.pricing-card-free {
  border-color: #007AFF;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.02), rgba(0, 81, 213, 0.02));
}

.pricing-card-free:hover {
  border-color: #007AFF;
  box-shadow: 0 12px 40px rgba(0, 122, 255, 0.15);
}

.pricing-badge.free {
  background: linear-gradient(135deg, #007AFF, #0051D5);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-free {
  background: #007AFF;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.btn-free:hover {
  background: #0051D5;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
  transform: translateY(-2px);
}

.cta-button.single {
  max-width: 400px;
  margin: 0 auto;
  display: block;
}

/* ===================================
   Floating CTA Button (追従型)
   =================================== */

.floating-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  animation: floatIn 0.5s ease-out;
}

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

.floating-cta-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #007AFF, #0051D5);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

/* Pulse Animation */
.floating-cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.floating-cta-icon {
  font-size: 1.5rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.floating-cta-text {
  position: relative;
  z-index: 1;
}

.floating-cta-button:hover {
  background: linear-gradient(135deg, #0051D5, #007AFF);
  box-shadow: 0 6px 30px rgba(0, 122, 255, 0.6);
  transform: translateY(-3px) scale(1.05);
}

.floating-cta-button:active {
  transform: translateY(-1px) scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-cta {
    right: 50%;
    bottom: 15px;
    transform: translateX(50%);
  }

  @keyframes floatIn {
    from {
      opacity: 0;
      transform: translateX(50%) translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateX(50%) translateY(0);
    }
  }

  .floating-cta-button {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
  }

  .floating-cta-icon {
    font-size: 1.25rem;
  }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .pricing-section {
    padding: 3rem 1rem;
  }

  .pricing-title {
    font-size: 1.75rem;
  }

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

  .pricing-card-featured {
    transform: scale(1);
  }

  .pricing-card-featured:hover {
    transform: translateY(-8px) scale(1);
  }

  .price-amount {
    font-size: 2rem;
  }
}
