/* 초기 로딩 상태 최적화 - 인증 관련 요소만 부드럽게 전환 */
#user-profile,
#notification-icon,
#auth-buttons {
    transition: opacity 0.1s ease-out;
}

/* 프로필 요소 안정화 */
#user-profile .avatar {
    min-width: 32px;
    min-height: 32px;
    position: relative;
}

#user-profile .avatar img {
    transition: opacity 0.2s ease-in-out;
    opacity: 1;
}

/* 프로필 로딩 상태 */
#user-profile.loading .avatar img {
    opacity: 0.7;
}

/* 프로필 요소가 표시될 때 부드러운 전환 */
html body.auth-logged-in #user-profile {
    display: block !important;
    visibility: visible !important;
    opacity: 1;
    transform: translateX(0);
}

/* 프로필 요소가 숨겨질 때 */
html body.auth-logged-out #user-profile,
html body:not(.auth-logged-in) #user-profile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0;
    transform: translateX(10px);
}

/* 인증 상태별 요소 표시/숨김 제어 - 최고 우선순위 */
/* 기본 상태: 로그아웃 (JavaScript 로드 전) */
html body #user-profile,
html body #notification-icon {
    display: none !important;
    visibility: hidden !important;
}

html body #auth-buttons {
    display: flex !important;
    visibility: visible !important;
}

/* HTML 레벨 클래스 (body 생성 전) */
html.auth-logged-in-pending #user-profile,
html.auth-logged-in-pending #notification-icon {
    display: block !important;
    visibility: visible !important;
}

html.auth-logged-in-pending #auth-buttons {
    display: none !important;
    visibility: hidden !important;
}

html.auth-logged-out-pending #user-profile,
html.auth-logged-out-pending #notification-icon {
    display: none !important;
    visibility: hidden !important;
}

html.auth-logged-out-pending #auth-buttons {
    display: flex !important;
    visibility: visible !important;
}

/* 로그인 상태 클래스가 적용된 경우 - 최고 우선순위 */
html body.auth-logged-in #user-profile,
html body.auth-logged-in #notification-icon {
    display: block !important;
    visibility: visible !important;
}

html body.auth-logged-in #auth-buttons {
    display: none !important;
    visibility: hidden !important;
}

/* 로그아웃 상태 클래스가 적용된 경우 (명시적) - 최고 우선순위 */
html body.auth-logged-out #user-profile,
html body.auth-logged-out #notification-icon {
    display: none !important;
    visibility: hidden !important;
}

html body.auth-logged-out #auth-buttons {
    display: flex !important;
    visibility: visible !important;
}

/* 추가 방어 규칙 - 다른 CSS의 간섭 방지 */
body:not(.auth-logged-in) #user-profile,
body:not(.auth-logged-in) #notification-icon {
    display: none !important;
    visibility: hidden !important;
}

body:not(.auth-logged-out) #auth-buttons {
    display: none !important;
    visibility: hidden !important;
}

/* 브라우저별 호환성 */
@supports (display: flex) {
    html body #auth-buttons,
    html body.auth-logged-out #auth-buttons,
    html.auth-logged-out-pending #auth-buttons {
        display: flex !important;
    }
}

/* 기본 스타일 */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --info-color: #3b82f6;
    --info-hover: #2563eb;
    --success-color: #10b981;
    --success-hover: #059669;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --background-color: #ffffff;
    --background-light: #f9fafb;
    --background-dark: #f3f4f6;
    --border-color: #e5e7eb;
    --border-dark: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --transition: all 0.2s ease-in-out;
}

/* 리셋 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

/* 레이아웃 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

/* 헤더 */
.header {
    background-color: var(--background-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto; /* 로고 | 네비게이션(중앙) | 사용자액션 */
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-self: center; /* 네비게이션을 중앙에 고정 */
    gap: 0.5rem; /* 네비게이션 링크 사이 간격 */
}

.nav-link {
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* .main-nav 스타일은 위에서 정의됨 */



.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--background-light);
}

