/* Component Styles */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  text-decoration: none;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

.btn-outline {
  background: transparent;
  color: var(--primary-soft);
  border: 2px solid var(--primary-soft);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-soft);
  color: var(--text-white);
}

.btn:focus {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-gradient-border {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
}

.card-gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Tags & Badges */
.tag,
.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: all var(--transition-fast);
}

.tag:hover,
.badge:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

.badge.learning {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  color: var(--primary-soft);
  border: 1px solid var(--primary-soft);
}

.tag.highlight {
  background: var(--gradient-primary);
  color: var(--text-white);
}

/* Icon */
.icon {
  font-size: var(--fs-4xl);
  margin-bottom: var(--spacing-md);
  display: inline-block;
}

/* Links */
a {
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-soft);
}

a:focus {
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
}

/* Highlight Text */
.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--fw-bold);
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin: var(--spacing-2xl) 0;
}

.divider-gradient {
  background: var(--gradient-primary);
  height: 2px;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary-soft);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form Elements */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  transition: border-color var(--transition-fast);
  background: var(--bg-primary);
  color: var(--text-primary);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

/* Avatar / Profile Image */
.avatar {
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm { width: 40px; height: 40px; }
.avatar-md { width: 60px; height: 60px; }
.avatar-lg { width: 100px; height: 100px; }
.avatar-xl { width: 150px; height: 150px; }

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 0.5rem 0.75rem;
  background: var(--text-primary);
  color: var(--text-white);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

[data-tooltip]:hover::before {
  opacity: 1;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* Alert / Message */
.alert {
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.alert-info {
  background: rgba(79, 172, 254, 0.1);
  border-left: 4px solid var(--accent-blue);
  color: var(--text-primary);
}

.alert-success {
  background: rgba(67, 233, 123, 0.1);
  border-left: 4px solid var(--accent-teal);
  color: var(--text-primary);
}

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  border-radius: inherit;
}

.overlay:hover {
  opacity: 1;
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Box with Glow */
.box-glow {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.box-glow:hover {
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  background: var(--bg-primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-light);
}

.cookie-banner-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.cookie-banner-content p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.6;
  flex: 1;
}

.cookie-banner-content a {
  color: var(--primary-soft);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: var(--spacing-4xl);
}

.legal-date {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--spacing-3xl);
  text-align: center;
}

.legal-section {
  margin-bottom: var(--spacing-2xl);
}

.legal-section h2 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-light);
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.legal-section ul {
  list-style: disc;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.legal-section li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-xs);
}

.legal-section a {
  color: var(--primary-soft);
}

.legal-section a:hover {
  text-decoration: underline;
}
