:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.1);
  --secondary: #10b981;
  --secondary-hover: #059669;
  --bg-light: #f9fafb;
  --bg-gradient: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  color: var(--text-dark);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
  width: 100%;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 4px;
  background: linear-gradient(90deg, #10b98100, var(--secondary));
  border-radius: 2px;
}

.description {
  color: var(--text-light);
  max-width: 600px;
  margin: 1.5rem auto 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

.main-content {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  animation: slideUp 0.5s ease-out;
  animation-fill-mode: both;
  animation-delay: 0.2s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-section,
.output-section {
  flex: 1;
  min-width: 320px;
}

.output-section {
  border: dotted 5px var(--border);
}

.card {
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  border: 1px solid rgba(229, 231, 235, 0.5);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

h2::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--secondary);
  opacity: 0.7;
  box-shadow: 0 0px 10px rgba(79, 70, 229, 1);
  border-radius: 50%;
  margin-right: 0.75rem;
  position: relative;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.8rem;
}

textarea {
  width: 100%;
  min-height: 200px;
  margin-bottom: 1.5rem;
  resize: vertical;
}

textarea,
input {
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.file-input {
  margin-bottom: 1.5rem;
}

#resume-file {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

/* Update the file input styling */
#file-input {
  position: relative;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  height: 40px;
  background-color: var(--bg-light);
}

#resume-file {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

/* Style for the browse button */
#file-input::after {
  content: "Browse files";
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  padding: 0 1rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
}

/* Default text when no file is selected */
#file-input::before {
  content: "No file selected";
  position: absolute;
  left: 1rem;
  top: 8px;
  height: 100%;
  display: flex;
  align-items: center;
  color: var(--text-light);
  z-index: 1;
  pointer-events: none;
}

/* Show filename when a file is selected */
#file-input.file-selected::before {
  content: attr(data-filename);
  color: var(--text-dark);
  font-weight: 500;
}

/* Hover and focus states */
#file-input:hover {
  border-color: var(--primary);
}

#file-input:focus-within {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  min-width: 44px; /* Ensures a minimum clickable area */
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg) translateX(-100%);
  transition: all 0.6s ease;
}

.btn:hover {
  background-color: var(--primary-hover);
  /*transform: translateY(-3px);*/
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
}

.btn:hover::after {
  transform: skewX(-20deg) translateX(300%);
}

.btn:active {
  transform: translateY(-1px);
}

.btn:disabled {
  background: linear-gradient(135deg, var(--text-light) 0%, #9ca3af 100%);
  cursor: not-allowed;
  box-shadow: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  outline: 2px solid var(--focus, #333);
}

.result {
  white-space: pre-wrap;
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.6;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.spinner {
  border: 4px solid rgba(79, 70, 229, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  color: #dc2626;
  padding: 1rem;
  background-color: #fee2e2;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #dc2626;
  font-weight: 500;
  display: flex;
  align-items: center;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

.error::before {
  content: "⚠️";
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.hidden {
  display: none !important;
}

/* Enhanced results card */
#results .card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

#results h2 {
  color: #0284c7;
}

#results h2::before {
  background-color: rgba(2, 132, 199, 0.1);
}

#results h2::after {
  background-color: #0284c7;
}

#results p {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #0369a1;
  font-weight: 500;
}

/*#results p::before {
  content: "✓";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  background-color: #0ea5e9;
  color: white;
  border-radius: 50%;
  margin-right: 0.75rem;
  font-weight: bold;
}*/

/* Loading animation enhancement */
.loading p {
  font-size: 1.1rem;
  margin-top: 0;
  font-weight: 500;
  background: linear-gradient(90deg, var(--text-dark), var(--primary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: textShine 2s linear infinite;
}

@keyframes textShine {
  to {
    background-position: 200% center;
  }
}

/* Ensure existing payment styles are kept */
#stripe-payment-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.payment-card {
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 2.5rem;
  max-width: 800px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.payment-header {
  margin-bottom: 2.5rem;
}

.payment-header h1 {
  color: var(--primary);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-item {
  padding: 1.5rem 1rem;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

.testimonial {
  background-color: rgba(79, 70, 229, 0.05);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
  text-align: left;
}

.quote {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.author {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.9rem;
}

.pricing-section {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-tag {
  margin-bottom: 1rem;
}

.price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.period {
  font-size: 1rem;
  color: var(--text-light);
}

.price-features {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-features li {
  font-size: 0.95rem;
  color: var(--text-dark);
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
  text-align: left;
}

.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 56, 202, 0.3);
}

.guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--text-light);
}

.guarantee svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.guarantee p {
  font-size: 0.9rem;
  margin: 0;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .card {
    padding: 1.5rem;
  }

  .main-content {
    gap: 1.5rem;
  }

  .payment-card {
    padding: 1.5rem;
  }

  .payment-header h1 {
    font-size: 1.8rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  .description {
    font-size: 1rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .spinner {
    width: 40px;
    height: 40px;
  }
}