.user-actions {
    display: flex;
    align-items: center;
    min-width: 120px; /* 최소 너비 보장으로 네비게이션 흔들림 방지 */
    justify-content: flex-end; /* 오른쪽 정렬 */
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 아바타 */
.avatar {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-link {
    display: block;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.avatar-link:hover {
    opacity: 0.8;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
}

.avatar-xl {
    width: 5rem;
    height: 5rem;
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--text-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-outline {
    border-color: var(--border-dark);
    background-color: transparent;
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--background-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--danger-hover);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: var(--warning-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: var(--success-hover);
}

.btn-link {
    color: var(--primary-color);
    padding: 0;
    background: none;
    border: none;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-icon {
    padding: 0.5rem;
}

.btn-icon i {
    margin-right: 0.25rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* 배지 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-color);
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

/* 카드 */
.card {
    background-color: var(--background-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--text-light);
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

/* 폼 */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background-color);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    resize: vertical;
}

.form-hint {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-row {
    display: flex;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > .form-group {
    flex: 1;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.checkbox-label input,
.radio-label input {
    margin-right: 0.5rem;
}

/* 탭 */
.tabs {
    margin-bottom: 1.5rem;
}

.tab-list {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.tab-item {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 로딩 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* 푸터 - 크기 축소 버전 */
.footer {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0; /* 2rem에서 1.5rem으로 축소 */
    margin-top: 2rem; /* 3rem에서 2rem으로 축소 */
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 1.5rem에서 1rem으로 축소 */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 250px에서 200px로 축소 */
    gap: 1.5rem; /* 2rem에서 1.5rem으로 축소 */
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem; /* 1.25rem에서 1.1rem으로 축소 */
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem; /* 1rem에서 0.75rem으로 축소 */
}

.footer-logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.footer-description {
    color: var(--text-light);
    margin-bottom: 0.75rem; /* 1rem에서 0.75rem으로 축소 */
    font-size: 0.85rem; /* 폰트 크기 축소 추가 */
    line-height: 1.4; /* 줄 간격 축소 추가 */
}

.footer-title {
    font-size: 0.9rem; /* 1rem에서 0.9rem으로 축소 */
    font-weight: 600;
    margin-bottom: 0.75rem; /* 1rem에서 0.75rem으로 축소 */
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.35rem; /* 0.5rem에서 0.35rem으로 축소 */
}

.footer-menu a {
    color: var(--text-light);
    transition: var(--transition);
    font-size: 0.85rem; /* 폰트 크기 축소 추가 */
}

.footer-menu a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 0.5rem; /* 0.75rem에서 0.5rem으로 축소 */
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem; /* 2rem에서 1.75rem으로 축소 */
    height: 1.75rem; /* 2rem에서 1.75rem으로 축소 */
    border-radius: var(--radius-full);
    background-color: var(--background-dark);
    color: var(--text-color);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem; /* 1.5rem에서 1rem으로 축소 */
    border-top: 1px solid var(--border-color);
    margin-top: 1rem; /* 상단 마진 추가 */
}

.copyright {
    color: var(--text-light);
    font-size: 0.8rem; /* 0.875rem에서 0.8rem으로 축소 */
}

.footer-links {
    display: flex;
    gap: 0.75rem; /* 1rem에서 0.75rem으로 축소 */
}

.footer-link {
    color: var(--text-light);
    font-size: 0.8rem; /* 0.875rem에서 0.8rem으로 축소 */
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

/* 반응형 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0;
    }

    .main-nav {
        margin: 1rem 0;
        width: 100%;
        overflow-x: auto;
    }

    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem; /* 1rem에서 0.75rem으로 축소 */
        align-items: flex-start;
    }

    /* 푸터 모바일 최적화 추가 */
    .footer {
        padding: 1.25rem 0; /* 더 작은 패딩 */
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2열로 변경 */
        gap: 1.25rem;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
    }

    .tab-list {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    /* 푸터 모바일 최적화 추가 */
    .footer-grid {
        grid-template-columns: 1fr; /* 1열로 변경 */
        gap: 1rem;
    }

    .footer-column {
        padding-bottom: 0.5rem;
    }

    .footer-title {
        margin-bottom: 0.5rem;
    }
}

/* 드롭다운 메뉴 */
.user-profile-container {
    position: relative;
}

.profile-dropdown-container {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 150px;
    background-color: var(--background-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.profile-dropdown.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

/* 알림 아이콘 스타일 */
.notification-container {
    position: relative;
    margin-left: 10px;
}

.notification-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.notification-icon-link:hover {
    background-color: #e0e0e0;
}

.notification-icon-link i {
    font-size: 14px;
}

/* 알림 배지 개선 - 숫자와 점 모두 지원 */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757 0%, #cc0000 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 10;
    padding: 0 4px;
}

/* 배지 펄스 애니메이션 */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.6);
    }
}

/* 점만 표시할 때 (숫자 없음) */
.notification-badge.dot-only {
    min-width: 8px;
    width: 8px;
    height: 8px;
    top: -2px;
    right: -2px;
    padding: 0;
    font-size: 0;
}

/* 배지가 10 이상일 때 스타일 조정 */
.notification-badge.large {
    min-width: 22px;
    font-size: 9px;
    padding: 0 5px;
}

/* 알림 드롭다운 스타일 */
.notification-dropdown {
    position: absolute;
    top: 35px;
    right: -150px;
    width: 360px;
    max-height: 80vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    display: none;
    border: 1px solid var(--border-color);
}

.notification-dropdown.active {
    display: block;
}

/* 알림 헤더 스타일 */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}



/* 알림 목록 스타일 */
.notification-list {
    max-height: 800px;
    overflow-y: auto;
}

.notification-empty {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 드롭다운 내 알림 아이템 스타일 */
.notification-dropdown .notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    min-height: 50px;
}

.notification-dropdown .notification-item:last-child {
    border-bottom: none;
}

/* 읽은 알림 스타일 */
.notification-dropdown .notification-item:hover {
    background-color: #f8faff;
}

.notification-dropdown .notification-item:not(.unread) {
    opacity: 0.7;
    background-color: #fafafa;
}

.notification-dropdown .notification-item:not(.unread):hover {
    opacity: 0.9;
    background-color: #f0f0f0;
}

/* 안읽은 알림 스타일 개선 - 더 강한 구분 */
.notification-dropdown .notification-item.unread {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid var(--primary-color);
    border-right: 2px solid rgba(33, 150, 243, 0.2);
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.15);
    position: relative;
    animation: unreadPulse 2s ease-in-out infinite;
    transform: translateX(2px);
}

.notification-dropdown .notification-item.unread:hover {
    background: linear-gradient(135deg, #d1c4e9 0%, #b39ddb 100%);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.25);
    transform: translateX(4px);
}

/* 안읽은 알림 펄스 애니메이션 */
@keyframes unreadPulse {
    0%, 100% {
        box-shadow: 0 3px 12px rgba(33, 150, 243, 0.15);
        border-left-color: var(--primary-color);
    }
    50% {
        box-shadow: 0 3px 16px rgba(33, 150, 243, 0.25);
        border-left-color: #1976d2;
}
}

/* 안읽은 알림 인디케이터 점 */
.notification-dropdown .notification-item.unread::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1976d2 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 2px white, 0 0 6px rgba(33, 150, 243, 0.3);
    animation: unreadDot 1.5s ease-in-out infinite;
}

@keyframes unreadDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 안읽은 알림의 아바타 강조 */
.notification-dropdown .notification-item.unread .notification-avatar {
    box-shadow: 0 0 0 2px var(--primary-color);
    animation: unreadAvatar 2s ease-in-out infinite;
}

@keyframes unreadAvatar {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 0 2px var(--primary-color), 0 0 8px rgba(33, 150, 243, 0.3);
    }
}

/* 안읽은 알림의 텍스트 강조 */
.notification-dropdown .notification-item.unread .notification-username {
    font-weight: 700;
    color: var(--primary-color);
}

.notification-dropdown .notification-item.unread .notification-message {
    font-weight: 500;
    color: var(--text-color);
}

.notification-dropdown .notification-item.unread .notification-time {
    font-weight: 600;
    color: var(--primary-color);
}

/* 드롭다운 내 알림 아바타 */
.notification-dropdown .notification-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--background-dark);
    position: relative;
}

.notification-dropdown .notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-dropdown .notification-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 12px;
}

