/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background-color: #FFFFFF;
  color: #000000;
  padding: 2rem;
}

/* Container & Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  border: 5px solid #000;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 5px solid #000;
  padding: 6rem 2rem 2rem 2rem; /* Increased top padding for back button */
  position: relative; /* For back button positioning */
}

.title {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.subtitle {
  font-size: 1.2rem;
  color: #000000;
}

.main-content {
  padding: 0;
}

/* Card */
.card {
  background: #FFFFFF;
  border: none; /* Border handled by container */
  width: 100%;
  overflow: hidden;
}

/* Steps */
.step {
  display: none;
  padding: 2rem;
  animation: none;
}

.step.active {
  display: block;
}

.step-header {
  border-bottom: 4px solid #000;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.step-title {
  font-size: 2.2rem;
  font-weight: bold;
}

/* Forms */
.input-section {
  margin-bottom: 2rem;
  border-bottom: 2px dashed #000;
  padding-bottom: 1.5rem;
}

.input-section:last-of-type {
    border-bottom: none;
}

.input-section label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: #000000;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 15px;
  border: 4px solid #000;
  font-size: 1.1rem;
  font-family: 'Courier New', Courier, monospace;
  background: #FFFFFF;
  resize: vertical;
  color: #000000;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 8px 8px 0px #007BFF;
}

/* Adjective Input Group */
.adjective-input-group {
  display: flex;
  gap: 0;
}

.adjective-input-group input[type="text"] {
  flex-grow: 1;
  border-right: none;
}

.btn-add {
  padding: 0.75rem 1.5rem;
  border: 4px solid #000;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: #007BFF;
  color: #FFFFFF;
  transition: all 0.1s ease;
  box-shadow: 6px 6px 0px #000;
}

.btn-add:hover:not(:disabled) {
  transform: translate(6px, 6px);
  box-shadow: none;
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border: 4px solid #000;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: #FFFFFF;
  color: #000000;
  transition: all 0.1s ease;
  box-shadow: 6px 6px 0px #000;
  text-decoration: none;
  display: inline-flex; /* For consistent sizing */
  align-items: center;
  justify-content: center;
}

.btn:hover:not(:disabled) {
  transform: translate(6px, 6px);
  box-shadow: none;
}

.btn:disabled {
  background-color: #cccccc;
  color: #888888;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-primary {
    background-color: #007BFF;
    color: #FFFFFF;
    box-shadow: 6px 6px 0px #000;
}

.action-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}

/* Navigation */
.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-top: 5px solid #000;
  margin-top: 2rem;
}

.step-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 15px;
    height: 15px;
    border: 3px solid #000;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: all 0.1s ease;
}

.dot.active {
    background-color: #007BFF;
}

.dot.completed {
    background-color: #000000;
}

/* Tool Selection on Index */
.tool-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 2rem;
}

.tool-card {
    border: 5px solid #000;
    padding: 2.5rem;
    text-align: center;
    text-decoration: none;
    color: #000;
    transition: all 0.1s ease;
    box-shadow: 12px 12px 0px #007BFF;
}

.tool-card:hover {
    transform: translate(12px, 12px);
    box-shadow: none;
}

.tool-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #000000;
}

/* Progress Bar */
.progress-container {
    margin-top: 1.5rem;
    border: 4px solid #000;
    padding: 5px;
    background-color: #FFFFFF;
}

.progress-bar {
  height: 15px;
  background: #FFFFFF;
  border: none;
  margin-top: 0;
}

.progress-fill {
  height: 100%;
  background: #007BFF;
  width: 0%;
  transition: width 0.3s ease;
}

/* Summary */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 4px solid #000;
    padding-bottom: 1.5rem;
}

.result-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.result-header p {
    font-size: 1.1rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    border: 4px solid #000;
    padding: 1.5rem;
    margin-bottom: 0;
    background-color: #FFFFFF;
}

.summary-card h4 {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.summary-card p {
    font-size: 1rem;
    line-height: 1.4;
}

/* Adjective Tags */
.adjective-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 60px;
  border: 4px solid #000;
  padding: 15px;
  background: #FFFFFF;
}

.adjective-tag {
  background: #FFFFFF;
  color: #000;
  padding: 10px 15px;
  border: 2px solid #000;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remove-tag {
    background: none;
    border: none;
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    line-height: 1;
}

.btn-back {
    position: absolute;
    top: 2rem; /* Adjusted top position */
    left: 2rem;
    text-decoration: none;
    background: #FFFFFF;
    color: #000;
    border: 4px solid #000;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 6px 6px 0px #000;
    transition: all 0.1s ease;
}

.btn-back:hover {
    transform: translate(6px, 6px);
    box-shadow: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .container {
    border: 3px solid #000;
  }

  .header {
    padding: 3rem 1.5rem 1.5rem 1.5rem; /* Increased top padding for back button */
    margin-bottom: 2rem;
    border-bottom: 3px solid #000;
  }

  .header .title {
    margin-top: 1rem; /* Push title down from back button */
  }

  .header .subtitle {
    margin-top: 0.5rem; /* Push subtitle down */
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .step {
    padding: 1.5rem;
  }

  .step-header {
    border-bottom: 3px solid #000;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
  }

  .step-title {
    font-size: 1.8rem;
  }

  .input-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .input-section label {
    font-size: 1.1rem;
  }

  input[type="text"],
  input[type="date"],
  textarea {
    padding: 12px;
    border: 3px solid #000;
    font-size: 1rem;
  }

  input[type="text"]:focus,
  input[type="date"]:focus,
  textarea:focus {
    box-shadow: 6px 6px 0px #007BFF;
  }

  .btn-add {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
  }

  .btn-add:hover:not(:disabled) {
    transform: translate(4px, 4px);
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
  }

  .btn:hover:not(:disabled) {
    transform: translate(4px, 4px);
  }

  .btn-primary {
    box-shadow: 4px 4px 0px #000;
  }

  .action-buttons {
    gap: 1rem;
    margin-top: 2rem;
  }

  .navigation {
    padding: 1.5rem;
    border-top: 3px solid #000;
    margin-top: 1.5rem;
  }

  .dot {
    width: 12px;
    height: 12px;
    border: 2px solid #000;
  }

  .tool-selection {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .tool-card {
    border: 3px solid #000;
    padding: 2rem;
    box-shadow: 8px 8px 0px #007BFF;
  }

  .tool-card:hover {
    transform: translate(8px, 8px);
  }

  .tool-card h3 {
    font-size: 1.5rem;
  }

  .progress-container {
    border: 3px solid #000;
    padding: 4px;
  }

  .progress-bar {
    height: 12px;
  }

  .summary-card {
    border: 3px solid #000;
    padding: 1.2rem;
  }

  .summary-card h4 {
    font-size: 1rem;
  }

  .summary-card p {
    font-size: 0.9rem;
  }

  .adjective-tags {
    gap: 8px;
    min-height: 50px;
    border: 3px solid #000;
    padding: 12px;
  }

  .adjective-tag {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid #000;
  }

  .remove-tag {
    font-size: 1.1rem;
  }

  .btn-back {
    top: 0.5rem; /* Adjusted to be within the new padding */
    left: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
  }

  .btn-back:hover {
    transform: translate(4px, 4px);
  }
}
