/* Base */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f141a;
  color: #d9dadb;
}

/* Header */
header {
  display: flex;
  align-items: center;
  background-color: #1f2631;
  padding: 10px 20px;
}
header .logo img {
  height: 40px;
  margin-right: 15px;
}
header nav {
  display: flex;
  gap: 15px;
  flex-grow: 1;
  align-items: center;
}
header nav button {
  background: none;
  border: none;
  color: #a6adb8;
  cursor: pointer;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 4px;
}
header nav button:hover {
  color: white;
  background-color: #2a313a;
}
header input[type="search"] {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  font-size: 1rem;
  background-color: #222831;
  color: white;
}

/* Layout */
main {
  display: flex;
  height: calc(100vh - 60px);
}

/* Sidebar */
aside.sidebar {
  width: 240px;
  background-color: #1b1f26;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}
aside.sidebar .profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
aside.sidebar .profile img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}
aside.sidebar .profile .username {
  font-weight: bold;
  color: #2e98f9;
  font-size: 2rem;
}

/* -----------------------------
   Styled side buttons (from .css-yjay0l)
   Applied to .side-btn
   ----------------------------- */
.side-btn {
    background: rgb(7, 36, 43);
    border: 2px solid rgb(5, 60, 72);
    color: rgb(106, 227, 249);
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* left-align content; space handled by margin */
    align-items: center;
    height: 48px;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 0px 12px !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    gap: 12px;
    transition: background-color .12s ease, transform .06s ease;
}

/* icon larger + white */
.side-btn .side-icon {
    height: 26px;      /* 키움 */
    width: 26px;
    object-fit: contain;
    margin-right: 8px;
    filter: brightness(0) invert(1) saturate(0.8); /* 근사 흰색 처리 (PNG일 경우) */
}

/* label */
.side-btn .side-label {
    flex: 1;
    text-align: left;
    color: inherit;
    font-weight: 600;
}

/* hover / active states */
.side-btn:hover {
    background: rgb(10, 50, 60);
    transform: translateY(-1px);
    color: #ffffff;
}
.side-btn:active {
    transform: translateY(0);
}

/* highlighted variation */
.side-btn.highlighted {
  background: linear-gradient(90deg, #7e48f7, #5e2ee8);
  border-color: rgba(120, 60, 240, 0.9);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(125,72,247,0.12);
}
.side-btn.highlighted .side-icon {
  filter: brightness(0) invert(1); /* keep icon visible on gradient */
}

/* Dummy buttons (same visual style but will show toast on click) */
.side-btn.dummy { opacity: 0.98; }

/* Submenu (kept for backward compatibility but not used) */
.submenu {
  display: none;
}

/* Content area */
section.content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

/* World card */
.world-card {
  background-color: #22282f;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}
.world-card img {
  width: 340.22px;
  height: 255.16px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}
.world-card h3 {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-weight: bold;
}
.world-card p {
  font-size: 0.85rem;
  color: #a6adb8;
  margin: 0 0 10px 0;
}
.world-info {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  align-items: center;
}
.world-info span {
  background-color: #333a44;
  padding: 5px 8px;
  border-radius: 4px;
}
.invite-button {
  background-color: #1273ea;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}
.invite-button:hover {
  background-color: #0d5bc4;
}

/* topnav (header) */
.topnav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-grow: 1;
}
.nav-btn {
  background: none;
  border: none;
  color: #a6adb8;
  cursor: pointer;
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav-btn:hover { background:#2a313a; color:white; }

/* mobile toggle (small screens) */
.mobile-toggle {
  display: none;
  margin-left: 10px;
  background: none;
  border: none;
  color: #a6adb8;
  font-size: 1.2rem;
  cursor: pointer;
}

/* responsiveness */
@media (max-width: 900px) {
  aside.sidebar {
    position: fixed;
    left: -260px;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 1200;
    transition: left .22s ease;
  }
  aside.sidebar.open { left: 0; }
  .mobile-toggle { display: inline-block; }
  main { margin-left: 0; }
}

/* Toast */
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 180px;
  max-width: 320px;
  z-index: 3000;
  pointer-events: none;
  font-size: 14px;
}
.toast .item {
  background: rgba(20,26,30,0.96);
  color: #e6f7fb;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  margin-top: 8px;
  pointer-events: auto;
}
.toast .item strong { display:block; font-weight:700; margin-bottom:4px; }

/* focus */
.side-btn:focus, .side-subbtn:focus, .nav-btn:focus {
  outline: 2px solid rgba(100,180,230,0.25);
  outline-offset: 2px;
}
