/* ============================================
   CREATOR ONBOARDING FLOW
   ============================================ */

#onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
}

#onboarding-modal.hidden {
  display: none;
}

.onboarding-container {
  position: relative;
  max-width: 640px;
  width: 100%;
  background: #0f1419;
  border-radius: 20px;
  border: 1px solid rgba(8, 145, 178, 0.2);
  overflow: hidden;
}

/* Progress Bar */
.onboarding-progress-bar {
  height: 4px;
  background: rgba(8, 145, 178, 0.1);
  position: relative;
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0891b2, #06d6a0);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(8, 145, 178, 0.5);
}

/* Skip Button */
.onboarding-skip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  color: #6b7280;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
  z-index: 10;
}

.onboarding-skip-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
}

/* Step Container */
.onboarding-step {
  padding: 60px 40px 40px;
  animation: fadeIn 0.4s ease-out;
}

.onboarding-step.hidden {
  display: none;
}

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

.onboarding-content {
  text-align: center;
}

/* Icon */
.onboarding-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Typography */
.onboarding-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  font-family: 'Syne', sans-serif;
}

.onboarding-subtitle {
  font-size: 16px;
  color: #9ca3af;
  margin: 0 0 32px 0;
  line-height: 1.6;
}

/* Features List (Step 1) */
.onboarding-features {
  text-align: left;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(8, 145, 178, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.onboarding-feature-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.onboarding-feature h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.onboarding-feature p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* Buttons */
.onboarding-btn-primary {
  background: linear-gradient(135deg, #0891b2, #06d6a0);
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
  width: 100%;
  max-width: 300px;
}

.onboarding-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.4);
}

.onboarding-btn-secondary {
  background: transparent;
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.onboarding-btn-outline {
  background: transparent;
  color: #0891b2;
  border: 1px solid #0891b2;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-btn-outline:hover {
  background: rgba(8, 145, 178, 0.1);
}

.onboarding-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* Profile Setup (Step 2) */
.onboarding-form {
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-profile-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.onboarding-profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.1);
  border: 3px solid rgba(8, 145, 178, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.onboarding-profile-photo svg {
  width: 60px;
  height: 60px;
  color: #0891b2;
}

.onboarding-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboarding-upload-btn {
  background: rgba(8, 145, 178, 0.1);
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.3);
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-upload-btn:hover {
  background: rgba(8, 145, 178, 0.2);
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  resize: none;
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #0891b2;
  background: rgba(255, 255, 255, 0.08);
}

.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* First Post (Step 3) */
.onboarding-post-examples {
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-post-examples h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.onboarding-post-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-post-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(8, 145, 178, 0.05);
  border: 1px solid rgba(8, 145, 178, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.onboarding-post-prompt:hover {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.3);
  transform: translateX(4px);
}

.prompt-emoji {
  font-size: 24px;
}

.prompt-text {
  font-size: 15px;
  color: #ffffff;
  font-weight: 500;
}

.onboarding-post-composer {
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-post-composer textarea {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  margin-bottom: 12px;
}

.onboarding-compose-btn {
  background: transparent;
  color: #0891b2;
  border: none;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-compose-btn:hover {
  color: #06d6a0;
}

/* Go Live (Step 4) */
.onboarding-live-demo {
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-demo-card {
  background: rgba(8, 145, 178, 0.05);
  border: 1px solid rgba(8, 145, 178, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.onboarding-demo-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.onboarding-steps-list {
  margin: 0;
  padding-left: 20px;
  color: #9ca3af;
  line-height: 1.8;
}

.onboarding-steps-list li {
  margin-bottom: 8px;
}

.onboarding-steps-list strong {
  color: #ffffff;
  font-weight: 600;
}

.onboarding-demo-tips {
  background: rgba(6, 214, 160, 0.05);
  border: 1px solid rgba(6, 214, 160, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.onboarding-demo-tips h4 {
  font-size: 15px;
  font-weight: 600;
  color: #06d6a0;
  margin: 0 0 12px 0;
}

.onboarding-demo-tips ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: #9ca3af;
  line-height: 1.8;
}

.onboarding-demo-tips li {
  margin-bottom: 6px;
}

/* Monetization (Step 5) */
.onboarding-monetization-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.onboarding-money-card {
  background: rgba(8, 145, 178, 0.05);
  border: 1px solid rgba(8, 145, 178, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}

.money-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.onboarding-money-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.onboarding-money-card p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.6;
}

.onboarding-monetization-cta {
  background: rgba(6, 214, 160, 0.05);
  border: 1px solid rgba(6, 214, 160, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  margin-bottom: 24px;
}

.onboarding-monetization-cta p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 16px 0;
}

/* Completion Animation */
.onboarding-completion {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f1419;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
  z-index: 100;
}

.onboarding-completion.hidden {
  display: none;
}

.onboarding-completion-content {
  text-align: center;
}

.completion-badge {
  font-size: 100px;
  margin-bottom: 24px;
  animation: confetti 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes confetti {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

.onboarding-completion-content h2 {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.onboarding-completion-content p {
  font-size: 16px;
  color: #9ca3af;
  margin: 0;
}

/* ============================================
   CONTEXTUAL TOOLTIPS
   ============================================ */

.sphere-tooltip {
  position: fixed;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sphere-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

.sphere-tooltip-content {
  background: linear-gradient(135deg, #0891b2, #06d6a0);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 300px;
  animation: tooltipPulse 0.4s ease-out;
}

@keyframes tooltipPulse {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.sphere-tooltip-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.sphere-tooltip-close {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.sphere-tooltip-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   ACHIEVEMENT BADGES DISPLAY
   ============================================ */

.badges-section {
  margin-top: 24px;
  padding: 20px;
  background: rgba(8, 145, 178, 0.05);
  border: 1px solid rgba(8, 145, 178, 0.1);
  border-radius: 12px;
}

.badges-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.badge-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.badge-name {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.badge-item.earned {
  background: rgba(6, 214, 160, 0.1);
  border-color: rgba(6, 214, 160, 0.3);
}

.badge-item.earned .badge-name {
  color: #06d6a0;
}

/* Badge popup animation */
.badge-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: #0f1419;
  border: 2px solid #06d6a0;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  z-index: 10002;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: badgeEarn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes badgeEarn {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(-180deg);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.badge-popup-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.badge-popup h3 {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.badge-popup p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0;
}

/* ============================================
   TOAST NOTIFICATIONS (Retry, Offline, Success)
   ============================================ */

.retry-toast,
.offline-toast,
.success-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 350px;
  z-index: 10001;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.retry-toast.visible,
.offline-toast.visible,
.success-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.retry-content,
.offline-content,
.success-content {
  background: #1f2937;
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.retry-content p,
.offline-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
}

.retry-actions {
  display: flex;
  gap: 8px;
}

.retry-actions button,
.offline-content button,
.success-content button {
  flex: 1;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-actions button:hover,
.offline-content button:hover {
  background: rgba(245, 158, 11, 0.3);
}

.success-content {
  background: rgba(6, 214, 160, 0.2);
  border-color: rgba(6, 214, 160, 0.4);
  color: #06d6a0;
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 640px) {
  .retry-toast,
  .offline-toast,
  .success-toast {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

/* ============================================
   SUGGESTIONS TOAST
   ============================================ */

.suggestions-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.suggestions-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.suggestions-content {
  background: linear-gradient(135deg, #0891b2, #06d6a0);
  color: #ffffff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.suggestions-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.suggestions-content ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  list-style: none;
}

.suggestions-content li {
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  padding-left: 8px;
}

.suggestions-content li:before {
  content: '✓';
  position: absolute;
  left: -12px;
  font-weight: bold;
}

.suggestions-content button {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.suggestions-content button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .suggestions-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .onboarding-step {
    padding: 40px 24px 24px;
  }

  .onboarding-title {
    font-size: 26px;
  }

  .onboarding-subtitle {
    font-size: 14px;
  }

  .onboarding-icon {
    font-size: 48px;
  }

  .onboarding-feature-icon {
    font-size: 24px;
  }

  .onboarding-btn-primary,
  .onboarding-btn-secondary {
    padding: 12px 24px;
    font-size: 15px;
  }

  .onboarding-actions {
    flex-direction: column-reverse;
  }

  .onboarding-actions button {
    width: 100%;
  }

  .onboarding-profile-photo {
    width: 100px;
    height: 100px;
  }

  .onboarding-profile-photo svg {
    width: 50px;
    height: 50px;
  }

  .completion-badge {
    font-size: 80px;
  }

  .onboarding-completion-content h2 {
    font-size: 26px;
  }

  .sphere-tooltip-content {
    max-width: 250px;
  }

  .badge-popup {
    padding: 24px;
    max-width: 90%;
  }

  .badge-popup-icon {
    font-size: 48px;
  }

  .badge-popup h3 {
    font-size: 20px;
  }
}

/* Smooth animations */
* {
  -webkit-tap-highlight-color: transparent;
}

button, a {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Loading state for async operations */
.onboarding-btn-primary.loading,
.onboarding-btn-secondary.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
}

/* Smooth scrolling for onboarding modal */
#onboarding-modal {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus (mobile) */
@media screen and (max-width: 640px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .onboarding-container {
    border: 2px solid #0891b2;
  }

  .onboarding-feature {
    border: 2px solid rgba(8, 145, 178, 0.3);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .onboarding-progress-fill {
    transition: none;
  }
}
