/*--------------------------------------
  CSS Variables & Global Styles
----------------------------------------*/
:root {
  --primary-color: #003366;
  --primary-hover: #002244;
  --accent-color: #ffd400;
  --accent-hover: #ffdb4c;
  --bg-color: #ffffff;
  --text-color: #333333;
  --warning-bg: #cc0000;
  --container-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f9f9f9;
  color: var(--text-color);
  line-height: 1.5;
}

/*--------------------------------------
  Overall Containers
----------------------------------------*/
.homepage {
  margin: 0 auto;
  padding: 0;
}

.container {
  max-width: 700px;
  margin: 2rem auto;
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--container-shadow);
}

/* Utility: Center text */
.center {
  text-align: center;
}

/*--------------------------------------
  Welcome Screen
----------------------------------------*/
.welcome-screen {
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.8s ease-in-out;
}
.welcome-screen h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}
.welcome-screen p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-color);
}

/*--------------------------------------
  Headings & Progress Text
----------------------------------------*/
h1, h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.progress-text {
  margin-bottom: 1rem;
  font-weight: bold;
}

/*--------------------------------------
  Button Styles
----------------------------------------*/
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
  margin-top: 1rem;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: scale(1.02);
}

.btn-secondary {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--accent-hover);
  transform: scale(1.02);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/*--------------------------------------
  Question Slide (Wizard) Styles
----------------------------------------*/
.question-slide {
  display: none;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  min-height: 200px;
  padding: 1rem 0;
}

.question-slide.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/*--------------------------------------
  Radio Button Options
----------------------------------------*/
.options {
  margin: 1rem 0;
}

.options label {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
  padding: 0.4rem;
  transition: background-color 0.3s;
}

.options label:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Result Screen Container */
.result-screen {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.result-screen.active {
  display: block;
}

/* Center content wrapper */
.result-content {
  max-width: 700px;
  margin: 0 auto;
}

/* Result Headings */
.result-heading {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.score-display,
.level-display {
  font-size: 1.25rem;
  margin: 0.5rem 0 1rem;
  color: #444;
}

/* Score Table */
.score-table-container {
  margin: 2rem auto;
  overflow-x: auto;
}

.score-table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 100%;
  max-width: 500px;
}

.score-table th,
.score-table td {
  border: 1px solid #ccc;
  padding: 0.75rem;
  text-align: center;
}

.score-table th {
  background-color: #f2f2f2;
}


/* Email Analysis Form Container */
.analysis-request-form {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.analysis-card {
  background: linear-gradient(135deg, #f0f7ff, #ffffff);
  border: 1px solid #d0e3ff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.1);
  transition: all 0.3s ease;
}

.analysis-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 51, 102, 0.15);
}

.analysis-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: #003366;
}

.analysis-subtext {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #333;
}

.analysis-card input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  transition: border-color 0.3s;
}

.analysis-card input[type="email"]:focus {
  border-color: #003366;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

.feedback-message {
  margin-top: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: green;
}
.post-analysis-prompt {
  margin-top: 1.5rem;
  text-align: center;
  background: #f0f8ff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-analysis-prompt p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.post-analysis-prompt a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: underline;
}

.post-analysis-prompt .btn {
  margin-top: 0.5rem;
}



/*--------------------------------------
  Floating Alert Message
----------------------------------------*/
.alert-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: none;
  padding: 0.8rem 1.5rem;
  background-color: var(--warning-bg);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  text-align: center;
}

/*--------------------------------------
  Animations
----------------------------------------*/
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/*--------------------------------------
  Responsive Design for Mobile Devices
----------------------------------------*/
@media (max-width: 600px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .question-slide {
    min-height: auto;
    padding: 0.8rem 0;
  }

  .options label {
    font-size: 0.95rem;
  }

  .score-table th,
  .score-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}
