/* ================================
   AI INSIGHTS STYLING
   ================================ */

.ai-demo-button {
  background: linear-gradient(135deg, var(--color-primary, #667eea) 0%, var(--color-secondary, #764ba2) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-size: 1rem;
  font-family: inherit;
}

.ai-demo-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.ai-demo-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.ai-insights-section {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 16px;
  color: var(--color-text, #333333);
  margin: 2rem 0;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg, 0 8px 25px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

[data-theme="dark"] .ai-insights-section {
  background: var(--color-surface-dark, #1a1a1a);
  border-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
  color: var(--color-text-dark, #ffffff);
  box-shadow: var(--shadow-lg-dark, 0 8px 25px rgba(0, 0, 0, 0.3));
}

.ai-insights-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    var(--color-primary, #667eea) 0%, 
    var(--color-secondary, #764ba2) 50%,
    var(--color-accent, #f093fb) 100%);
  opacity: 0.05;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] .ai-insights-section::before {
  opacity: 0.1;
}

.ai-insights-section .section-header {
  padding: 2rem;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  background: var(--color-surface-elevated, rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .ai-insights-section .section-header {
  border-bottom-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
  background: var(--color-surface-elevated-dark, rgba(255, 255, 255, 0.05));
}

.ai-insights-section .section-title {
  color: var(--color-text, #333333);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

[data-theme="dark"] .ai-insights-section .section-title {
  color: var(--color-text-dark, #ffffff);
}

.ai-badge {
  background: var(--color-primary, #667eea);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
  }
  50% { 
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.8);
  }
}

.ai-insights-content {
  padding: 2rem;
  display: grid;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.ai-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .ai-card {
  background: var(--color-surface-dark, #2a2a2a);
  border-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
}

.ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--color-primary, #667eea) 0%, 
    var(--color-secondary, #764ba2) 50%,
    var(--color-accent, #f093fb) 100%);
}

.ai-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 8px 25px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .ai-card:hover {
  box-shadow: var(--shadow-lg-dark, 0 8px 25px rgba(0, 0, 0, 0.4));
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text, #333333);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

[data-theme="dark"] .card-title {
  color: var(--color-text-dark, #ffffff);
}

.card-icon {
  font-size: 1.5rem;
}

.personality-type {
  background: var(--color-primary, #667eea);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 500;
}

.card-content {
  color: var(--color-text-secondary, #666666);
  line-height: 1.6;
}

[data-theme="dark"] .card-content {
  color: var(--color-text-secondary-dark, #cccccc);
}

.personality-description {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--color-text-secondary, #666666);
}

[data-theme="dark"] .personality-description {
  color: var(--color-text-secondary-dark, #cccccc);
}

.personality-metrics {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.metric-name {
  font-weight: 500;
  color: var(--color-text, #333333);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .metric-name {
  color: var(--color-text-dark, #ffffff);
}

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

.metric-score {
  font-weight: 600;
  color: var(--color-primary, #667eea);
  font-size: 1.1rem;
}

.progress-bar {
  height: 8px;
  background: var(--color-background-secondary, #f5f5f5);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .progress-bar {
  background: var(--color-background-secondary-dark, #3a3a3a);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    var(--color-primary, #667eea) 0%, 
    var(--color-secondary, #764ba2) 100%);
  border-radius: 4px;
  transition: width 1s ease-in-out;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.personality-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .personality-traits {
    grid-template-columns: 1fr;
  }
}

.strengths h4,
.growth-areas h4 {
  color: var(--color-text, #333333);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .strengths h4,
[data-theme="dark"] .growth-areas h4 {
  color: var(--color-text-dark, #ffffff);
}

.strengths ul,
.growth-areas ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.strengths li,
.growth-areas li {
  padding: 0.25rem 0;
  color: var(--color-text-secondary, #666666);
  font-size: 0.9rem;
}

[data-theme="dark"] .strengths li,
[data-theme="dark"] .growth-areas li {
  color: var(--color-text-secondary-dark, #cccccc);
}

.strengths li::before {
  content: '✓';
  color: var(--color-success, #10b981);
  font-weight: bold;
  margin-right: 0.5rem;
}

.growth-areas li::before {
  content: '→';
  color: var(--color-warning, #f59e0b);
  font-weight: bold;
  margin-right: 0.5rem;
}

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

.recommendation-item {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

[data-theme="dark"] .recommendation-item {
  background: var(--color-surface-dark, #2a2a2a);
  border-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
}

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

[data-theme="dark"] .recommendation-item:hover {
  box-shadow: var(--shadow-md-dark, 0 4px 12px rgba(0, 0, 0, 0.3));
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.rec-type {
  font-weight: 600;
  color: var(--color-text, #333333);
  font-size: 0.9rem;
}

[data-theme="dark"] .rec-type {
  color: var(--color-text-dark, #ffffff);
}

.confidence-badge {
  margin-left: auto;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
}

.confidence-badge.high {
  background: rgba(16, 185, 129, 0.2);
  color: var(--color-success, #10b981);
}

.confidence-badge.medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-warning, #f59e0b);
}

.confidence-badge.low {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-error, #ef4444);
}

.rec-title {
  font-weight: 600;
  color: var(--color-text, #333333);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

[data-theme="dark"] .rec-title {
  color: var(--color-text-dark, #ffffff);
}

.rec-description {
  color: var(--color-text-secondary, #666666);
  font-size: 0.9rem;
  line-height: 1.5;
}

[data-theme="dark"] .rec-description {
  color: var(--color-text-secondary-dark, #cccccc);
}

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

.prediction-item {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

[data-theme="dark"] .prediction-item {
  background: var(--color-surface-dark, #2a2a2a);
  border-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
}

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

[data-theme="dark"] .prediction-item:hover {
  box-shadow: var(--shadow-md-dark, 0 4px 12px rgba(0, 0, 0, 0.3));
}

.prediction-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary, #666666);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .prediction-label {
  color: var(--color-text-secondary-dark, #cccccc);
}

.prediction-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary, #667eea);
  margin-bottom: 0.5rem;
}

.prediction-confidence {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #666666);
}

[data-theme="dark"] .prediction-confidence {
  color: var(--color-text-secondary-dark, #cccccc);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-insights-section .section-header {
    padding: 1.5rem;
  }
  
  .ai-insights-content {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .recommendations-grid,
  .predictions-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark theme specific enhancements */
[data-theme="dark"] .ai-insights-section {
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .ai-card {
  border-color: rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .progress-bar {
  background: rgba(255, 255, 255, 0.1);
}

/* AI Controls */
.ai-controls {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.ai-refresh-btn,
.ai-export-btn {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--color-text, #333333);
}

[data-theme="dark"] .ai-refresh-btn,
[data-theme="dark"] .ai-export-btn {
  background: var(--color-surface-dark, #2a2a2a);
  border-color: var(--color-border-dark, rgba(255, 255, 255, 0.1));
  color: var(--color-text-dark, #ffffff);
}

.ai-refresh-btn:hover,
.ai-export-btn:hover {
  background: var(--color-primary, #667eea);
  color: white;
  transform: translateY(-1px);
}

.ai-refresh-btn svg,
.ai-export-btn svg {
  width: 16px;
  height: 16px;
}

/* ================================
   ESSENTIAL UI ENHANCEMENTS
   ================================ */

/* ===== CONDITIONAL DASHBOARD VISIBILITY ===== */
.ai-insights-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.ai-card {
  background: rgba(255,255,255,0.95);
  color: var(--color-text);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.ai-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.ai-card .card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ai-card .card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.ai-card .card-icon {
  font-size: 1.2rem;
}

.ai-card .card-content {
  padding: 1.5rem;
}

/* Personality Card */
.personality-card {
  grid-column: span 2;
}

.personality-type {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: auto;
}

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

.personality-metrics {
  margin-bottom: 2rem;
}

.metric-bar {
  margin-bottom: 1rem;
}

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

.metric-name {
  font-weight: 600;
  margin-left: 0.5rem;
}

.metric-score {
  font-weight: 700;
  color: var(--color-primary);
}

.progress-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 1s ease-out;
}

.personality-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.personality-traits h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.personality-traits ul {
  list-style: none;
  padding: 0;
}

.personality-traits li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
  color: var(--color-text-secondary);
}

.personality-traits li:last-child {
  border-bottom: none;
}

/* Work Patterns Card */
.working-style {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: auto;
}

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

.metric {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.metric-value.high {
  color: #dc3545;
}

.metric-value.medium {
  color: #ffc107;
}

.metric-value.low {
  color: #28a745;
}

.burnout-advice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  color: #856404;
}

/* Recommendations Card */
.recommendations-card {
  grid-column: span 2;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.recommendation-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #e9ecef;
}

.recommendation-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

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

.rec-icon {
  font-size: 1.5rem;
}

.rec-type {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confidence-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.confidence-badge.high {
  background: #d4edda;
  color: #155724;
}

.confidence-badge.medium {
  background: #fff3cd;
  color: #856404;
}

.confidence-badge.low {
  background: #f8d7da;
  color: #721c24;
}

.rec-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.rec-description {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.rec-action-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rec-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Predictions Card */
.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.prediction-item {
  text-align: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.prediction-item h4 {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 0.9rem;
}

.prediction-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.confidence,
.alternatives {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* Coding Style Card */
.coding-analysis > * + * {
  margin-top: 1.5rem;
}

.coding-analysis h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.language-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.lang-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}

.lang-tag.high {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.lang-tag.medium {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

.lang-tag.low {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.project-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  background: #e9ecef;
  color: var(--color-text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* AI Recommendation Modal */
.ai-recommendation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.ai-recommendation-modal .modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ai-recommendation-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.ai-recommendation-modal .modal-header h3 {
  margin: 0;
  color: var(--color-text);
}

.ai-recommendation-modal .modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.ai-recommendation-modal .modal-close:hover {
  background: #f8f9fa;
}

.ai-recommendation-modal .modal-body {
  padding: 1.5rem;
}

.ai-recommendation-modal .action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ai-recommendation-modal .btn-primary,
.ai-recommendation-modal .btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.ai-recommendation-modal .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.ai-recommendation-modal .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ai-recommendation-modal .btn-secondary {
  background: #f8f9fa;
  color: var(--color-text-secondary);
  border: 1px solid #e9ecef;
}

.ai-recommendation-modal .btn-secondary:hover {
  background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-insights-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .personality-card,
  .recommendations-card {
    grid-column: span 1;
  }
  
  .personality-traits {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .recommendations-grid {
    grid-template-columns: 1fr;
  }
  
  .work-metrics {
    grid-template-columns: 1fr;
  }
}

/* ================================
   ESSENTIAL UI ENHANCEMENTS
   ================================ */

/* ===== CONDITIONAL DASHBOARD VISIBILITY ===== */
.dashboard {
  display: none !important;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dashboard-visible .dashboard.loaded {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}

/* Hide all dashboard sections by default */
.dashboard-section {
  display: none;
  opacity: 0;
}

/* Show sections only when dashboard is loaded */
body.dashboard-visible .dashboard.loaded .dashboard-section {
  display: block;
  opacity: 1;
}

/* ===== END CONDITIONAL DASHBOARD VISIBILITY ===== */

/* Beautiful Skip to Main Content Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.skip-link:focus {
  top: 20px;
  outline: 3px solid #fff;
  outline-offset: 2px;
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: skipLinkPulse 2s ease-in-out infinite;
}

.skip-link:hover:focus {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateX(-50%) scale(1.1);
}

@keyframes skipLinkPulse {
  0%, 100% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  50% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(102, 126, 234, 0);
  }
}

/* Search Section Enhancement for Empty State */
.search-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  margin: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Modern Background with Code Pattern */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 
    100% 100%,
    100% 100%,
    100% 100%,
    50px 50px,
    50px 50px;
  opacity: 0.8;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

/* ===== ANALYTICS SECTION EXPANDABLE FUNCTIONALITY ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Make the Show More / Show Less button highly visible with a glow effect */
.section-toggle {
  background: #111; /* Dark background */
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Glow effect using ::before pseudo-element */
.section-toggle::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, #00f0ff, #ff00ff, #ff0099, #00f0ff);
  background-size: 400%;
  filter: blur(25px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Show glowing effect on hover/focus */
.section-toggle:hover::before,
.section-toggle:focus::before {
  opacity: 1;
  animation: glow-move 3s linear infinite;
}

/* Optional: text color tweak on hover */
.section-toggle:hover,
.section-toggle:focus {
  color: #fff;
  background: #222;
}

@keyframes glow-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

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

/* Charts Grid Collapsed/Expanded States */
.charts-grid {
    display: grid;
    gap: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.charts-grid.charts-collapsed {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.charts-grid.charts-collapsed::-webkit-scrollbar {
    width: 8px;
}

.charts-grid.charts-collapsed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.charts-grid.charts-collapsed::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.charts-grid.charts-collapsed::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.charts-grid.charts-expanded {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-height: none;
    overflow: visible;
}

/* Chart Card States */
.chart-card-preview {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card-extended {
    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.charts-expanded .chart-card-extended {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
    margin-bottom: 1.5rem;
}

/* Wide charts in expanded state */
.charts-expanded .chart-card-wide {
    grid-column: 1 / -1;
}

/* Animation improvements */
.chart-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for analytics */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .section-toggle {
        align-self: flex-end;
    }
    
    .charts-grid.charts-collapsed,
    .charts-grid.charts-expanded {
        grid-template-columns: 1fr;
    }
}

/* ===== END ANALYTICS EXPANDABLE ===== */

/* ===== 3D VISUALIZATION BUTTON ===== */
.section-action-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
  backdrop-filter: blur(10px);
  margin-left: 1rem;
  position: relative;
  overflow: hidden;
}

.section-action-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: left 0.5s;
}

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

.section-action-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  border-color: rgba(102, 126, 234, 0.6);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.section-action-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-action-btn .viz-icon {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
}

.section-action-btn span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Glowing effect on hover */
.section-action-btn:hover {
  box-shadow: 
    0 8px 25px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(102, 126, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Dark theme adjustments */
[data-theme="dark"] .section-action-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

[data-theme="dark"] .section-action-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  border-color: rgba(79, 70, 229, 0.7);
  box-shadow: 
    0 8px 25px rgba(79, 70, 229, 0.5),
    0 0 0 1px rgba(79, 70, 229, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-header {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .section-action-btn {
    margin-left: 0;
    order: 3;
    flex: 1;
    justify-content: center;
    min-width: 140px;
  }
  
  .section-action-btn span {
    font-size: 0.8rem;
  }
}

/* ===== END 3D VISUALIZATION BUTTON ===== */

/* ===== REPOSITORY COMPARISON FEATURE ===== */
.repo-compare-btn {
    background: none;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-primary);
}

.repo-compare-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
}

.repo-compare-btn svg {
    width: 16px;
    height: 16px;
}

.repository-card.selected-for-comparison {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.repository-card.selected-for-comparison .repo-compare-btn {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.compare-repos-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-repos-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.compare-repos-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== SEARCH HISTORY STYLES ===== */
#username-input {
    position: relative;
}

#username-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ===== LOADING ENHANCEMENTS ===== */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::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: left 0.5s ease;
}

.stats-card:hover::before {
    left: 100%;
}

/* ===== REPO FOOTER LAYOUT ===== */
.repo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== MOBILE RESPONSIVE UPDATES ===== */
@media (max-width: 768px) {
    .compare-repos-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 12px;
    }
    
    .repo-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .repo-compare-btn {
        align-self: flex-end;
    }
}

/* ===== ENHANCED ANIMATIONS ===== */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.repository-card {
    animation: slideInFromBottom 0.6s ease forwards;
}

.stats-card {
    animation: slideInFromBottom 0.6s ease forwards;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.repo-compare-btn:focus {
    outline: 3px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

.compare-repos-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

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

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

@keyframes avatarGlow {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes backgroundFloat {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.8;
  }
  25% { 
    transform: translateY(-10px) rotate(0.5deg);
    opacity: 0.9;
  }
  50% { 
    transform: translateY(-5px) rotate(-0.5deg);
    opacity: 0.7;
  }
  75% { 
    transform: translateY(-15px) rotate(0.3deg);
    opacity: 0.85;
  }
}

/* Enhanced containers with glassmorphism */
.container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  position: relative;
}

/* When dashboard is hidden, center the search */
body:not(.dashboard-visible) .search-section {
  min-height: 70vh;
}

/* When dashboard is visible, reduce search section height */
body.dashboard-visible .search-section {
  min-height: 40vh;
}

/* Enhanced Profile Section */
.profile-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-4xl);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Enhanced Dashboard Sections */
.dashboard-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  transition: all 0.3s ease;
  padding: 25px;
}

.dashboard-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Cards and Repository Cards */
.repository-card,
.stats-card,
.chart-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.repository-card:hover,
.stats-card:hover,
.chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.2);
}

.profile-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: profileGlow 4s ease-in-out infinite;
}

.profile-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-xl);
  align-items: center;
}

.profile-avatar {
  position: relative;
}

.avatar-image {
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-full);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
  display: block; /* Ensure image displays */
  object-fit: cover; /* Ensure proper image scaling */
}

.avatar-image:hover {
  transform: scale(1.05);
}

.avatar-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background: linear-gradient(45deg, var(--color-accent), var(--color-primary));
  background-clip: padding-box;
  animation: avatarGlow 3s ease-in-out infinite;
  z-index: -1;
}

/* Enhanced Repository Cards */
.repositories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
}

.repository-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.repository-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

/* Enhanced Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.stats-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Enhanced Activity Timeline */
.activity-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.activity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.activity-stat {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 80px;
}

.activity-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  flex-shrink: 0;
  position: relative;
}

.stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

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

.stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
  counter-reset: value;
}

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

/* Specific stat icon colors */
.activity-stat:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.activity-stat:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.activity-stat:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.activity-stat:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.activity-timeline {
  max-height: 500px;
  overflow-y: auto;
  padding: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.timeline-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.timeline-stats {
  display: flex;
  gap: var(--space-sm);
}

.stat-badge {
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.timeline-content {
  padding: var(--space-md);
}

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

.timeline-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  position: relative;
  opacity: 0;
  animation: slideInUp 0.3s ease-out forwards;
}

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

.timeline-item:hover {
  transform: translateX(4px) translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.timeline-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
}

.timeline-icon.pushevent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.timeline-icon.pullrequestevent {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.timeline-icon.issuesevent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.timeline-icon.createevent {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.timeline-icon.watchevent {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.timeline-icon svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.timeline-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-border), transparent);
  margin-top: var(--space-xs);
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-card {
  flex: 1;
  min-width: 0;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.timeline-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-size: var(--font-size-md);
  line-height: 1.4;
}

.timeline-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-background);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

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

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

.timeline-repo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.timeline-repo svg {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

.timeline-repo a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.timeline-repo a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Enhanced Empty State */
.timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
  text-align: center;
}

.empty-state {
  max-width: 320px;
}

.empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-full);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.empty-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.empty-state h4 {
  margin: 0 0 var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.empty-state p {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.empty-state .hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Activity Filters */
.activity-controls {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.activity-filters {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.activity-filter {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 36px;
}

.activity-filter svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.activity-filter:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.activity-filter.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.activity-filter.active svg {
  stroke: white;
}

.activity-period {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.period-select {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.period-select:hover {
  border-color: var(--color-primary-light);
}

.period-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Activity Search */
.activity-search-container {
  flex: 1;
  max-width: 300px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 1rem;
  height: 1rem;
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 2;
}

.activity-search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.activity-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.activity-search-input::placeholder {
  color: var(--color-text-muted);
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--color-text-muted);
  color: var(--color-surface);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
}

.clear-search-btn:hover {
  background: var(--color-text-secondary);
  transform: scale(1.1);
}

.clear-search-btn svg {
  width: 12px;
  height: 12px;
}

/* Search Highlights */
.search-highlight {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: var(--font-weight-medium);
}

/* Export and Action Buttons */
.export-activity-btn,
.shortcuts-help-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.export-activity-btn:hover,
.shortcuts-help-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.export-activity-btn svg,
.shortcuts-help-btn svg {
  width: 1rem;
  height: 1rem;
}

.shortcuts-help-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Activity Count Badge */
.activity-count {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  background: var(--color-background);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: var(--space-sm);
}

/* Modal Styles */
.export-modal,
.shortcuts-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  animation: modalFadeIn 0.2s ease-out forwards;
}

@keyframes modalFadeIn {
  to { opacity: 1; }
}

.export-modal-content,
.shortcuts-modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9);
  animation: modalScaleIn 0.2s ease-out forwards;
}

@keyframes modalScaleIn {
  to { transform: scale(1); }
}

.export-modal-header,
.shortcuts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.export-modal-header h3,
.shortcuts-modal-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.close-modal-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-background);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition-fast);
}

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

.export-modal-body,
.shortcuts-modal-body {
  padding: var(--space-lg);
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.export-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.export-option:hover {
  border-color: var(--color-primary-light);
  background: var(--color-primary-light);
}

.export-option input[type="radio"] {
  margin: 0;
}

.export-option span {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.export-option small {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-top: 2px;
}

.export-filters h4 {
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-md);
}

.export-filters label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  cursor: pointer;
}

.export-modal-footer {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  padding: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.btn-primary,
.btn-secondary {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
}

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

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

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

/* Keyboard Shortcuts Modal */
.shortcuts-section {
  margin-bottom: var(--space-lg);
}

.shortcuts-section h4 {
  margin: 0 0 var(--space-md);
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

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

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

.shortcut-item kbd {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: var(--font-size-xs);
  font-family: monospace;
  margin: 0 2px;
}

.shortcut-item span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* Toast Notifications */
.export-success-toast {
  border-radius: var(--radius-md);
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.toast-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-text strong {
  display: block;
  margin-bottom: 2px;
}

.toast-text div {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

/* Filter Feedback */
.filter-feedback {
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .activity-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }
  
  .activity-search-container {
    max-width: none;
  }
  
  .activity-filters {
    flex-wrap: wrap;
  }
  
  .export-modal-content,
  .shortcuts-modal-content {
    width: 95%;
    margin: var(--space-md);
  }
  
  .shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

/* Enhanced Theme Toggle */
.action-button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
}

.action-button:hover {
  background: var(--color-surface-elevated);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.action-button:active {
  transform: scale(0.95);
}

.theme-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: all var(--transition-fast);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .profile-content {
    grid-template-columns: auto 1fr;
    gap: var(--space-lg);
  }
  
  .profile-stats {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: var(--space-lg);
  }
  
  .repositories-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Animation Classes */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.dashboard-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-xl);
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error States */
.error-state {
  text-align: center;
  padding: var(--space-4xl);
  color: var(--color-text-secondary);
}

/* Ensure proper display of dashboard sections ONLY when dashboard is active */
body.dashboard-visible .dashboard-section,
.dashboard.loaded .dashboard-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

body.dashboard-visible .dashboard,
.dashboard.loaded {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Fix for repositories not showing - only when dashboard is visible */
body.dashboard-visible #repositories-grid,
.dashboard.loaded #repositories-grid {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
  gap: 1.5rem !important;
  min-height: 200px !important;
}

/* Fix for activity timeline not showing - only when dashboard is visible */
body.dashboard-visible #activity-timeline,
.dashboard.loaded #activity-timeline {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 200px !important;
}

/* Fix for stats grid not showing - only when dashboard is visible */
body.dashboard-visible #stats-grid,
.dashboard.loaded #stats-grid {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 1.5rem !important;
  min-height: 120px !important;
}

/* Ensure dashboard is hidden by default */
.dashboard:not(.loaded),
body:not(.dashboard-visible) .dashboard {
  display: none !important;
}

/* Ensure dashboard sections are hidden when dashboard is not visible */
body:not(.dashboard-visible) .dashboard-section {
  display: none !important;
}

/* ===== DEBUG STYLES FOR EMPTY GRIDS ===== */
#repositories-grid:empty::after {
  content: "Loading repositories...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

#activity-timeline:empty::after {
  content: "Loading recent activity...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* Force activity timeline to show - Strong CSS */
#recent-activity {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 300px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 20px !important;
  border-radius: 15px !important;
  margin-bottom: 20px !important;
}

#activity-timeline {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 200px !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 10px !important;
  padding: 15px !important;
}

#stats-grid:empty::after {
  content: "Loading statistics...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* ===== ENHANCED REPOSITORY CARD STYLES ===== */
.repository-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.repo-header {
  flex-grow: 1;
}

.repo-name a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.repo-name a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.repo-description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0.5rem 0;
}

.repo-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.repo-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.stat-icon {
  width: 16px;
  height: 16px;
}

.repo-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.language-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ===== ENHANCED ACTIVITY TIMELINE STYLES ===== */
.timeline-item {
  border-left: 3px solid var(--color-primary);
  padding-left: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  display: flex !important;
  gap: 15px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 4px solid var(--color-primary);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.timeline-info {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
  font-size: 16px;
  line-height: 1.4;
}

.timeline-description {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.timeline-time {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.timeline-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-header h3 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 20px;
  font-weight: 600;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

.timeline-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: block;
}

.timeline-empty p {
  margin: 5px 0;
  line-height: 1.5;
}

/* Event type specific colors */
.timeline-icon.push { background: #22c55e; }
.timeline-icon.create { background: #3b82f6; }
.timeline-icon.watch { background: #f59e0b; }
.timeline-icon.fork { background: #8b5cf6; }
.timeline-icon.issues { background: #ef4444; }
.timeline-icon.pull-request { background: #06b6d4; }
.timeline-icon.default { background: #6366f1; }

/* ===== TOAST NOTIFICATION STYLES ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  font-size: 14px;
  font-weight: 500;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  color: inherit;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Toast variants */
.toast.success {
  background: rgba(0, 0, 0, 0.9);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.5);
}

.toast.error {
  background: rgba(0, 0, 0, 0.9);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}

.toast.warning {
  background: rgba(0, 0, 0, 0.9);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.5);
}

.toast.info {
  background: rgba(0, 0, 0, 0.9);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ===== END TOAST NOTIFICATIONS ===== */

/* ===== BEAUTIFUL MODERN PRELOADER ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  overflow: hidden;
}

.loading-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bg-pattern {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.bg-pattern-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-pattern-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.bg-pattern-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

.loading-content {
  text-align: center;
  color: white;
  z-index: 1;
  position: relative;
}

.logo-container {
  position: relative;
  margin-bottom: 3rem;
}

.logo-main {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.logo-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
}

.core-ring {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
}

.ring-1 {
  width: 100%;
  height: 100%;
  animation: spin 2s linear infinite;
}

.ring-2 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  animation: spin 3s linear infinite reverse;
}

.ring-3 {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  animation: spin 4s linear infinite;
}

.core-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.core-icon {
  width: 16px;
  height: 16px;
  color: #667eea;
}

.star-icon {
  animation: pulse 2s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 100px;
  height: 100px;
  animation: spin 8s linear infinite;
}

.orbit-2 {
  width: 120px;
  height: 120px;
  animation: spin 12s linear infinite reverse;
}

.orbit-3 {
  width: 140px;
  height: 140px;
  animation: spin 16s linear infinite;
}

.orbit-item {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.pulse-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: pulse-expand 3s ease-out infinite;
}

.wave-1 {
  animation-delay: 0s;
}

.wave-2 {
  animation-delay: 1s;
}

.wave-3 {
  animation-delay: 2s;
}

.brand-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.title-part {
  display: inline-block;
  animation: bounce-in 1s ease-out forwards;
}

.title-part.highlight {
  background: linear-gradient(45deg, #fff, #f0f9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s ease-in-out infinite;
}

.loading-subtitle {
  font-size: 1.2rem;
  margin: 0 0 2rem 0;
  opacity: 0.9;
  font-weight: 500;
}

.subtitle-icon {
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
  margin: 0 0.5rem;
}

.loading-message {
  font-size: 1rem;
  margin: 0 0 3rem 0;
  opacity: 0.8;
  animation: fade-pulse 2s ease-in-out infinite;
}

.loading-progress-container {
  margin-bottom: 2rem;
}

.progress-track {
  position: relative;
  width: 300px;
  height: 8px;
  margin: 0 auto 1rem auto;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #fff, #f0f9ff, #fff);
  border-radius: 4px;
  transition: width 0.3s ease;
  overflow: hidden;
}

.progress-glow {
  position: absolute;
  top: -2px;
  left: -10px;
  right: -10px;
  bottom: -2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  filter: blur(4px);
  animation: glow-pulse 2s ease-in-out infinite;
}

.progress-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  animation: particle-flow 3s linear infinite;
}

.particle-1 {
  top: 2px;
  animation-delay: 0s;
}

.particle-2 {
  top: 2px;
  animation-delay: 1s;
}

.particle-3 {
  top: 2px;
  animation-delay: 2s;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

.loading-tips {
  margin-top: 2rem;
}

.tip-text {
  font-size: 0.9rem;
  opacity: 0.7;
  animation: fade-pulse 3s ease-in-out infinite;
}

/* Loading Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes fade-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes particle-flow {
  0% {
    left: -4px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .brand-title {
    font-size: 2.5rem;
  }
  
  .progress-track {
    width: 250px;
  }
  
  .logo-main {
    width: 100px;
    height: 100px;
  }
}

/* ===== END BEAUTIFUL PRELOADER ===== */
