/* Top Bar for Auth and Theme Switch */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    z-index: 1000;
    background-color: rgba(var(--card-bg-rgb), 0.5); /* 반투명 배경 */
    backdrop-filter: blur(10px); /* 블러 효과 */
    -webkit-backdrop-filter: blur(10px); /* Safari 지원 */
    border-bottom: 1px solid rgba(var(--border-color-rgb), 0.2); /* 은은한 경계선 */
}

#user-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-info .username {
    font-weight: 500;
}

:root {
    --font-family: 'Inter', 'Noto Sans KR', sans-serif;
    
    /* Light Mode Palette */
    --bg-color: #f0f2f5; /* Light grey background */
    --card-bg: #ffffff; /* White card background */
    --card-bg-rgb: 255, 255, 255;
    --sidebar-bg: #f8f9fa; /* Lighter sidebar background */
    --text-color: #343a40; /* Dark grey text for better contrast */
    --text-muted: #6c757d; /* Muted grey text */
    --border-color: #ced4da; /* Medium grey border for visibility */
    --border-color-rgb: 206, 212, 218;
    --primary-color: #6a5acd; /* Medium purple */
    --primary-hover: #7b68ee; /* Brighter purple on hover */
    --success-color: #28a745; /* Green */
    --error-color: #dc3545; /* Red */
    --secondary-color: #6c757d; /* Muted grey for secondary actions */
    --info-color: #17a2b8; /* Info blue for edit actions */
    --link-color: #007bff;
}

body.dark-mode {
    /* Dark Mode Palette */
    --bg-color: #1a1a1d;
    --card-bg: #2c2c34;
    --card-bg-rgb: 44, 44, 52;
    --sidebar-bg: #212126;
    --text-color: #f8f9fa; /* Very light grey text for dark mode */
    --text-muted: #adb5bd;
    --border-color: #495057;
    --border-color-rgb: 73, 80, 87;
    --primary-color: #9370db; /* MediumPurple, slightly brighter */
    --primary-hover: #a080e8; /* Brighter purple */
    --success-color: #4CAF50; /* Brighter green */
    --error-color: #f44336; /* Brighter red */
    --secondary-color: #adb5bd; /* Lighter muted grey for dark mode secondary */
    --info-color: #20c997; /* Teal for dark mode info */
    --link-color: var(--primary-hover);
}

/* ... (rest of the file) ... */

#user-info .logout-btn {
    margin-left: 10px;
    padding: 8px 12px;
    border: 1px solid var(--error-color); /* 기본 테두리 추가 */
    background-color: var(--error-color); /* 기본 배경색 */
    color: white; /* 기본 글자색 */
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#user-info .logout-btn:hover {
    background-color: #c82333; /* Darken error color on hover */
    border-color: #c82333;
    color: white;
}

/* 기존 theme-switch-wrapper 스타일 조정 */
.theme-switch-wrapper {
    position: static; /* fixed에서 static으로 변경 */
    margin-right: 0; /* 불필요한 마진 제거 */
}

/* New styles for navigation buttons and user info */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-button {
    padding: 8px 16px;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

#user-info-container .username {
    font-weight: 500;
    color: var(--text-color);
}

/* Adjust top-bar to accommodate the new centered nav */
.top-bar {
    justify-content: space-between;
}

#user-info-container {
    flex: 1;
}

.theme-switch-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.app-footer {
    width: 100%;
    max-width: 900px; /* Match the container max-width */
    margin: 2rem auto 0;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.app-footer p {
    margin: 0.25rem 0;
}
