/* Base Styles */
:root {
  --primary-color: #4776E6;
  --primary-gradient: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
  --secondary-color: #8E54E9;
  --dark-color: #2c3e50;
  --light-color: #f9fafc;
  --grey-light: #e9ecef;
  --grey-medium: #adb5bd;
  --grey-dark: #6c757d;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f5f7fa;
  color: var(--dark-color);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

.hidden {
  display: none !important;
}

/* App Layout */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background: var(--primary-gradient);
  color: white;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.app-header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: -0.5px;
}

.highlight {
  position: relative;
  z-index: 1;
}

.highlight::after {
  content: "";
  position: absolute;
  left: -5%;
  bottom: 0;
  width: 110%;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: -1;
  border-radius: 6px;
}

.badge {
  position: absolute;
  top: -15px;
  right: -60px;
  background-color: var(--warning-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(10deg);
  box-shadow: var(--shadow-sm);
}

.app-info {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.s3-uploader-link {
  display: inline-block;
  color: white;
  text-decoration: none;
  padding: 5px 12px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin-top: 5px;
}

.s3-uploader-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.s3-uploader-link i {
  margin-right: 5px;
}

.app-container {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.app-footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* Section Styling */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header i {
  font-size: 1.8rem;
  margin-right: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  color: var(--dark-color);
}

.upload-section, .results-section {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.upload-section {
  background-image: 
    radial-gradient(circle at 100% 100%, rgba(71, 118, 230, 0.03) 0, rgba(71, 118, 230, 0) 20px),
    radial-gradient(circle at 0% 0%, rgba(142, 84, 233, 0.03) 0, rgba(142, 84, 233, 0) 20px);
  background-color: white;
}

.upload-section:hover, .results-section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.upload-instructions, .results-instructions {
  color: var(--grey-dark);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 400;
}

/* Upload Examples Header */
.upload-examples-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.upload-examples-header h3 {
  color: var(--dark-color);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.upload-examples-header p {
  color: var(--grey-dark);
  font-size: 1.05rem;
}

/* Upload Examples */
.upload-examples {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0 2.5rem;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  padding: 0.5rem;
}

.upload-examples::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--primary-gradient);
  opacity: 0.3;
}

.upload-example {
  flex: 1;
  min-width: 280px;
  /* max-width: 400px; */
  background: white;
  border-radius: var(--border-radius-md);
  padding: 1.8rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  border: 1px solid var(--grey-light);
  position: relative;
  overflow: hidden;
}

.upload-example:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(71, 118, 230, 0.15);
  border-color: rgba(71, 118, 230, 0.2);
}

.upload-example::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-gradient);
}

.upload-example h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.upload-example h3 i {
  margin-right: 0.8rem;
  font-size: 1.3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.example-image {
  max-width: 400px;
  width: 100%;
  border-radius: var(--border-radius-sm);
  border: none;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.upload-example:hover .example-image {
  transform: scale(1.03);
}

.example-text {
  font-size: 0.95rem;
  color: var(--grey-dark);
  line-height: 1.6;
  margin-top: 1rem;
}

/* Buttons */
button, .button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0.8rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  text-decoration: none;
}

button i, .button i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(71, 118, 230, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(71, 118, 230, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #8E54E9 0%, #4776E6 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(142, 84, 233, 0.3);
}

.btn-tertiary {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.btn-tertiary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}


.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(142, 84, 233, 0.4);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
}

.upload-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

/* File List */
.file-list {
  list-style: none;
  margin: 1.5rem 0;
}

#selectedFiles li {
  background: var(--light-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  transition: transform var(--transition-fast);
}

#selectedFiles li:hover {
  transform: translateX(5px);
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-name {
  font-weight: 600;
  color: var(--dark-color);
}

.file-size {
  font-size: 0.8rem;
  color: var(--grey-dark);
}

/* Progress Bar */
.progress-container {
  background: var(--grey-light);
  border-radius: 50px;
  height: 16px;
  width: 100%;
  overflow: hidden;
  margin: 1.5rem 0;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 50px;
  transition: width 0.3s ease, background-color 0.5s ease;
  background-size: 30px 30px;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  animation: progress-animation 1.5s linear infinite;
}

@keyframes progress-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 0;
  }
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Loading */
#loadingContainer {
  margin-top: 1.5rem;
  background: white;
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-light);
}

#loadingText {
  display: flex;
  align-items: center;
  color: var(--dark-color);
  font-weight: 500;
  font-size: 1rem;
}

