@font-face {
    font-family: 'Scene Pro';
    src: url('../fonts/ScenePro-Regular.woff2') format('woff2'),
        url('../fonts/ScenePro-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #6e2ff7;
    --secondary: #8155f8;
    --light: #f5f5f5;
    --dark: #333;
    --font-family: 'Scene Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Modal de autenticación */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}

.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #e1e1e1;
}

.auth-tab {
  padding: 10px 15px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

/* Formularios */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.primary-btn:hover {
  background-color: var(--secondary); /* Efecto hover con el color secundario */
}

/* Corrige la variable en el tab activo también */
.auth-tab.active {
  opacity: 1;
  border-bottom: 2px solid var(--primary); /* Cambiado de var(--primary-color) */
}

.secondary-btn {
  width: 100%;
  padding: 10px;
  background-color: #f1f1f1;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 10px;
  cursor: pointer;
}

/* Google button */
.social-providers {
  margin-bottom: 20px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.google-btn img {
  width: 20px;
  margin-right: 10px;
}

/* Divider */
.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.divider:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e1e1;
}

.divider span {
  position: relative;
  background: white;
  padding: 0 10px;
  color: #777;
}

/* User dropdown */
.user-logged-in {
  position: relative;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  border-radius: 8px;
  z-index: 1000;
  right: 10px;
  top: 60px;
  overflow: hidden;
}

.user-info {
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 0.8rem;
  color: #666;
}

#userAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

#userName {
  font-weight: bold;
  color: #333;
}


.dropdown-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-links li {
  padding: 0;
}

.dropdown-links li a {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
}

.dropdown-links li a:hover {
  background-color: #f5f5f5;
}

.dropdown-links li.divider {
  border-top: 1px solid #eee;
  margin: 0;
}

.user-info {
  padding: 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
}

#userAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.user-details {
  display: flex;
  flex-direction: column;
}

#userName {
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

#userEmail {
  font-size: 14px;
  color: #666;
}

.dropdown-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-links li a {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  border-radius: 0;
}

.dropdown-links li a:hover {
  background-color: #f5f5f5;
}

.dropdown-links .divider {
  height: 1px;
  background-color: #eee;
  margin: 5px 0;
}

/* Estilos del botón de usuario logueado */
.user-logged-in {
  cursor: pointer;
}

/* Spinner para cargas */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

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

/* Botón secundario */
.secondary-btn {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
}

.secondary-btn:hover {
  background-color: #e0e0e0;
}

/* Google button mejorado */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.google-btn:hover {
  background-color: #f9f9f9;
}

.google-btn img {
  margin-right: 8px;
  width: 18px;
  height: 18px;
}

.role-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 5px;
}

.role-badge.admin {
  background-color: #dc3545;
  color: white;
}

.role-badge.premium {
  background-color: #ffc107;
  color: #212529;
}

.role-badge.basic {
  background-color: #6c757d;
  color: white;
}

.success-modal-content {
  position: relative;
  /* Resto de propiedades... */
}

.success-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.success-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.success-icon {
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(76, 175, 80, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-modal h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 24px;
}

.success-modal p {
  color: #666;
  margin-bottom: 10px;
  font-size: 16px;
}

.welcome-message {
  font-weight: 500;
  color: #6e2ff7;
  margin: 15px 0;
}

.continue-button {
  background-color: #6e2ff7;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 20px;
}

.continue-button:hover {
  background-color: #5d20e0;
}


/* Dropdown de usuario */
.user-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 10px;
}

.user-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  font-weight: 500;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
  border-radius: 4px;
  min-width: 180px;
  z-index: 100;
  padding: 8px 0;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.logout-item {
  border-top: 1px solid #eee;
  color: #ff4757;
  width: 100%;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  margin-top: 5px;
  padding-top: 12px;
}

/* Modales de autenticación */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  max-width: 400px;
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  line-height: 20px;
}

.close:hover {
  color: #333;
}

.auth-btn {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  border: none;
}

.login-btn {
  background-color: transparent;
  color: #333;
}

.register-btn {
  background-color: #2e86de;
  color: white;
}

.login-btn:hover {
  background-color: #f5f5f5;
}

.auth-submit-btn {
  width: 100%;
  padding: 10px;
  background-color: #2e86de;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 10px;
}

.auth-alternative {
  margin-top: 20px;
  text-align: center;
}

.auth-alternative a {
  color: #2e86de;
  text-decoration: none;
}

/* Otros ajustes */
#authenticatedControls {
  display: flex;
  align-items: center;
}

/* Estilos para la sección de usuario en móvil */
.mobile-user-section {
  padding: 15px;
  border-bottom: 1px solid #eaeaea;
}

/* User info section */
.mobile-user-info .user-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-user-info .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.mobile-user-info .user-details {
  flex: 1;
}

.mobile-user-info .user-name {
  font-weight: 600;
  font-size: 16px;
  color: #333;
}

.mobile-user-info .user-email {
  font-size: 14px;
  color: #666;
  margin-top: 2px;
}

/* Dropdown links */
.mobile-user-info .dropdown-links {
  display: flex;
  flex-direction: column;
}

.mobile-user-info .dropdown-link {
  display: flex;
  align-items: center;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  font-size: 15px;
}

.mobile-user-info .dropdown-link svg {
  margin-right: 10px;
  color: var(--primary);
}

.mobile-user-info .dropdown-divider {
  height: 1px;
  background-color: #eaeaea;
  margin: 10px 0;
}

.mobile-user-info .sign-out-btn {
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font-size: 15px;
  padding: 10px 0;
  color: #e53935;
  font-family: inherit;
}

.mobile-user-info .admin-section {
  margin: 5px 0;
}

.mobile-user-info .admin-link {
  color: var(--primary);
  font-weight: 500;
}

/* Para la versión responsiva */
@media (max-width: 768px) {
  .user-dropdown {
    position: static;
  }
  
  .dropdown-menu {
    position: fixed;
    width: calc(100% - 30px);
    left: 15px;
    right: 15px;
    top: auto;
    bottom: 15px;
  }
}