/* 드롭다운 내 알림 타입 아이콘 */
.notification-dropdown .notification-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    color: white;
    border: 2px solid white;
}

.notification-dropdown .notification-type-icon.like {
    background: #ff6b6b;
}

.notification-dropdown .notification-type-icon.booking {
    background: #4ecdc4;
}

.notification-dropdown .notification-type-icon.swap {
    background: #45b7d1;
}

.notification-dropdown .notification-type-icon.message {
    background: #96ceb4;
}

/* 드롭다운 내 알림 내용 */
.notification-dropdown .notification-content {
    flex: 1;
    min-width: 0;
}

.notification-dropdown .notification-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1px;
}

.notification-dropdown .notification-username {
    font-weight: 600;
    color: var(--text-color);
    font-size: 12px;
}

.notification-dropdown .notification-time {
    font-size: 10px;
    color: var(--text-lighter);
}

.notification-dropdown .notification-message {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

/* 알림 푸터 스타일 */
.notification-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #eee;
}

.view-all {
    font-size: 14px;
    color: #2196f3;
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

/* 알림 팝오버 스타일 */
.notification-popover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.notification-popover-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow: hidden;
    animation: popoverSlideIn 0.3s ease-out;
}

@keyframes popoverSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notification-popover .notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-light);
}

