/* Apple-inspired CRO Roadmap Styles */
:root {
  --primary-blue: #007AFF;
  --primary-gray: #8E8E93;
  --background-light: #F2F2F7;
  --background-dark: #1C1C1E;
  --card-background: #FFFFFF;
  --text-primary: #000000;
  --text-secondary: #6D6D70;
  --border-color: #E5E5EA;
  --success-green: #34C759;
  --warning-orange: #FF9500;
  --error-red: #FF3B30;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --gradient-blue: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  --gradient-purple: linear-gradient(135deg, #AF52DE 0%, #FF2D92 100%);
  --gradient-orange: linear-gradient(135deg, #FF9500 0%, #FF3B30 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--background-light);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-tabs {
  display: flex;
  gap: 2rem;
}

.nav-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-tab.active {
  background: var(--primary-blue);
  color: white;
}

.nav-tab:hover:not(.active) {
  background: var(--background-light);
  color: var(--text-primary);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--card-background);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-blue);
}

.card.priority-high::before {
  background: var(--gradient-orange);
}

.card.priority-medium::before {
  background: var(--gradient-purple);
}

.card-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.card-icon.performance {
  background: linear-gradient(135deg, #007AFF20, #007AFF10);
  color: var(--primary-blue);
}

.card-icon.ux {
  background: linear-gradient(135deg, #FF950020, #FF950010);
  color: var(--warning-orange);
}

.card-icon.mobile {
  background: linear-gradient(135deg, #AF52DE20, #AF52DE10);
  color: #AF52DE;
}

.card-icon.conversion {
  background: linear-gradient(135deg, #34C75920, #34C75910);
  color: var(--success-green);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  flex: 1;
}

.priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-high {
  background: #FF3B3020;
  color: var(--error-red);
}

.priority-medium {
  background: #FF950020;
  color: var(--warning-orange);
}

.priority-low {
  background: #34C75920;
  color: var(--success-green);
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.metrics-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.metric {
  text-align: center;
  flex: 1;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  display: block;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Progress Bars */
.progress-container {
  margin: 1.5rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.progress-bar {
  height: 8px;
  background: var(--background-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-blue);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

.progress-fill.performance {
  background: var(--gradient-blue);
}

.progress-fill.ux {
  background: var(--gradient-orange);
}

.progress-fill.mobile {
  background: var(--gradient-purple);
}

/* Action Buttons */
.action-button {
  background: var(--gradient-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.action-button.secondary {
  background: var(--background-light);
  color: var(--text-primary);
}

.action-button.secondary:hover {
  background: var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-light);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-blue);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  background: var(--card-background);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 2rem;
  width: 12px;
  height: 12px;
  background: var(--primary-blue);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--primary-blue);
}

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

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.timeline-duration {
  background: var(--background-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.timeline-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.impact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.impact-metric {
  text-align: center;
  padding: 1rem;
  background: var(--background-light);
  border-radius: 12px;
}

.impact-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success-green);
}

.impact-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Stats Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card-background);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-blue);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

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

.stat-change {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-change.positive {
  color: var(--success-green);
}

.stat-change.negative {
  color: var(--error-red);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 5rem 1rem 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .nav-tabs {
    gap: 1rem;
  }
  
  .nav-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-item {
    padding: 1.5rem;
  }
  
  .header-content {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .metrics-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background-light: #000000;
    --card-background: #1C1C1E;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --border-color: #38383A;
  }
  
  .header {
    background: rgba(28, 28, 30, 0.8);
  }
}

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

.animate-in {
  animation: slideInUp 0.6s ease-out forwards;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-blue);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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