/* shared.css — common styles for all LootMaps SPAs */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { background: #0d0d0d; color: #e0e0e0; font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; min-height: 100vh; }
a { color: #8aacff; text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #8aacff;
  outline-offset: 2px;
}

/* Navigation */
nav { border-bottom: 1px solid #1e1e1e; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-left { display: flex; align-items: center; gap: 20px; }
.brand { font-weight: 700; font-size: 17px; color: #e0e0e0; }
.brand:hover { text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 12px; font-size: 14px; border-left: 1px solid #2a2a2a; padding-left: 20px; }

/* Buttons */
.btn { background: #5865f2; color: #fff; padding: 7px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; }
.btn:hover { opacity: .85; text-decoration: none; }
.btn-ghost { background: transparent; color: #888; border: 1px solid #2a2a2a; padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-ghost:hover { color: #e0e0e0; border-color: #444; }

/* Profile Menu */
.profile-wrap { position: relative; }
.profile-trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: none; color: #888; font-size: 14px; padding: 4px 8px; border-radius: 6px; }
.profile-trigger:hover { color: #e0e0e0; background: rgba(255,255,255,.05); }
.profile-trigger img { width: 28px; height: 28px; border-radius: 50%; }
.profile-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px; min-width: 130px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 100; }
.profile-menu.open { display: block; }
.profile-menu a,
.profile-menu button { display: block; width: 100%; padding: 10px 16px; font: inherit; font-size: 13px; color: #888; text-align: left; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.profile-menu a:hover,
.profile-menu button:hover { color: #e0e0e0; background: rgba(255,255,255,.05); text-decoration: none; }
.profile-menu button:disabled { cursor: wait; opacity: .65; }

/* Layout & Sidebar */
.sidebar { border-right: 1px solid #1e1e1e; padding: 20px 0; }
.sidebar-label { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #444; padding: 0 16px; margin-bottom: 8px; }
.guild-item { display: block; padding: 9px 16px; font-size: 14px; color: #888; cursor: pointer; border: none; background: none; width: 100%; text-align: left; border-left: 2px solid transparent; }
.guild-item:hover { color: #e0e0e0; background: rgba(255,255,255,.03); }
.guild-item.active { color: #e0e0e0; border-left-color: #5865f2; background: rgba(88,101,242,.08); }

/* Footer */
footer { border-top: 1px solid #1a1a1a; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #444; flex-wrap: wrap; gap: 8px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: #444; }
.footer-links a:hover { color: #e0e0e0; text-decoration: none; }

/* States */
.loading, .empty { color: #555; font-size: 14px; padding: 48px 0; text-align: center; }
.gate { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; gap: 16px; text-align: center; padding: 32px; }
.gate p { color: #666; font-size: 15px; }

@media (max-width: 640px) {
  nav { padding: 10px 12px; align-items: flex-start; }
  .nav-left { width: 100%; gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .nav-left::-webkit-scrollbar { display: none; }
  .nav-left a { flex: 0 0 auto; }
  .nav-right { border-left: 0; padding-left: 0; flex: 0 0 auto; }
  .profile-trigger span { display: none; }

  .layout > .sidebar {
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid #1e1e1e;
    scrollbar-width: thin;
  }
  .layout > .sidebar .sidebar-label { display: none; }
  .layout > .sidebar .guild-item {
    width: auto;
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
  }
  .layout > .sidebar .guild-item.active {
    border-left-color: transparent;
    border-bottom-color: #5865f2;
  }
}
