/* Global styles */
:root {
  --primary-color: #4c6ef5;
  --primary-dark: #364fc7;
  --secondary-color: #ff6b6b;
  --text-color: #333;
  --light-gray: #f8f9fa;
  --mid-gray: #e9ecef;
  --dark-gray: #868e96;
  --white: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  
  /* Design preview colors */
  --professional-primary: #0088CC;
  --professional-secondary: #FFFFFF;
  --creative-primary: #FF5733;
  --creative-secondary: #FFFAF0;
  --minimal-primary: #FFFFFF;
  --minimal-secondary: #000000;
  --dark-primary: #1E1E1E;
  --dark-secondary: #FFFFFF;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-gray); /* Fallback color */
  background-image: url('/background.png'); /* Add background image */
  background-size: cover; /* Cover the entire viewport */
  background-position: center center; /* Center the image */
  background-repeat: no-repeat; /* Do not repeat the image */
  background-attachment: fixed; /* Keep background fixed on scroll */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hidden {
  display: none !important;
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 2rem; /* Reduced margin slightly */
}

.logo-image { /* Style for the new logo image */
  height: 60px; /* Adjust height as needed */
  width: auto;
  display: block;
  margin: 0 auto 1rem auto; /* Center the logo and add bottom margin */
}

/* Remove or comment out old logo icon/text styles if they exist */
/* .logo i { ... } */
/* .logo h1 { ... } */

header h2 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--white);
}

/* Form styles */
.form-container {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--mid-gray);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: var(--transition);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(76, 110, 245, 0.2);
}

/* File input styles */
.file-input-container {
  position: relative;
  border: 2px dashed var(--mid-gray);
  border-radius: 5px;
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.file-input-container:hover {
  border-color: var(--primary-color);
}

.file-input-container input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cloud-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
}

.file-types-info {
  font-size: 0.8rem;
  color: var(--dark-gray);
  margin-top: 0.5rem;
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/* Range input styles */
.range-container {
  display: flex;
  align-items: center;
}

input[type="range"] {
  flex: 1;
  height: 5px;
  background-color: var(--mid-gray);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background-color: var(--primary-dark);
}

#slide-count-display {
  min-width: 80px;
  text-align: right;
  margin-left: 1rem;
  font-weight: 600;
}

/* Design options styles */
.design-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.design-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: var(--transition);
}

.design-option:hover {
  background-color: var(--light-gray);
}

.design-option.active {
  background-color: var(--light-gray);
  border: 2px solid var(--primary-color);
}

.design-preview {
  width: 100%;
  height: 80px;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  position: relative;
}

.design-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
}

.design-preview::after {
  content: '';
  position: absolute;
  top: 40%;
  left: 10%;
  width: 80%;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

.design-preview.professional {
  background-color: var(--professional-secondary);
}

.design-preview.professional::before {
  background-color: var(--professional-primary);
}

.design-preview.creative {
  background-color: var(--creative-secondary);
}

.design-preview.creative::before {
  background-color: var(--creative-primary);
}

.design-preview.minimal {
  background-color: var(--minimal-primary);
  border: 1px solid var(--mid-gray);
}

.design-preview.minimal::before {
  background-color: var(--minimal-primary);
  border-bottom: 1px solid var(--minimal-secondary);
}

.design-preview.dark {
  background-color: var(--dark-primary);
}

.design-preview.dark::before {
  background-color: var(--dark-primary);
  border-bottom: 1px solid var(--dark-secondary);
}

.design-option span {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Button styles */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

button i {
  margin-right: 0.5rem;
}

#generate-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1.1rem;
  padding: 1rem;
}

#generate-btn:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--mid-gray);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--dark-gray);
  color: var(--white);
}

/* Loading container styles */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--light-gray);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  margin-bottom: 1.5rem;
}

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

.loading-text h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.loading-text p {
  color: var(--dark-gray);
}

/* Error container styles */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-container i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.error-container h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.error-container p {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}

/* Download Section Styles */
.download-section {
  background-color: var(--light-gray); /* Light background */
  border: 1px solid var(--mid-gray);
  border-radius: 8px;
  padding: 1.5rem 2rem; /* More padding */
  margin-top: 2rem;
  text-align: center;
  position: relative; /* Needed for absolute positioning of close button */
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.download-section p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.download-actions {
  display: flex;
  justify-content: center; /* Center buttons horizontally */
  align-items: center;
  gap: 1rem; /* Space between buttons */
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Style the new close button */
.close-download-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: var(--transition);
}

.close-download-btn:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

/* Ensure consistent button styling within the section */
.download-actions .button {
  /* Inherit base button styles, add specifics if needed */
  padding: 0.75rem 1.5rem;
}

.download-actions .download-button {
  /* Specific styles for primary download button if needed */
  background-color: var(--primary-color);
  color: var(--white);
}
.download-actions .download-button:hover {
  background-color: var(--primary-dark);
}

.download-actions .secondary-button {
  /* Styles for the 'Create New' button */
  background-color: var(--mid-gray);
  color: var(--text-color);
  border: 1px solid var(--dark-gray);
}
.download-actions .secondary-button:hover {
  background-color: var(--dark-gray);
  color: var(--white);
}

/* Footer styles */
footer {
  text-align: center;
  padding-top: 2rem;
  color: var(--dark-gray);
  font-size: 0.9rem;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Make feedback link white and more prominent */
#feedback-link {
  color: white !important;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: linear-gradient(45deg, var(--primary-color), #00d4aa);
  transition: all 0.3s ease;
}

#feedback-link:hover {
  text-decoration: none !important;
  background: linear-gradient(45deg, #5a7bfb, #00e6b8);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 110, 245, 0.3);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Darker background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Ensure it's on top */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"] {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 90%;
  max-width: 500px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content,
.modal-overlay[style*="display: flex"] .modal-content {
  transform: translateY(0);
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-content p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--dark-gray);
  transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
  color: var(--text-color);
  outline: none;
}

.modal-content .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-content .button:hover {
  transform: translateY(-2px);
}

.modal-content .button:not(.secondary-button) {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(76, 110, 245, 0.3);
}

.modal-content .secondary-button {
  background-color: var(--mid-gray);
  color: var(--text-color);
  font-weight: 500;
}

.modal-content .secondary-button:hover {
  background-color: var(--dark-gray);
  color: var(--white);
}

/* Feedback Modal Styles */
.feedback-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.feedback-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.feedback-modal-content {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 90%;
  max-width: 500px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.feedback-modal-overlay.active .feedback-modal-content {
  transform: translateY(0);
}

.feedback-modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.feedback-modal-content p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: var(--text-color);
}

.feedback-status {
    margin-top: 1rem;
    font-weight: bold;
}
.feedback-status.success {
    color: green;
}
.feedback-status.error {
    color: var(--secondary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .form-container {
    padding: 1.5rem;
  }
  
  .design-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Added style for URL inputs */
input[type="url"] {
  width: 100%; /* Make URL inputs take full width */
  padding: 0.75rem;
  border: 1px solid var(--mid-gray);
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

/* Added style for password inputs */
input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--mid-gray);
  border-radius: 5px;
}

/* Format options styles */
.format-options, .type-options {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.format-choice, .type-choice {
  display: flex;
  align-items: center;
}

.format-choice input[type="radio"], .type-choice input[type="radio"] {
  margin-right: 0.5rem;
}

.format-choice label, .type-choice label {
  margin-bottom: 0; /* Override default form-group label margin */
  font-weight: normal;
}

/* Video duration display */
#video-duration-display {
  margin-left: 1rem;
  color: var(--primary-color);
  font-weight: 600;
} 