/* ─────────────────────────────────────────────────────────────────────────────
   Auth Pages CSS
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── Auth Layout ─── */
.auth-layout {
  min-height: calc(100vh - var(--navbar-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}

.auth-layout-simple {
  max-width: 480px;
  margin: var(--space-12) auto;
}

/* Split layout for simple auth pages (login/signup/forgot) */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  margin: var(--space-12) auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--color-surface);
}

@media (max-width: 767.98px) {
  .auth-split {
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
  }
}

/* ─── Auth Decorative Panel ─── */
.auth-deco {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: var(--space-12) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-deco::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: auth-deco-pulse 8s ease-in-out infinite;
}

@keyframes auth-deco-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-deco-logo {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: bold;
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}

.auth-deco-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.auth-deco-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  opacity: 0.9;
  max-width: 280px;
  position: relative;
  z-index: 1;
}

@media (max-width: 767.98px) {
  .auth-deco {
    padding: var(--space-8) var(--space-6);
  }
  .auth-deco-logo { font-size: var(--text-2xl); }
  .auth-deco-icon { font-size: 3rem; }
  .auth-deco-text { font-size: var(--text-sm); max-width: 240px; }
}

/* ─── Auth Form Panel ─── */
.auth-form-panel {
  padding: var(--space-10) var(--space-8);
}

@media (max-width: 767.98px) {
  .auth-form-panel {
    padding: var(--space-8) var(--space-6);
  }
}

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  text-align: center;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-divider-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Google Button ─── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-default);
}

.btn-google:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-google:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ─── Auth Footer ─── */
.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: var(--color-primary-dark);
}

/* ─── Profile Page ─── */
.profile-header {
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  padding: var(--space-8) 0;
  margin-bottom: var(--space-8);
}

.profile-header-content {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

@media (max-width: 767.98px) {
  .profile-header-content {
    flex-direction: column;
    text-align: center;
  }
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.profile-email {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.profile-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .profile-actions {
    justify-content: center;
  }
}

/* ─── Profile Section Cards ─── */
.profile-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ─── Bookmarks Page ─── */
.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

@media (max-width: 767.98px) {
  .bookmarks-grid {
    grid-template-columns: 1fr;
  }
}

.bookmark-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-default);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bookmark-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.bookmark-card-image {
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.bookmark-card-content {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bookmark-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.bookmark-card-excerpt {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bookmark-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
}

.bookmark-card-meta {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─── Sessions Page ─── */
.session-list {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.session-item {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.session-item:last-child {
  border-bottom: none;
}

.session-info {
  flex: 1;
}

.session-device {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.session-meta {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* ─── Verify Email Page ─── */
.verify-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-success) 0%, #22c55e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  margin: var(--space-6) auto;
  animation: verify-pulse 2s ease-in-out infinite;
}

@keyframes verify-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 139, 87, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(46, 139, 87, 0); }
}

.verify-content {
  text-align: center;
  max-width: 480px;
  margin: var(--space-8) auto;
}

.verify-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.verify-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

/* ─── Password Strength Indicator ─── */
.password-strength {
  margin-top: var(--space-2);
}

.password-strength-bar {
  height: 4px;
  background: var(--color-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-2);
}

.password-strength-segment {
  flex: 1;
  height: 100%;
  background: var(--color-border-light);
  transition: background var(--duration-normal) var(--ease-default);
}

.password-strength-segment.active[data-level="1"] {
  background: var(--color-error);
}

.password-strength-segment.active[data-level="2"] {
  background: var(--color-warning);
}

.password-strength-segment.active[data-level="3"] {
  background: var(--color-accent);
}

.password-strength-segment.active[data-level="4"] {
  background: var(--color-success);
}

.password-strength-text {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─── Social Links in Profile ─── */
.social-link-group {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-link-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-default);
}

.social-link-item:hover {
  background: var(--color-accent);
  color: white;
}

.social-link-item.empty {
  color: var(--color-text-muted);
  opacity: 0.7;
}
