/* 2025 Enhanced Mobile Game Analytics Calculator Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Enhanced 2025 theme with professional mobile gaming analytics gradient */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 35%, #f093fb 70%, #f5576c 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  padding: 20px;
}

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

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

.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: white;
}

.header p {
  font-size: 1.2rem;
  opacity: 0.95;
  font-weight: 300;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
  margin-bottom: 25px;
}

@media (max-width: 1100px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card h2 {
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #667eea;
  font-size: 1.5rem;
  font-weight: 700;
}

.method-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.method-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

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

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

.method-btn.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.method-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
}

.input-group input, .input-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .input-row {
    grid-template-columns: 1fr;
  }
  
  .method-selector {
    flex-direction: column;
  }
}

.cohort-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cohort-table th, .cohort-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.cohort-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.cohort-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.remove-cohort, .add-cohort-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.remove-cohort {
  background: #ff4757;
  color: white;
}

.add-cohort-btn {
  background: #667eea;
  color: white;
  margin-top: 15px;
  padding: 12px 20px;
  font-size: 1rem;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: #667eea;
  color: white;
}

.tab-content {
  display: none;
}

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

.calculate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

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

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

.calculate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #667eea 100%);
}

.results-section {
  margin-top: 20px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 15px;
  border: 1px solid #e9ecef;
}

.metric-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.metric-card h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.metric-label {
  color: #777;
  font-size: 0.9rem;
}

.decision-box {
  padding: 25px;
  border-radius: 15px;
  margin-top: 25px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.decision-scale {
  background: linear-gradient(135deg, #00b09b 0%, #96c93d 50%, #4facfe 100%);
  color: white;
  animation: scaleGlow 2s ease-in-out infinite alternate;
}

@keyframes scaleGlow {
  0% { box-shadow: 0 10px 30px rgba(0, 176, 155, 0.3); }
  100% { box-shadow: 0 15px 40px rgba(0, 176, 155, 0.5); }
}

.decision-iterate {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 50%, #ff6b35 100%);
  color: white;
  animation: iterateGlow 2s ease-in-out infinite alternate;
}

@keyframes iterateGlow {
  0% { box-shadow: 0 10px 30px rgba(255, 167, 38, 0.3); }
  100% { box-shadow: 0 15px 40px rgba(255, 167, 38, 0.5); }
}

.decision-shutdown {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 50%, #d32f2f 100%);
  color: white;
  animation: shutdownGlow 2s ease-in-out infinite alternate;
}

@keyframes shutdownGlow {
  0% { box-shadow: 0 10px 30px rgba(239, 83, 80, 0.3); }
  100% { box-shadow: 0 15px 40px rgba(239, 83, 80, 0.5); }
}

.decision-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.decision-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
}

.benchmark-indicator {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 10px;
  font-weight: 600;
}

.benchmark-good {
  background: #4caf50;
  color: white;
}

.benchmark-average {
  background: #ff9800;
  color: white;
}

.benchmark-poor {
  background: #f44336;
  color: white;
}

.insights-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.insights-list li {
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.insights-list li::before {
  content: "→";
  color: #fff;
  font-weight: bold;
  margin-right: 15px;
  font-size: 1.2rem;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.warning-box h4 {
  color: #856404;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.warning-box p {
  color: #856404;
  font-size: 0.95rem;
  opacity: 1;
}

/* Ensure readability even if parent sets light text */
.decision-card .warning-box,
.decision-card .warning-box h4,
.decision-card .warning-box p,
.decision-card .warning-box li,
.decision-card .warning-box a {
  color: #5a4807 !important;
}

/* Chart Styles for 2025 Mobile Game Analytics */
.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 15px;
  padding: 25px 20px 20px 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
  margin: 25px 0;
}

.chart-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
  text-align: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  width: 100%;
  flex-shrink: 0;
}

.chart-subtitle {
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  margin-bottom: 15px;
  font-weight: 500;
  width: 100%;
  flex-shrink: 0;
}

.chart-container canvas {
  flex: 1;
  width: 100% !important;
  height: auto !important;
  max-height: 300px;
  position: relative !important;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 25px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.footer p {
  margin-bottom: 10px;
  font-size: 1rem;
}

.footer a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer a:hover {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.footer .tagline {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 15px;
  font-style: italic;
}

@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 280px;
    padding: 15px;
  }
  
  .chart-title {
    font-size: 1.1rem;
  }
  
  .chart-subtitle {
    font-size: 0.85rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .header p {
    font-size: 1rem;
  }
}
