/* Social Post Generator Styles */
:root {
  --color-purple: #6c5ce7;
  --color-lavender: #a29bfe;
  --color-teal: #00b894;
  --color-mint: #55efc4;
  --color-pink: #fd79a8;
  --primary-color: var(--color-purple);
  --text-color: #2c3e50;
}

/* Ensure header styles are applied */
header {
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-mint) 100%);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1;
  top: 100%;
  left: 0;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-content a {
  color: var(--text-color);
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}

.tool-header {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-lavender) 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
  margin-bottom: 30px;
}

.tool-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.tool-header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Form Layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-purple);
  font-size: 1.1rem;
}

.form-group label i {
  margin-right: 6px;
  color: var(--color-lavender);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1.5px solid #d6d3f5;
  background: #f8f6ff;
  font-size: 1rem;
  transition: border 0.2s;
}

.form-control:focus {
  border-color: var(--color-purple);
  outline: none;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Image Upload */
.image-upload-container {
  position: relative;
}

.drop-zone {
  border: 2px dashed #d6d3f5;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  background: #f8f6ff;
  cursor: pointer;
  transition: border 0.2s, background 0.2s;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--color-purple);
  background: #f0edff;
}

.drop-zone-prompt {
  color: #6c5ce7;
  font-size: 1.1rem;
  font-weight: 500;
}

.drop-zone-input {
  display: none;
}

.image-preview {
  margin-top: 15px;
  position: relative;
  text-align: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.1);
}

.remove-image-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e74c3c;
  transition: background 0.2s;
}

.remove-image-btn:hover {
  background: #f8f6ff;
}

/* Platform Selector */
.platform-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.platform-option {
  position: relative;
}

.platform-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.platform-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f8f6ff;
  border: 1.5px solid #d6d3f5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-size: 0.9rem;
}

.platform-label i {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.platform-option input[type="checkbox"]:checked + .platform-label {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-lavender) 100%);
  color: white;
  border-color: var(--color-purple);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
}

/* Radio and Checkbox Styles */
.radio-options, .checkbox-option {
  margin-top: 8px;
}

.radio-option {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--color-purple);
}

/* Toggle Switch */
.toggle-container {
  position: relative;
  margin-top: 10px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 100%;
  position: relative;
  padding: 10px 0;
}

.toggle-slider {
  position: relative;
  width: 60px;
  height: 30px;
  background: #f8f6ff;
  border: 1.5px solid #d6d3f5;
  border-radius: 30px;
  transition: 0.4s;
  margin: 0 10px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 2px;
  background: var(--color-lavender);
  border-radius: 50%;
  transition: 0.4s;
}

.toggle-input:checked + .toggle-label .toggle-slider {
  background: #f0edff;
}

.toggle-input:checked + .toggle-label .toggle-slider:before {
  transform: translateX(30px);
  background: var(--color-purple);
}

.toggle-option {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Generate Button */
.generate-button {
  background: linear-gradient(90deg, var(--color-mint) 0%, var(--color-lavender) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px 0;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(85, 239, 196, 0.15);
  transition: background 0.3s, transform 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.generate-button i {
  margin-right: 8px;
}

.generate-button:hover {
  background: linear-gradient(90deg, var(--color-lavender) 0%, var(--color-mint) 100%);
  transform: translateY(-2px);
}

.generate-button:active {
  transform: translateY(0);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--color-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

/* Output Section */
.output-container {
  margin-top: 40px;
}

.platform-tabs {
  display: flex;
  border-bottom: 1px solid #d6d3f5;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.platform-tab {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-tab i {
  font-size: 1.2rem;
}

.platform-tab.active {
  color: var(--color-purple);
  border-bottom-color: var(--color-purple);
}

.platform-output-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.09);
  margin-bottom: 30px;
  overflow: hidden;
  display: none;
}

.platform-output-card.active {
  display: block;
}

.platform-header {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-lavender) 100%);
  color: white;
  font-size: 1.3rem;
  padding: 20px 28px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-body {
  padding: 25px;
}

.overlay-preview {
  position: relative;
  margin: 25px 0;
  text-align: center;
}

.art-thumbnail {
  max-width: 100%;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.11);
}

.overlay-text {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 7px 22px;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.08);
  pointer-events: none;
}

.caption-section,
.hashtag-section,
.alt-text-section {
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-purple);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.caption {
  font-size: 1.1rem;
  background: #faf8ff;
  padding: 16px 20px;
  border-radius: 8px;
  color: #4a3676;
  margin-top: 6px;
  white-space: pre-line;
}

.hashtags {
  background: #f4f3ff;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1rem;
  word-break: break-all;
  line-height: 1.6;
}

.alt-text {
  background: #f8f6fa;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1rem;
  color: #706090;
  line-height: 1.5;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
}

.tool-button {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-teal) 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.13);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-button:hover {
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-purple) 100%);
  transform: translateY(-2px);
}

.tool-button:active {
  transform: translateY(0);
}

.save-button {
  background: linear-gradient(135deg, var(--color-mint) 0%, var(--color-teal) 100%);
}

.save-button:hover {
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-mint) 100%);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .platform-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .post-actions {
    flex-direction: column;
  }
  
  .tool-button {
    width: 100%;
    justify-content: center;
  }
  
  .platform-tabs {
    padding-bottom: 5px;
  }
  
  .platform-tab {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

/* Custom Input Containers */
.custom-input-container {
  margin-top: 10px;
}

/* Try Another Section */
.try-another {
  text-align: center;
  margin: 20px 0;
}

.try-another-button {
  background: none;
  border: 2px solid var(--color-purple);
  color: var(--color-purple);
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.try-another-button:hover {
  background: #f0edff;
}
