/* Shared Topbar Styles */
:root {
  --grad-start: #667eea;
  --grad-end: #764ba2;
}

/* Top Bar Container */
#topBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

#topBar .left {
  position: absolute;
  left: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

#topBar .right {
  position: absolute;
  right: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* User Menu Container */
#userMenuContainer {
  position: relative;
}

#userAvatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, .3);
  font-size: 1.2em;
  color: #fff;
}

#userAvatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, .4);
}

/* User Dropdown */
#userDropdown {
  display: none;
  position: absolute;
  top: 50px;
  left: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, .25);
  min-width: 200px;
  padding: 8px;
  z-index: 2000;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--grad-start), var(--grad-end));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

#userDropdown button {
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95em;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

#userDropdown button:hover {
  background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%) !important;
}

#userDropdown .divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin: 8px 0;
}

#userDropdown .danger {
  color: #dc2626;
}

/* Center Brand */
#brandLink {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.brand-cards {
  position: relative;
  width: 60px;
  height: 36px;
}

.brand-card {
  position: absolute;
  width: 25px;
  height: 36px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1em;
  box-shadow: 0 2px 6px rgba(102, 126, 234, .3);
}

.brand-card.c1 {
  left: 0;
  transform: rotate(-10deg);
  z-index: 1;
}

.brand-card.c2 {
  left: 17px;
  z-index: 3;
}

.brand-card.c3 {
  left: 34px;
  transform: rotate(10deg);
  z-index: 2;
}

.brand-text {
  font-size: .9em;
  font-weight: 500;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Language Menu Container */
#languageMenuContainer {
  position: relative;
}

#languageBtn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, .3);
  font-size: 1.2em;
  color: #fff;
}

#languageBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, .4);
}

/* Language Dropdown */
#languageDropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, .25);
  min-width: 200px;
  padding: 8px;
  z-index: 2000;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--grad-start), var(--grad-end));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

#languageDropdown .lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  border-radius: 8px;
  transition: all .2s;
}

#languageDropdown .lang-option:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

#languageDropdown .lang-option.active {
  background: rgba(102, 126, 234, 0.15);
  font-weight: 600;
}

#languageDropdown .lang-flag {
  font-size: 20px;
}

#languageDropdown .lang-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
  #topBar {
    height: 60px;
  }
  
  #topBar .left,
  #topBar .right {
    top: 50%;
    transform: translateY(-50%);
  }
  
  #userAvatar,
  #languageBtn {
    width: 40px;
    height: 40px;
    font-size: 1em;
  }
  
  .brand-cards {
    width: 50px;
    height: 30px;
  }
  
  .brand-card {
    width: 20px;
    height: 30px;
    font-size: 0.85em;
  }
  
  .brand-card.c1 { left: 0; }
  .brand-card.c2 { left: 14px; }
  .brand-card.c3 { left: 28px; }
  
  .brand-text {
    font-size: 0.8em;
  }
}