/**
 * Components - Billion Dollar Premium Look
 */
/* ----- Utilities ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Card ----- */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm), var(--shadow-inner);
  padding: var(--space-8);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  border: none;
  transition: all var(--duration-fast) var(--ease-spring);
  min-height: 48px;
  letter-spacing: var(--tracking-tight);
}

.btn:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 4px;
}

.btn--primary {
  background: var(--color-text-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-button);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(9, 9, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: var(--color-accent-hover);
}

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

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  background: rgba(9, 9, 11, 0.05);
  color: var(--color-text-primary);
}

.btn--google {
  background: #FFFFFF;
  color: var(--color-text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.btn--google:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: #F8F8FA;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--lg {
  padding: 16px 32px;
  font-size: var(--text-base);
  min-height: 56px;
}

/* ----- Select ----- */
.select-wrap {
  width: 100%;
}

.select-wrap label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352525B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.select:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: #FFFFFF;
}

.select:focus {
  outline: none;
  border-color: var(--color-text-primary);
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.1);
}

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-modal);
  border: 1px solid rgba(255, 255, 255, 0.6);
  width: 100%;
  max-width: 440px;
  padding: var(--space-12);
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0);
}

.modal__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.03);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal__close:hover {
  color: var(--color-text-primary);
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

.modal__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-tight);
  text-align: center;
}

.modal__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-10);
  text-align: center;
  font-weight: var(--font-medium);
}

.modal__action {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ----- Header auth ----- */
.user-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-area__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-ai-gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  box-shadow: 0 4px 12px rgba(217, 70, 239, 0.3);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.user-area__avatar:hover {
  transform: scale(1.05);
}

.user-area__name {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
  display: none;
}

@media (min-width: 480px) {
  .user-area__name {
    display: block;
  }
}

.user-area__logout,
.user-area__login {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
}

.user-area__login {
  background: var(--color-text-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-button);
}

.user-area__login:hover {
  box-shadow: 0 6px 16px rgba(9, 9, 11, 0.2);
  transform: translateY(-2px);
  background: var(--color-accent-hover);
}

.user-area__logout {
  background: transparent;
  color: var(--color-text-secondary);
}

.user-area__logout:hover {
  color: var(--color-text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.auth-state--logged-in .user-area__login-wrap {
  display: none;
}

.auth-state--logged-out .user-area__logged-wrap {
  display: none;
}

/* ----- Project card (projects list) ----- */
.project-card {
  display: block;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-spring);
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-xl);
  border-color: rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
}

.project-card__thumb {
  aspect-ratio: 16/10;
  background: #F4F4F5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

/* Beautiful subtle gradient for empty project states */
.project-card--new .project-card__thumb {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
}

.project-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
}

.project-card__body {
  padding: var(--space-4) var(--space-5);
}

.project-card__title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: var(--font-medium);
}

/* ----- Header extras (projects/editor) ----- */
.header__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.header__brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: var(--tracking-tighter);
  transition: transform 0.2s ease;
}

.header__brand:hover {
  transform: scale(1.02);
}

.header__beta {
  font-size: 10px;
  font-weight: var(--font-bold);
  color: #D946EF;
  background: rgba(217, 70, 239, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header__badge {
  font-size: var(--text-xs);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #18181B 0%, #27272A 100%);
  color: #FFFFFF;
  font-weight: var(--font-semibold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideDownFade 0.5s var(--ease-spring);
}

.header__badge-close {
  padding: 2px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s;
}

.header__badge-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ----- UX Loom marka logosu (sade wordmark) ----- */
.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo__text {
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  font-size: var(--text-xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

.brand-logo__ux {
  color: var(--color-text-primary);
}

.brand-logo__loom {
  color: var(--color-text-secondary);
}

.brand-logo--compact .brand-logo__text {
  font-size: var(--text-lg);
}