.notification-popover .notification-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.notification-popover .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-popover .btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.notification-popover .btn-text:hover {
    background: var(--primary-color);
    color: white;
}

.notification-popover .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-lighter);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-popover .btn-close:hover {
    background: var(--background-dark);
    color: var(--text-color);
}

.notification-popover-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 8px 0;
}

.notification-popover-list::-webkit-scrollbar {
    width: 6px;
}

.notification-popover-list::-webkit-scrollbar-track {
    background: var(--background-light);
}

.notification-popover-list::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}

.notification-popover-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-lighter);
}

/* 팝오버 내 알림 아이템 */
.notification-popover .notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border-bottom: 1px solid var(--background-light);
    min-height: 60px;
}

.notification-popover .notification-item:last-child {
    border-bottom: none;
}

.notification-popover .notification-item:hover {
    background: var(--background-light);
}

.notification-popover .notification-item.unread {
    background: #f8faff;
    border-left: 4px solid var(--primary-color);
}

.notification-popover .notification-item.unread::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 24px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.notification-popover .notification-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--background-dark);
    position: relative;
}

.notification-popover .notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-popover .notification-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.notification-popover .notification-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    border: 2px solid white;
}

.notification-popover .notification-type-icon.like {
    background: #ff6b6b;
}

.notification-popover .notification-type-icon.booking {
    background: #4ecdc4;
}

.notification-popover .notification-type-icon.swap {
    background: #45b7d1;
}

.notification-popover .notification-type-icon.message {
    background: #96ceb4;
}

.notification-popover .notification-content {
    flex: 1;
    min-width: 0;
}

.notification-popover .notification-header-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.notification-popover .notification-username {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.8rem;
}

.notification-popover .notification-time {
    font-size: 0.7rem;
    color: var(--text-lighter);
}

.notification-popover .notification-message {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

.notification-popover .notification-footer {
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--background-light);
}

.notification-popover .view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.notification-popover .view-all-link:hover {
    background: var(--primary-color);
    color: white;
}

.notification-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 24px;
    color: var(--text-light);
}

.notification-loading i {
    font-size: 1.5rem;
}

.notification-empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-light);
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-lighter);
}

/* 반응형 */
@media (max-width: 768px) {
    .notification-popover-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .notification-popover .notification-header {
        padding: 16px 20px 12px 20px;
    }
    
    .notification-popover .notification-item {
        padding: 10px 16px;
        gap: 8px;
        min-height: 50px;
    }
    
    .notification-popover .notification-avatar {
        width: 32px;
        height: 32px;
    }
    
    .notification-popover .notification-type-icon {
        width: 14px;
        height: 14px;
        font-size: 7px;
    }
}
