/* Machine Learning Score Prediction Styles */

.prediction-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 2rem;
  margin: 1rem 0;
  color: white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.prediction-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.prediction-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.prediction-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.prediction-subtitle {
  opacity: 0.8;
  font-size: 0.9rem;
}

.ai-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

/* Main Prediction Display */
.prediction-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.predicted-score {
  text-align: center;
  margin-bottom: 1rem;
}

.score-value {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  display: block;
  background: linear-gradient(45deg, #fff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.score-context {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  backdrop-filter: blur(10px);
}

.par-context {
  font-size: 0.9rem;
  opacity: 0.8;
}

.to-par {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  background: rgba(255,255,255,0.2);
}

/* Confidence Display */
.confidence-section {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.confidence-label {
  text-align: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
}

.confidence-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
  border-radius: 4px;
  transition: width 1s ease;
  position: relative;
}

.confidence-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Factors Analysis */
.factors-section {
  position: relative;
  z-index: 1;
}

.factors-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.9;
}

.factor-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  margin: 0.75rem 0;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.factor-item.positive {
  border-left-color: #6bcf7f;
  background: rgba(107, 207, 127, 0.2);
}

.factor-item.negative {
  border-left-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.2);
}

.factor-item.neutral {
  border-left-color: #ffd93d;
  background: rgba(255, 217, 61, 0.2);
}

.factor-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.factor-content {
  flex: 1;
}

.factor-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.factor-description {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* Loading State */
.prediction-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  z-index: 1;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.loading-text {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.8;
  text-align: center;
}

/* Hole-by-Hole Predictions */
.hole-predictions {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.hole-predictions h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

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

.hole-prediction {
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
}

.hole-prediction:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.hole-number {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.hole-predicted-score {
  font-size: 1.2rem;
  font-weight: 700;
}

.hole-difficulty {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.hole-difficulty-fill {
  height: 100%;
  background: linear-gradient(90deg, #6bcf7f, #ffd93d, #ff6b6b);
}

/* Prediction History */
.prediction-history {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  color: #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.prediction-history h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

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

.history-hole {
  font-weight: 600;
}

.history-prediction {
  color: #667eea;
  font-weight: 600;
}

.history-actual {
  font-weight: 600;
}

.history-accuracy {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.history-accuracy.good {
  background: #d4edda;
  color: #155724;
}

.history-accuracy.poor {
  background: #f8d7da;
  color: #721c24;
}

/* Status Messages */
.prediction-status {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.prediction-status.success {
  background: #28a745;
}

.prediction-status.warning {
  background: #ffc107;
  color: #212529;
}

.prediction-status.error {
  background: #dc3545;
}

.prediction-status.info {
  background: #17a2b8;
}

/* Compact Mode */
.prediction-compact {
  padding: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  margin: 0.5rem 0;
}

.compact-score {
  font-size: 2rem;
  font-weight: 700;
}

.compact-confidence {
  font-size: 0.8rem;
  opacity: 0.8;
}

.compact-factors {
  display: flex;
  gap: 0.5rem;
}

.compact-factor {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.compact-factor.positive {
  background: #6bcf7f;
}

.compact-factor.negative {
  background: #ff6b6b;
}

.compact-factor.neutral {
  background: #ffd93d;
}

/* Responsive Design */
@media (max-width: 768px) {
  .prediction-container {
    padding: 1.5rem;
    margin: 0.5rem;
  }
  
  .score-value {
    font-size: 3rem;
  }
  
  .score-context {
    flex-direction: column;
    gap: 1rem;
  }
  
  .holes-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .factor-item {
    padding: 0.75rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .prediction-history {
    background: #2d3748;
    color: white;
  }
  
  .history-item {
    border-bottom-color: #4a5568;
  }
  
  .history-accuracy.good {
    background: #2d5016;
    color: #68d391;
  }
  
  .history-accuracy.poor {
    background: #742a2a;
    color: #feb2b2;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .confidence-fill,
  .loading-spinner,
  .factor-item,
  .hole-prediction {
    animation: none;
    transition: none;
  }
  
  .confidence-fill::after {
    animation: none;
  }
}

/* Performance optimizations */
.prediction-container {
  will-change: transform;
  contain: layout;
}

.confidence-fill {
  will-change: width;
}

.loading-spinner {
  will-change: transform;
}