/**
 * YouTuber Section Styles
 * Allows YouTubers with 100k+ subs to claim free Ultra license
 */

.youtuber-section {
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--color-background) 0%, rgba(102, 126, 234, 0.03) 100%);
}

.youtuber-section__header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.youtuber-section__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 968px) {
  .youtuber-section {
    padding: 4rem 0;
  }

  .youtuber-section__content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Benefits Column */
.youtuber-section__benefits {
  background: var(--color-card);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.youtuber-section__benefits h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.youtuber-section__benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.youtuber-section__benefits-list li {
  padding: 0.875rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--color-border);
}

.youtuber-section__benefits-list li:last-child {
  border-bottom: none;
}

.youtuber-section__benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
  font-size: 1.25rem;
}

/* Form Column */
.youtuber-section__form {
  background: var(--color-card);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-background);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}

/* Status Messages */
.form-status {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.form-status--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgb(22, 163, 74);
}

.form-status--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgb(220, 38, 38);
}

.form-status__message {
  margin: 0;
}

.form-status__message strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-status code {
  background: rgba(0, 0, 0, 0.15);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
  margin: 0.5rem 0;
}

.form-status small {
  display: block;
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* Requirements */
.youtuber-section__requirements {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  line-height: 1.6;
}

.youtuber-section__requirements strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Button Styling */
.youtuber-section__form .btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.youtuber-section__form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.youtuber-section__form .btn:active {
  transform: translateY(0);
}

.youtuber-section__form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* YouTube Connect Button with Icon */
.youtuber-connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%) !important;
  position: relative;
  overflow: hidden;
}

.youtuber-connect-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.youtuber-connect-btn:hover::before {
  width: 300px;
  height: 300px;
}

.youtuber-connect-btn__icon {
  width: 24px;
  height: 24px;
  fill: white;
  color: white;
  position: relative;
  z-index: 1;
  /* animation removed for GPU performance */
}

.youtuber-connect-btn span {
  position: relative;
  z-index: 1;
}

.youtuber-connect-btn:hover .youtuber-connect-btn__icon {
  animation: youtubeIconBounce 0.6s ease;
}

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

@keyframes youtubeIconBounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(-5deg);
  }
  75% {
    transform: translateY(-2px) rotate(5deg);
  }
}

.youtuber-connect-btn:hover {
  box-shadow: 0 12px 24px rgba(255, 0, 0, 0.4) !important;
}

/* Dark Mode Support (if exists) */
@media (prefers-color-scheme: dark) {
  .youtuber-section {
    background: linear-gradient(180deg, var(--color-background) 0%, rgba(102, 126, 234, 0.05) 100%);
  }

  .form-status code {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* OAuth User Info */
.youtuber-user-info {
  background: rgba(102, 126, 234, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.youtuber-user-info p {
  margin: 0 0 0.5rem 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.youtuber-user-info strong {
  color: var(--color-text-primary);
  font-size: 1rem;
}

/* Channel Selection */
.youtuber-channels-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.youtuber-channel-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--color-background);
}

.youtuber-channel-card:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.youtuber-channel-card.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.youtuber-channel-card.ineligible {
  opacity: 0.5;
  cursor: not-allowed;
}

.youtuber-channel-card.ineligible:hover {
  border-color: var(--color-border);
  background: var(--color-background);
}

.youtuber-channel-radio {
  margin-right: 1rem;
}

.youtuber-channel-info {
  flex: 1;
}

.youtuber-channel-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.youtuber-channel-subs {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.youtuber-channel-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 1rem;
}

.youtuber-channel-badge.eligible {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

.youtuber-channel-badge.ineligible {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

/* ============================================
   YouTuber Modal Overlay
   ============================================ */

.youtuber-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.youtuber-modal {
  width: 100%;
  max-width: 480px;
  margin: 1rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-card, var(--color-bg-elevated, #fff));
  max-height: 90vh;
  overflow-y: auto;
}

.youtuber-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem 0;
}

.youtuber-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.youtuber-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s;
}

.youtuber-modal__close:hover {
  color: var(--color-text-primary);
}

.youtuber-modal__content {
  padding: 1.5rem 2rem 2rem;
}

.youtuber-modal__intro {
  margin: 0 0 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Réutiliser les styles de formulaire existants dans la modale */
.youtuber-modal__content .form-group {
  margin-bottom: 1.5rem;
}

.youtuber-modal__content .btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.youtuber-modal__content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.youtuber-modal__content .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .youtuber-section__benefits,
  .youtuber-section__form {
    padding: 2rem;
  }

  .youtuber-section__benefits h3 {
    font-size: 1.25rem;
  }

  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .youtuber-channel-card {
    flex-wrap: wrap;
  }

  .youtuber-channel-badge {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
  }

  .youtuber-modal {
    max-width: 100%;
    margin: 0.5rem;
  }

  .youtuber-modal__header {
    padding: 1.25rem 1.5rem 0;
  }

  .youtuber-modal__content {
    padding: 1.25rem 1.5rem 1.5rem;
  }
}
