:root {
  --primary-color: #ff6b00;
  --secondary-color: #ff8c00;
  --accent-color: #ffd700;
  --bg-color: #fffaf0;
  --text-dark: #333333;
  --text-light: #ffffff;
  --card-bg: #ffffff;
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.15);
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Base Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

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

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

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  animation: fadeIn 0.5s ease-out forwards;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ffe4cc;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

/* Layouts */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

.split-layout {
  display: flex;
  min-height: calc(100vh - 80px); /* Minus navbar */
}

.split-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
}

.split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  padding: 2rem;
}

/* Auth Screens */
.auth-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.auth-subtitle {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
}

.toggle-form {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.toggle-form a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.mascot-lg {
  max-width: 80%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.w-100 { width: 100%; }
.d-none { display: none !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .split-layout {
    flex-direction: column;
  }
  .split-left {
    padding: 2rem;
    text-align: center;
  }
  .split-right {
    min-height: 600px;
  }
  .mascot-lg {
    max-width: 250px;
    margin: 0 auto 2rem;
  }
}

/* --- Nuevos Estilos del Perfil --- */
/* TikTok Style Badges */
.tiktok-badges-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.tiktok-badge {
  background: var(--card-bg);
  border: 1px solid #eee;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  color: #555;
}
.tiktok-badge b { color: var(--text-dark); }
.tiktok-badge .edit-icon { font-size: 0.8rem; margin-left: 2px; }

/* Bio TikTok Style */
.tiktok-bio { margin-top: 10px; margin-bottom: 20px; font-size: 0.95rem; line-height: 1.4; color: var(--text-dark); max-width: 500px; margin-inline: auto; text-align: center; }

/* Modal Edit */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg);
  width: 90%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

/* Toasts Notificaciones */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card-bg);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  border-radius: 4px;
  font-weight: 500;
  animation: slideInRight 0.3s ease-out forwards;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.toast.success { border-color: #28a745; }
.toast.error { border-color: #dc3545; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Edit Avatars and Banners overlay */
.edit-btn-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
}
.edit-btn-overlay:hover { background: var(--primary-color); }