.loading-spinner {
  display: inline-block;
  min-width: 24px;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(71, 118, 230, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.75rem;
  box-shadow: 0 0 5px rgba(71, 118, 230, 0.1);
}

.progress-percent {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 700;
  margin-left: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status Message */
.status-message {
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  background: white;
}

.status-message.error {
  border-left-color: var(--danger-color);
  background: #fdf3f2;
  color: var(--danger-color);
}

.status-message.success {
  border-left-color: var(--success-color);
  background: #eafaf1;
  color: var(--success-color);
}

.status-message.help {
  border: 1px solid var(--grey-light);
  background: white;
  color: var(--dark-color);
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
}

/* Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--grey-light);
}

.card.loaded {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom: 1px solid var(--grey-light);
}

.card-info {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-name {
  color: var(--dark-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card-link {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 10px rgba(71, 118, 230, 0.2);
}

.card-link:hover {
  box-shadow: 0 6px 15px rgba(71, 118, 230, 0.3);
  transform: translateY(-2px);
}

/* Image Upload Card Styling */
.card.image-card {
  background: rgba(71, 118, 230, 0.03);
  min-height: 180px;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
  border: 2px dashed rgba(71, 118, 230, 0.2);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  margin: 10% auto;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  overflow: hidden;
  animation: modalFadeIn 0.3s ease;
}

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

.modal-header {
  padding: 1.5rem 2rem;
  background: var(--light-color);
  border-bottom: 1px solid var(--grey-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--dark-color);
  font-weight: 600;
}

.close-modal {
  color: var(--grey-dark);
  font-size: 1.8rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.close-modal:hover {
  color: var(--danger-color);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.version-entry {
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--grey-light);
}

.version-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.version-entry h4 {
  margin: 0 0 1rem 0;
  color: var(--dark-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.version-date {
  font-size: 0.85rem;
  color: var(--grey-dark);
  font-weight: normal;
}

.version-entry ul {
  margin: 0;
  padding-left: 1.5rem;
}

.version-entry li {
  margin-bottom: 0.7rem;
  color: var(--dark-color);
}

.version-history-icon {
  cursor: pointer;
  font-size: 1rem;
  display: inline-block;
  margin-left: 5px;
  transition: transform var(--transition-normal);
}

.version-history-icon:hover {
  transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 992px) {
  .app-header {
    padding: 1.5rem;
  }
  
  .app-container {
    padding: 1.5rem;
  }
  
  .app-header h1 {
    font-size: 1.8rem;
  }
  
  .badge {
    top: -10px;
    right: 0;
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .app-header h1 {
    font-size: 1.5rem;
  }
  
  .upload-section, .results-section {
    padding: 1.5rem;
  }
  
  .section-header i {
    font-size: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 1rem;
  }
  
  .app-header h1 {
    font-size: 1.3rem;
  }
  
  .badge {
    top: -8px;
    right: 0px;
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  
  .upload-buttons {
    flex-direction: column;
  }
  
  .upload-buttons button {
    width: 100%;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep any existing classes needed that may not be covered above */
.error-content {
  max-width: 450px;
  margin: 0 auto;
}

.error-heading {
  color: var(--dark-color);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.error-message {
  color: var(--grey-dark);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.success-message {
  background-color: #eafaf1;
  color: var(--success-color);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  background-color: var(--success-color);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.success-icon:after {
  content: '';
  display: block;
  width: 30px;
  height: 20px;
  border: solid white;
  border-width: 0 0 5px 5px;
  transform: rotate(-45deg);
  margin-top: -5px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  max-width: 350px;
}

.email-form input {
  padding: 0.8rem 1rem;
  border: 1px solid var(--grey-light);
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  width: 100%;
  transition: all var(--transition-normal);
  text-align: center;
}

.email-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.1);
}

.notify-button {
  background: var(--primary-gradient);
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  border-radius: var(--border-radius-sm);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(71, 118, 230, 0.3);
}

.notify-button:hover {
  background: var(--primary-gradient);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(71, 118, 230, 0.4);
}

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
}

.download-all-btn, .export-csv-btn, .editor-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0.8rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  color: white;
  min-width: 160px;
  box-shadow: var(--shadow-md);
}

.download-all-btn {
  background: var(--primary-gradient);
  box-shadow: 0 4px 15px rgba(71, 118, 230, 0.3);
}

.download-all-btn:hover {
  background: var(--primary-gradient);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(71, 118, 230, 0.4);
}

.export-csv-btn, .editor-btn {
  background: linear-gradient(135deg, #8E54E9 0%, #4776E6 100%);
  box-shadow: 0 4px 15px rgba(142, 84, 233, 0.3);
}

.export-csv-btn:hover, .editor-btn:hover {
  background: linear-gradient(135deg, #8E54E9 0%, #4776E6 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(142, 84, 233, 0.4);
}
  
/* Demo Files Section */
.demo-files-section {
  background-color: rgba(71, 118, 230, 0.05);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.demo-files-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.demo-files-section p {
  color: var(--grey-dark);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background-color: white;
  color: var(--dark-color);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  border: 1px solid var(--grey-light);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.demo-link:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-md);
}

.demo-link i {
  font-size: 1rem;
}
  

.my-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--grey-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.disabled {
    background-color: var(--grey-light);
    color: var(--grey-dark);
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}