/* Variáveis de cores - Adicionando modo dark */
:root {
  --primary-color: #03008A;
  --secondary-color: #4f54c0;
  --accent-color: #03008acc;
  --white-color: #fff;
  --text-color: #333;
  --light-text-color: #777;
  --bg-color: #f5f7ff;
  --card-bg: #ffffff;
  --border-radius: 12px;
  --box-shadow: 0 8px 20px rgba(3, 0, 138, 0.1);
  --transition: all 0.3s ease;
}

/* Modo dark */
[data-theme="dark"] {
  --primary-color: #6366f1;
  --secondary-color: #818cf8;
  --accent-color: #6366f1cc;
  --white-color: #fff;
  --text-color: #e5e7eb;
  --light-text-color: #9ca3af;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Cabeçalho */
.header-container {
  background-color: var(--card-bg);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(3, 0, 138, 0.08);
  padding: 16px 24px;
  transition: var(--transition);
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo-container img:hover {
  transform: scale(1.05);
}

.user-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.user-info {
  margin-left: 20px;
  font-size: 16px;
  color: var(--text-color);
  font-weight: 500;
}

.user-info strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* Container VIP */
.vip-container {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    text-decoration: none;
}

/* VIP Badge styles */
.vip-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #cccccc; /* Cinza para não-VIP */
    color: #333333;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
    position: relative;
    line-height: 1.2;
    z-index: 1;
}

.vip-badge:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Crown icon - Agora combina com o fundo do badge */
.crown-icon {
    position: absolute;
    right: -8px;
    top: -10px;
    width: 24px;
    height: 24px;
    min-width: 16px;
    min-height: 16px;
    transform: rotate(25deg);
    transition: all 0.3s ease;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Coroa para não-VIP (cinza) */
.vip-badge + .crown-icon {
    fill: #cccccc;
}

/* Coroa para VIP (dourado) */
.vip-badge.gold + .crown-icon {
    fill: #daa520;
}

/* Efeitos hover */
.vip-container:hover .crown-icon {
    transform: rotate(25deg) scale(1.15);
}

/* Gold VIP styles */
.vip-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #daa520 50%, #b8860b 100%);
    color: #000;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.4);
}

/* Dark mode adjustments */
[data-theme="dark"] .vip-badge:not(.gold) {
    background-color: #555555;
    color: #eeeeee;
}

[data-theme="dark"] .vip-badge:not(.gold) + .crown-icon {
    fill: #555555;
}

[data-theme="dark"] .vip-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #daa520 50%, #b8860b 100%);
    color: #111;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.6);
}

[data-theme="dark"] .vip-badge.gold + .crown-icon {
    fill: #daa520;
}

/* Navegação principal */
.header-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.header-nav ul li {
  position: relative;
}

/* Estilo base para todos os links */
.header-nav ul li a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  padding: 8px;
}

/* Seletor de linguagem - estilo específico */
.language-selector {
  position: relative;
}

.language-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.language-button:hover {
  background-color: rgba(3, 0, 138, 0.05);
}

.language-flag {
  width: 24px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

.language-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: var(--card-bg);
  min-width: 160px;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  z-index: 10;
  padding: 8px 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.language-dropdown a {
  color: var(--text-color);
  padding: 8px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  font-size: 14px;
  border-radius: 0;
}

.language-dropdown a:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.language-selector:hover .language-dropdown {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* Ícones redondos (notificação e perfil) */
.header-nav ul li:not(.language-selector) a {
  border-radius: 50%;
}

/* Hover apenas para os ícones redondos */
.header-nav ul li:not(.language-selector) a:hover {
  background-color: rgba(3, 0, 138, 0.05);
  transform: translateY(-2px);
}

/* Filtro para ícones específicos */
.header-nav ul li.notification-container a img,
.header-nav ul li:last-child a img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(99%) saturate(7488%) hue-rotate(247deg) brightness(90%) contrast(101%);
}

.header-nav ul li a img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}

/* Notificação */
.notification-container {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--primary-color);
  color: var(--white-color);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(3, 0, 138, 0.2);
}

/* Botão de tema */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary-color);
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(3, 0, 138, 0.08);
  transform: translateY(-2px);
}

.theme-toggle i {
  font-size: 18px;
}

[data-theme="dark"] .theme-toggle {
  color: var(--white-color);
}

/* Modal de notificação */
.notification-modal {
  display: none;
  position: absolute;
  top: 48px;
  right: -10px;
  background-color: var(--card-bg);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 16px;
  width: 320px;
  z-index: 3;
  border: 1px solid rgba(3, 0, 138, 0.08);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-modal.show {
  display: block;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-modal h5 {
  margin: 0;
  font-size: 16px;
  color: var(--text-color);
  font-weight: 600;
}

.mark-all-read {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.mark-all-read:hover {
  background-color: rgba(3, 0, 138, 0.05);
}

.mark-all-read:active {
  transform: scale(0.98);
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 14px;
  color: var(--text-color);
  display: block;
  width: 100%;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  position: relative;
  box-sizing: border-box;
}

.notification-item.unread {
  background-color: rgba(3, 0, 138, 0.03);
}

.notification-item:hover {
  background-color: rgba(3, 0, 138, 0.05);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.unread-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.notification-message {
  flex: 1;
  line-height: 1.4;
}

.notification-time {
  display: block;
  font-size: 12px;
  color: var(--light-text-color);
  margin-top: 4px;
  text-align: right;
}

.loading-notifications {
  padding: 14px;
  text-align: center;
  color: var(--light-text-color);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.notification-item.error {
  color: #dc2626;
  background-color: rgba(220, 38, 38, 0.05);
}

/* Scrollbar styling */
.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: rgba(3, 0, 138, 0.2);
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: rgba(3, 0, 138, 0.3);
}

[data-theme="dark"] .notification-list::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
  }
  
  .info-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .logo-container img {
    height: 40px;
  }
  
  .header-nav ul {
    gap: 16px;
  }
  
  .user-info {
    font-size: 14px;
  }
  
  .notification-modal {
    width: 280px;
    right: -20px;
  }
  
  .vip-badge {
    font-size: 11px;
    padding: 2px 6px;
  }
  
  .crown-icon {
    width: 20px;
    height: 20px;
    right: -6px;
    top: -8px;
  }
}

@media (max-width: 500px) {
  .notification-item {
    padding: 10px 8px;
    font-size: 13px;
  }
  
  .notification-modal {
    width: calc(100vw - 40px);
    right: -30px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 12px;
  }
  
  .logo-container img {
    height: 36px;
  }
  
  .header-nav ul {
    gap: 12px;
  }
  
  .user-info {
    font-size: 13px;
  }
  
  .notification-modal {
    width: calc(100vw - 40px);
    right: -30px;
  }
  
  .vip-badge {
    font-size: 10px;
  }
  
  .crown-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 380px) {
  .header-nav ul {
    gap: 8px;
  }
  
  .logo-container img {
    height: 32px;
  }
  
  .user-info {
    font-size: 12px;
  }
  
  .vip-badge {
    font-size: 9px;
  }
  
  .crown-icon {
    width: 16px;
    height: 16px;
  }
  
  .vip-container {
    margin-left: 6px;
  }
  
  .notification-item {
    padding: 8px 6px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .info-header {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .user-info {
    order: 3;
    flex: 0 0 100%;
    text-align: center;
  }
}