:root {
  --primary-color: #ff3366;
  --secondary-color: #1a1a1a;
  --text-color: #ffffff;
  --input-bg: #2a2a2a;
  --input-border: #3a3a3a;
  --hover-color: #ff4d7d;
  --error-color: #ff3333;
  --select-bg: #2a2a2a;
  --option-hover: #3a3a3a;
  --success-color: #4CAF50;
  --card-bg: rgba(42, 42, 42, 0.95);
  --navbar-height: 70px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0.85) 100%);
}

.form-container {
  background: rgba(42, 42, 42, 0.95);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 550px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 51, 102, 0.1);
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--text-color);
}

.form-header i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: #888;
  font-size: 1.1rem;
}

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

label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.95rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 1rem;
  color: var(--primary-color);
  font-size: 1.1rem;
  z-index: 1;
}

input,
textarea,
select {
  width: 100%;
  padding: 1rem;
  padding-left: 3rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff3366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
}

select option {
  background-color: var(--select-bg);
  color: var(--text-color);
  padding: 1rem;
}

select option:hover,
select option:focus {
  background-color: var(--option-hover);
}

select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

textarea {
  padding-left: 1rem;
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #666;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--hover-color);
  transform: translateY(-2px);
}

.submit-btn:hover i {
  transform: translateX(5px);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn.error {
  background-color: var(--error-color);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .form-container {
      padding: 1.5rem;
  }

  h2 {
      font-size: 1.8rem;
  }

  .form-header i {
      font-size: 2.5rem;
  }
}

/* Response Section Styles */
.response-container {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(42, 42, 42, 0.95);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 51, 102, 0.1);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.response-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.response-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.response-subtitle {
  color: #888;
  font-size: 0.9rem;
}

.generated-post {
  min-height: 200px;
  font-size: 1rem;
  line-height: 1.6;
  padding: 1rem;
}

.character-count {
  text-align: right;
  font-size: 0.9rem;
  color: #888;
  margin: 0.5rem 0 1rem;
}

.over-limit {
  color: var(--error-color);
  font-weight: bold;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.action-btn {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.copy-btn {
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
}

.copy-btn:hover {
  background-color: var(--option-hover);
  transform: translateY(-2px);
}

.regenerate-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
}

.regenerate-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn i {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .action-buttons {
      grid-template-columns: 1fr;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 26, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.loading-content {
  text-align: center;
  padding: 2rem;
  border-radius: 20px;
  background: rgba(42, 42, 42, 0.8);
  box-shadow: 0 8px 32px rgba(255, 51, 102, 0.2);
  border: 1px solid rgba(255, 51, 102, 0.1);
  max-width: 400px;
  width: 90%;
}

.loading-spinner {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.loading-spinner i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
      transform: scale(1);
      opacity: 1;
  }
  50% {
      transform: scale(1.2);
      opacity: 0.7;
  }
  100% {
      transform: scale(1);
      opacity: 1;
  }
}

.loading-content h3 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.loading-content p {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.loading-bar {
  width: 100%;
  height: 4px;
  background: var(--input-border);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-progress {
  width: 30%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  animation: loading 2s infinite ease-in-out;
}

@keyframes loading {
  0% {
      transform: translateX(-100%);
  }
  50% {
      transform: translateX(100%);
  }
  100% {
      transform: translateX(-100%);
  }
}

/* Enhanced Form Styles */
.logo-container {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.3);
}

.logo-container i {
  font-size: 2.5rem;
  color: white;
}

.form-container {
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Enhanced Response Section */
.response-container {
  animation: fadeIn 0.5s ease;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--input-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.count-badge i {
  color: var(--primary-color);
}

/* Enhanced Button States */
.submit-btn.success {
  background: var(--success-color);
  transform: scale(1.02);
}

.action-btn {
  position: relative;
  overflow: hidden;
}

.action-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.action-btn:active::after {
  width: 200px;
  height: 200px;
}

/* Responsive Enhancements */
@media (max-width: 600px) {
  .loading-content {
      width: 95%;
      padding: 1.5rem;
  }

  .logo-container {
      width: 60px;
      height: 60px;
  }

  .logo-container i {
      font-size: 2rem;
  }
}

/* Post Editor Container */
.post-editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Editing Panel */
.editing-panel {
  background: rgba(42, 42, 42, 0.5);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.generated-post {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 250px;
}

/* LinkedIn Preview */
.linkedin-preview {
  background: #1a1a1a;
  border-radius: 15px;
  overflow: hidden;
}

.preview-header {
  background: rgba(42, 42, 42, 0.5);
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header h4 {
  color: #888;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.linkedin-post {
  background: white;
  color: #333;
  padding: 1.5rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar i {
  font-size: 2rem;
  color: #666;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 600;
  color: #000;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.author-headline {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.post-time {
  color: #666;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 1rem 0;
  white-space: pre-wrap;
  flex: 1;
}

.post-engagement {
  border-top: 1px solid #e0e0e0;
  margin-top: 1rem;
  padding-top: 1rem;
}

.engagement-buttons {
  display: flex;
  gap: 1rem;
}

.engagement-buttons button {
  background: none;
  border: none;
  color: #666;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.engagement-buttons button:hover {
  background-color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .post-editor-container {
      grid-template-columns: 1fr;
  }

  .linkedin-preview {
      order: -1;
      margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  .linkedin-post {
      padding: 1rem;
  }

  .engagement-buttons {
      flex-wrap: wrap;
  }

  .engagement-buttons button {
      flex: 1;
      min-width: 120px;
  }
}

/* Navbar Styles */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255, 51, 102, 0.1);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.3);
}

.logo-container i {
  font-size: 1.8rem;
  color: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-text h1 {
  font-size: 1.5rem;
  margin: 0;
  background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  color: #888;
  font-size: 0.9rem;
  margin: 0;
}

/* Main Layout */
.app-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: calc(var(--navbar-height) + 2rem) 2rem 2rem;
  max-width: 1800px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  position: sticky;
  top: calc(var(--navbar-height) + 2rem);
  height: fit-content;
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Main Content Area */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  height: fit-content;
}

/* Section Styles */
.editor-section,
.preview-section {
  background: var(--card-bg);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  opacity: 1;
  transition: all 0.3s ease;
}

.section-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  background: none;
  -webkit-text-fill-color: var(--text-color);
}

/* Editor Styles */
.editor-container {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  height: 100%;
}

.generated-post {
  width: 100%;
  flex: 1;
  min-height: 300px;
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  margin-bottom: 1rem;
}

.generated-post:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

/* LinkedIn Preview Styles */
.linkedin-post {
  background: white;
  margin: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 300px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar i {
  font-size: 2rem;
  color: #666;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 600;
  color: #000;
  font-size: 1rem;
}

.author-headline {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.post-time {
  color: #666;
  font-size: 0.8rem;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-content {
  padding: 1rem;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-engagement {
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
}

.engagement-buttons {
  display: flex;
  gap: 1rem;
}

.engagement-buttons button {
  background: none;
  border: none;
  color: #666;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.engagement-buttons button:hover {
  background-color: #f0f0f0;
}

/* Animation for content appearance */
@keyframes fadeSlideIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.editor-section,
.preview-section {
  animation: fadeSlideIn 0.5s ease forwards;
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

label {
  font-weight: 500;
  font-size: 0.95rem;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 1.1rem;
  pointer-events: none;
}

select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  padding-left: 2.8rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--text-color);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff3366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
}

/* Buttons */
.submit-btn,
.action-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.copy-btn {
  background: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
}

.regenerate-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
}

.submit-btn:hover,
.regenerate-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.copy-btn:hover {
  background: var(--input-border);
  transform: translateY(-2px);
}

/* Character Count */
.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--input-bg);
  border-radius: 20px;
  font-size: 0.9rem;
}

.count-badge i {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1400px) {
  .main-content {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .app-container {
      grid-template-columns: 1fr;
      padding: calc(var(--navbar-height) + 1rem) 1rem 1rem;
  }

  .sidebar {
      position: relative;
      top: 0;
  }
}

@media (max-width: 600px) {
  .navbar {
      padding: 0 1rem;
  }

  .logo-container {
      width: 40px;
      height: 40px;
  }

  .brand-text h1 {
      font-size: 1.3rem;
  }

  .action-buttons {
      flex-direction: column;
  }

  .engagement-buttons {
      flex-wrap: wrap;
  }

  .engagement-buttons button {
      flex: 1;
      min-width: 120px;
  }
}

.linkedin-btn {
  background: #0077b5;  /* LinkedIn brand color */
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.linkedin-btn:hover {
  background: #0069a0;
  transform: translateY(-2px);
}

.linkedin-btn i {
  font-size: 1.2rem;
}

/* Success and error states for LinkedIn button */
.linkedin-btn.success {
  background: var(--success-color);
}

.linkedin-btn.error {
  background: var(--error-color);
}

.linkedin-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Image Upload Styles */
.image-upload-group {
  position: relative;
  border: 2px dashed var(--input-border);
  border-radius: 10px;
  padding: 0;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-upload-group:hover {
  border-color: var(--primary-color);
  background: rgba(255, 51, 102, 0.05);
}

.image-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.image-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.upload-text {
  color: #888;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-upload-group i {
  position: static;
  margin-right: 0.5rem;
  transform: none;
}

/* Preview image in LinkedIn post */
.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin: 1rem 0;
  border-radius: 8px;
}

/* Responsive adjustments for image upload */
@media (max-width: 600px) {
  .image-upload-group {
      min-height: 100px;
  }

  .image-preview img {
      max-height: 150px;
  }
}

/* Image Selection Tabs */
.image-selection-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.8rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.tab-btn i {
  font-size: 1.1rem;
}

.tab-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
  background: var(--input-border);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Image Vault Grid */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--input-bg);
  border-radius: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.vault-image-card {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.vault-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vault-image-card.selected {
  border-color: var(--primary-color);
}

.vault-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vault-image-card .image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.vault-image-card .image-overlay p {
  color: white;
  font-size: 0.8rem;
  margin: 0;
  text-align: center;
}

.vault-image-card:hover .image-overlay {
  transform: translateY(0);
}

.vault-image-card.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.no-images {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 2rem;
}

/* Scrollbar Styles for Vault Grid */
.vault-grid::-webkit-scrollbar {
  width: 8px;
}

.vault-grid::-webkit-scrollbar-track {
  background: var(--input-bg);
  border-radius: 4px;
}

.vault-grid::-webkit-scrollbar-thumb {
  background: var(--input-border);
  border-radius: 4px;
}

.vault-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--secondary-color);
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--input-border);
  animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(90vh - 140px);
  overflow-y: auto;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--input-border);
  display: flex;
  justify-content: flex-end;
}

/* Update Image Selection Styles */
#addImageBtn {
  width: 100%;
  padding: 1rem;
  background: var(--input-bg);
  border: 2px dashed var(--input-border);
  color: var(--text-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

#addImageBtn:hover {
  border-color: var(--primary-color);
  background: rgba(255, 51, 102, 0.1);
}

#addImageBtn.has-image {
  border-style: solid;
  background: var(--primary-color);
  color: white;
}

/* Update Tab Styles */
.image-selection-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
}

.tab-btn:not(.active):hover {
  background: var(--input-border);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .modal-content {
      width: 95%;
      max-height: 95vh;
  }

  .vault-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .tab-btn {
      padding: 0.8rem;
      font-size: 0.9rem;
  }
}

/* AI Image Generation Styles */
.generate-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

.prompt-guidance {
  background: rgba(255, 51, 102, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 51, 102, 0.2);
}

.prompt-guidance h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-guidance h3::before {
  content: '\f0eb';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary-color);
}

.prompt-guidance p {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.prompt-guidance ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prompt-guidance ul li {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.5;
}

.prompt-guidance ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 2px;
}

.image-prompt-input {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.image-prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  line-height: 1.4;
}

.generate-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.size-select,
.style-select,
.quality-select {
  width: 100%;
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.size-select:hover,
.style-select:hover,
.quality-select:hover {
  border-color: var(--primary-color);
}

.generate-btn {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.generated-preview {
  width: 100%;
  min-height: 350px;
  border: 2px dashed var(--input-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg);
  transition: all 0.3s ease;
}

.generated-preview:hover {
  border-color: var(--primary-color);
}

.generate-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
}

.generate-placeholder i {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  color: var(--primary-color);
  opacity: 0.5;
}

.generate-placeholder p {
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .generate-options {
      grid-template-columns: 1fr;
  }

  .generated-preview {
      min-height: 250px;
  }
}

@media (max-width: 480px) {
  .prompt-guidance {
      padding: 1rem;
  }

  .prompt-guidance h3 {
      font-size: 1.1rem;
  }

  .prompt-guidance ul li {
      font-size: 0.85rem;
  }

  .generate-btn {
      padding: 1rem;
      font-size: 1rem;
  }
}

.input-group select[name="postLength"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff3366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
      linear-gradient(to right, transparent, transparent);
  background-position: right 1rem center, left center;
  background-repeat: no-repeat, repeat-x;
  background-size: 1.2em, 100%;
  padding-right: 2.5rem;
}

.input-group select[name="postLength"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.1);
}

.input-group select[name="postLength"] option {
  padding: 0.8rem;
  background-color: var(--select-bg);
  color: var(--text-color);
}

.input-group select[name="postLength"] option:hover {
  background-color: var(--option-hover);
}

/* Character count color coding based on length */
.count-badge.short {
  color: var(--success-color);
}

.count-badge.medium {
  color: #ffd700;
}

.count-badge.long {
  color: #ff9800;
}

.count-badge.over-limit {
  color: var(--error-color);
} 