/* Analysis Page Styles */

.analysis-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.analysis-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  margin: 0;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 24px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.chart-card:hover::before {
  opacity: 1;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(0, 255, 255, 0.3);
  padding-bottom: 12px;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  margin: 0;
}

.chart-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  margin-top: 20px;
}

.chart-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 0.9rem;
}

.clear-graph-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(255, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 0, 0, 0.4);
  border-radius: 10px;
  color: #ff6b6b;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 0 rgba(255, 0, 0, 0);
}

.clear-graph-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.clear-graph-btn:hover::before {
  width: 300px;
  height: 300px;
}

.clear-graph-btn:hover {
  background: rgba(255, 0, 0, 0.15);
  border-color: rgba(255, 0, 0, 0.6);
  color: #ff5252;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 0, 0, 0.4);
  transform: translateY(-2px);
}

.clear-graph-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(255, 0, 0, 0.3);
}

.clear-graph-btn svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.5));
}

.clear-graph-btn:hover svg {
  transform: rotate(90deg) scale(1.1);
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.8));
}

.clear-graph-btn span {
  position: relative;
  z-index: 1;
}

/* Custom Modal Styles */
.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.custom-modal-content {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 16px;
  padding: 0;
  max-width: 450px;
  width: 90%;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 255, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.custom-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.custom-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.custom-modal-body {
  padding: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.custom-modal-body p {
  margin: 0;
}

.custom-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.custom-modal-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1.5px solid;
}

.custom-modal-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.custom-modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.custom-modal-btn-confirm {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.5);
  color: #ff6b6b;
}

.custom-modal-btn-confirm:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.7);
  color: #ff5252;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  transform: translateY(-1px);
}

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

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

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

/* Toast notification animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.exercise-selector {
  margin-bottom: 20px;
}

.select-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
}

.select-input:hover {
  border-color: rgba(0, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.12);
}

.select-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.12);
}

.select-input option {
  background: #1a1a2e;
  color: white;
  padding: 12px;
  font-size: 0.95rem;
}

.select-input option:checked {
  background: rgba(0, 255, 255, 0.2);
  color: var(--neon-cyan);
}

.select-input option:hover {
  background: rgba(0, 255, 255, 0.15);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.stat-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.stat-value-container {
  display: inline-block;
  min-width: 60px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.stat-value-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--neon-cyan);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  width: 100%;
  padding: 0;
  margin: 0;
  cursor: text;
  min-width: 60px;
  pointer-events: auto;
  position: relative;
  z-index: 10;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.stat-value-input::-webkit-outer-spin-button,
.stat-value-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stat-value-input:focus {
  background: rgba(0, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 4px;
  outline: 1px solid rgba(0, 255, 255, 0.3);
}

.stat-value-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-shadow: none;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.stat-change {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.stat-change.positive {
  color: #51cf66;
}

.stat-change.negative {
  color: #ff6b6b;
}

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

/* Responsive */
@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

