/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  font-size: 16px;
}

/* Container and Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
  padding: 2rem 1.5rem 1rem;
  background: linear-gradient(135deg, #4f8a8b 0%, #6fb3b8 100%);
  color: white;
  text-align: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 16.67%;
}

.step-indicators {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.step-dot.active {
  background: white;
  color: #4f8a8b;
}

.step-dot.completed {
  background: #2ecc71;
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 1.5rem;
}

.step-container {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-container.active {
  display: block;
}

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

.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-header h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.step-description {
  color: #7f8c8d;
  font-size: 1.1rem;
}

/* Forms */
.step-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
  outline: none;
  border-color: #4f8a8b;
  box-shadow: 0 0 0 3px rgba(79, 138, 139, 0.1);
}

input.error,
textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.helper-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #7f8c8d;
  font-style: italic;
}

/* Dynamic Lists */
.stakeholder-item,
.goal-item,
.milestone-item,
.responsibility-item {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  position: relative;
}

.remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.remove-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.add-btn {
  background: #4f8a8b;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.add-btn:hover {
  background: #3d6f70;
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #4f8a8b;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #3d6f70;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #ecf0f1;
  color: #2c3e50;
}

.btn-secondary:hover:not(:disabled) {
  background: #d5dbdb;
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Navigation */
.navigation {
  padding: 1.5rem;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Score Display */
.score-container {
  text-align: center;
  margin-bottom: 2rem;
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f8a8b 0%, #6fb3b8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  position: relative;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.score-value {
  font-size: 2.5rem;
  font-weight: 700;
}

.score-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.score-message {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #4f8a8b;
}

/* Summary Content */
.summary-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.summary-section {
  margin-bottom: 2rem;
}

.summary-section h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  border-bottom: 2px solid #4f8a8b;
  padding-bottom: 0.5rem;
}

.summary-section p,
.summary-section ul {
  color: #555;
  line-height: 1.6;
}

.summary-section ul {
  padding-left: 1.5rem;
}

.summary-section li {
  margin-bottom: 0.5rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: scaleIn 0.3s ease;
}

.modal h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.modal p {
  margin-bottom: 2rem;
  color: #7f8c8d;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e1e8ed;
  border-top: 4px solid #4f8a8b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 0;
    box-shadow: none;
  }

  .header {
    padding: 1.5rem 1rem 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .step-header h2 {
    font-size: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .navigation {
    padding: 1rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .score-circle {
    width: 120px;
    height: 120px;
  }

  .score-value {
    font-size: 2rem;
  }

  .modal {
    margin: 1rem;
  }

  .modal-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .step-indicators {
    gap: 0.5rem;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .summary-content {
    padding: 1.5rem;
  }

  input[type="text"],
  input[type="date"],
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Print Styles */
@media print {
  .header,
  .navigation,
  .action-buttons {
    display: none;
  }

  .container {
    box-shadow: none;
    max-width: none;
  }

  .summary-content {
    box-shadow: none;
    padding: 0;
  }

  .score-container {
    page-break-inside: avoid;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
input:focus,
textarea:focus {
  outline: 2px solid #4f8a8b;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    background: #000;
    color: #fff;
    border: 2px solid #000;
  }

  .btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }
}
