/* ======================
   🔹 공통 아이콘 스타일
====================== */
.sidebar-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.626);
    text-align: center;
    border: none;
    background: none;
    outline: none;
    margin: 0;
    transition: color 0.2s ease;
    text-decoration: none;
    z-index: 9999;
}

.sidebar-icon.toggle-extension {
    background: none !important;
    color: #ccc;
    cursor: pointer;
}

.sidebar-icon.toggle-extension:hover {
    background: #333;
    color: white;
}

.sidebar-icon.toggle-extension.active,
.sidebar-icon.toggle-extension:focus {
    background: none !important;
    color: #ffffff !important;
}

.sidebar-icon:hover,
.sidebar-icon.active {
    color: var(--highlight-color, #ffffff);
    background: transparent;
}

.sidebar-icon i {
    background: none !important;
    outline: none;
    box-shadow: none;
}

/* ======================
   🔹 탭 컨텐츠 전환
====================== */
.tab-content {
    display: none;
}

.tab-content[style*="display: block"] {
    display: block !important;
}

/* ======================
   🔹 반응형 (모바일)
====================== */
@media (max-width: 640px) {
    .desktop-menu {
        display: none;
    }
}

/* ======================
   🔹 사이드 패널 레이아웃
====================== */
.side-panel.main-panel-only {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    height:auto;
    width: auto;
    z-index: 30;
}

.sidebar-wrapper {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.vscode-sidebar {
    width: 50px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    height: 100vh;
    z-index: 99990;
}

/* ======================
   🔹 확장 패널
====================== */
.sidebar-extension-panel {
    position: fixed;
    box-sizing: border-box; 
    top: 0;
    left: 50px;
    width: 20vw;
    min-width: 200px;
    max-width: 500px;
    background-color: #2c2f33;
    color: white;
    padding: 10px 16px; /* 상하 10px, 좌우 16px */
    border-right: 1px solid #444;
    height: 100vh;
    overflow-y: auto;
    z-index: 12090;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding-left: 50px;
}

.sidebar-extension-panel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sidebar-extension-panel {
        width: calc(100vw - 50px);
        left: 50px;
        transform: translateX(-100%);
        min-width: 0px;
    }

    .sidebar-extension-panel.open {
        transform: translateX(0);
    }
}

.sidebar-extension-panel h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.sidebar-extension-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-extension-panel li {
    margin: 5px 0;
}

.sidebar-extension-panel a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.sidebar-extension-panel a:hover {
    text-decoration: underline;
}

/* ======================
   🔹 panel-footer 하단 고정
====================== */
.panel-footer {
    margin-top: auto; /* 🧡 푸터를 항상 맨 아래로 */
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.real-footer {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    margin-top: 10px;
    border-top: 1px solid #333;
    margin-bottom: 20px;
    padding-top: 8px;
}

.hidden {
    display: none;
  }

/* ======================
   🔹 작성자 정보 박스
====================== */
.author-box {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-top: 0;
}

.profile-gif {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.author-description {
    max-width: 600px;
}

.author-description p {
    margin: 0;
    color: #666;
}

/* ======================
   🔹 auth 버튼들 (수정완료)
====================== */
.auth-buttons {
    display: flex;
    flex-direction: column;     /* ✅ 세로 정렬 */
    align-items: stretch;       /* ✅ 양옆 채움 */
    gap: 10px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
  }
  
  /* 모바일 대응 */
  @media (max-width: 640px) {
    .auth-buttons {
      gap: 8px;
      flex-direction: column;
      width: 100%;
    }
  
    .auth-btn.write-post,
    .auth-btn.logout {
      margin-left: 0 !important;
    }
  
    .auth-btn.logout {
      margin-right: 0 !important;
    }
  }
  
  /* 공통 버튼 */
  .auth-btn {
    width: 100%;                /* ✅ 전체 가로폭 */
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 10px;
    border-radius: 6px;
  }
  
  /* 로그인 버튼 */
  .auth-btn.login {
    border-radius: 999px;
    font-size: 1.2rem;
  }
  
  .auth-btn.login:hover {
    background-color: rgba(255, 255, 200, 0.05);
    color: white;
    border-color: rgba(255, 255, 180, 0.8);
    box-shadow: 0 0 12px rgba(255, 230, 100, 0.8);
  }
  
  /* 회원가입 버튼 */
  .auth-btn.signup {
    background: none;
    border: none;                      /* ✅ 테두리 완전 제거 */
    color: white;
    font-size: 0.9rem;
    padding: 6px 4px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.35);
    box-shadow: none;                 /* ✅ 그림자도 제거 */
  }
  
  .auth-btn.signup:hover {
    color: lightblue;
    text-shadow: 0 0 10px rgba(255, 230, 120, 0.8);
  }
  
  /* 글쓰기 버튼 */
  .auth-btn.write-post {
    margin-left: 10px;
    font-size: 0.85rem;
    padding: 4px 10px !important;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.35);
    background-color: black;
  }
  
  .auth-btn.write-post:hover {
    color: lightblue;
    text-shadow: 0 0 10px rgba(255, 230, 120, 0.8);
    background-color: rgba(255, 255, 200, 0.05);
    border-color: rgba(255, 255, 180, 0.8);
  }
  
  /* 로그아웃 버튼 */
  .auth-btn.logout {
    font-size: 0.85rem;
    border-radius: 999px;
    padding: 8px 10px;
  }
  
  .auth-btn.logout:hover {
    background-color: rgba(255, 255, 200, 0.05);
    color: white;
    border-color: rgba(255, 255, 180, 0.8);
    box-shadow: 0 0 12px rgba(255, 230, 100, 0.8);
  }
  

/* ======================
   🔹 ...로그인 폼 (버튼 클릭 시 등장)
====================== */
.login-form-container {
    display: none; /* 기본은 숨김 */
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #555;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#login-form input {
    padding: 10px;
    background-color: #1e1e1e;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

#login-form button {
    padding: 10px;
    background-color: #641df1;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#login-form button:hover {
    background-color: #4c16b9;
}



/* ======================
   🔹 헤더 & 언어 선택
====================== */
.header-top {
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: transparent;
}

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.light-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 25px;
    cursor: pointer;
    border-top: none;
    margin-top: 0;
    padding: 0;
    flex-shrink: 0;
}

