/* Header */
.app-header {
  text-align: center;
  margin-bottom: 2rem;
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.app-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* AI Status Block */
.ai-status-block {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
}

.ai-status-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ai-status-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Upload Section */
.upload-section {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 3rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-section.dragover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.05);
}

.upload-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.upload-left-group,
.upload-right-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.upload-left-group {
  gap: 1rem;
}

.upload-content svg {
  color: var(--primary-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.upload-left-group h3 {
  font-weight: 600;
  font-size: 1.1rem;
}

.upload-left-group p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Preview */
.preview-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-scanning-target {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

#image-preview {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

/* Divider Vertical */
.divider-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  height: 120px;
}

.divider-vertical::before,
.divider-vertical::after {
  content: "";
  flex: 1;
  border-left: 1px solid var(--glass-border);
}

.divider-vertical span {
  padding: 1rem 0;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Staging Overlay */
.staging-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-md);
  transition: opacity 0.3s ease;
}

.staging-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.staging-content .loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
}

.btn-primary:not(:disabled):hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--glass-border);
}

.btn-secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-text:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon.active {
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

/* Post Composition */
.post-composition-area {
  margin-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.highlight-pulse {
  animation: subtlePulse 1.5s ease-out;
}

@keyframes subtlePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    border-color: var(--primary-color);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.publish-btn {
  width: auto;
  margin-top: 0;
  padding: 0.75rem 2rem;
}