.light-switch .switch-label {
    width: 45px;
    height: 25px;
    background-color: #888;
    border-radius: 999px;
    position: relative;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.light-switch .switch-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: linear-gradient(to bottom, #ffffff, #cccccc);
    border-radius: 50%;
    transition: left 0.3s ease, background 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.light-switch[aria-checked="true"] .switch-handle {
    left: calc(100% - 2px - 21px);
    background: linear-gradient(to bottom, #eeeeee, #bbbbbb);
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: none;
    border: none;
    color: black;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 5px 10px;
}

.lang-btn .fi {
    width: 1.5rem;
    height: 1.2rem;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    min-width: 120px;
    padding: 5px 0;
    list-style: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.lang-option:hover {
    background-color: #f5f5f5;
}

.lang-option.active-lang {
    font-weight: bold;
    color: var(--highlight-color, #00adb5);
}

html.dark .lang-menu {
    background: #222;
    border-color: #444;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
}

html.dark .lang-option {
    color: #eee;
}

html.dark .lang-option:hover {
    background-color: #333;
}

html.dark .lang-btn {
    color: #fff;
}

.profile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
  }
  
  .profile-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
  }
  
  .profile-info {
    max-width: 260px;
  }
  
  .profile-name {
    font-size: 1.4em;
    margin: 5px 0;
  }
  
  .profile-bio {
    font-size: 0.95em;
    color: #888;
    margin: 10px 0;
  }
  
  .profile-social a {
    color: inherit;
    margin: 10px 8px;
    font-size: 1.4em;
    transition: color 0.2s ease;
  }
  
  .profile-social a:hover {
    color: var(--highlight-color, #ff4081);
  }
  
  .profile-tags {
    margin-top: 15px;
  }
  
  .profile-tags span {
    display: inline-block;
    background-color: #eee;
    color: #333;
    padding: 4px 10px;
    margin: 3px;
    border-radius: 20px;
    font-size: 0.8em;
  }
  