/* 내 마인드맵 페이지 스타일 */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5855eb;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #6366f1;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    min-height: 100vh;
}

/* 기본 컨테이너는 사이드바 때문에 사용하지 않음 */

/* 사이드바 스타일 */

/* 메인 콘텐츠 */
.main-content {
    padding: 1.25rem 0; /* 상단 패딩을 20px로 줄임 */
}

/* 액션 바 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem; /* 하단 여백만 유지 */
    flex-wrap: wrap;
    gap: 1rem;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 검색 박스 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    width: 300px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 뷰 토글 */
.view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle .btn {
    border: none;
    border-radius: 0;
    background: var(--surface);
    color: var(--text-secondary);
}

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

/* 정렬 선택 */
.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: var(--background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-danger:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-icon {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
}

/* 로딩 상태 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 빈 상태 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}


.empty-icon {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
}

/* 마인드맵 그리드 */
.mindmaps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 리스트 뷰 스타일 */
.mindmaps-grid.list-view {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
}

.mindmaps-grid.list-view .mindmap-card {
    display: flex !important;
    align-items: center !important;
    gap: 1rem;
    padding: 0.5rem 1rem !important;
    min-height: 48px !important;
    max-height: 48px !important;
    height: 48px !important;
    border-radius: 8px;
    overflow: hidden;
}

.mindmaps-grid.list-view .mindmap-card:hover {
    transform: translateY(-1px);
}

.mindmaps-grid.list-view .card-thumbnail {
    display: none;
}

.mindmaps-grid.list-view .card-content {
    flex: 1;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.mindmaps-grid.list-view .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    width: 100%;
}

.mindmaps-grid.list-view .card-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.mindmaps-grid.list-view .card-content h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.mindmaps-grid.list-view .card-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mindmaps-grid.list-view .card-meta {
    margin: 0;
    justify-content: flex-start;
}

.mindmaps-grid.list-view .card-meta span {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
}

.mindmaps-grid.list-view .card-actions {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.mindmaps-grid.list-view .card-actions .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    height: auto;
    min-height: 28px;
}

.mindmaps-grid.list-view .folder-select {
    font-size: 0.7rem;
    padding: 0.25rem 0.375rem;
    min-width: 100px;
    max-width: 110px;
    height: 28px;
}

/* 마인드맵 카드 */
.mindmap-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mindmap-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.card-thumbnail {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.card-preview {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.card-preview .preview-text {
    font-size: 2.1rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 이미지 미리보기 스타일 */
.card-preview-image {
    background: none !important;
    position: relative;
}

.mindmap-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 0.75rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.image-overlay .preview-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.25rem;
}

/* 소유자 텍스트 스타일 */
.owner-text {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

/* 이미지가 없는 카드의 소유자 텍스트 */
.card-preview .owner-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 1.0rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end; /* 우측 정렬 */
    align-items: center;
}

.card-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* 폴더 선택 버튼은 기본 btn 스타일 사용 */

/* 카드 배지 */
.card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    z-index: 10;
}

.card-badge-public {
    background-color: #10b981 !important; /* 초록색 */
    color: white !important;
}

.card-badge-invited {
    background-color: #f59e0b !important; /* 주황색 */
    color: white !important;
}

.card-badge-private {
    background-color: #ef4444 !important; /* 빨간색 (기존 공개 색상) */
    color: white !important;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-container {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* 폼 요소 */
.info-group {
    margin-bottom: 1.5rem;
}

.info-group.share-group {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* 토글 스위치 */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    width: 100%;
}

.share-settings {
    margin: 0;
}

.toggle-input {
    display: none;
}

.toggle-switch .toggle-label {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 50px;
    height: 26px;
    background-color: var(--border);
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-label {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(24px);
}

.toggle-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    user-select: none;
}

/* 기존 체크박스 스타일 제거 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    pointer-events: none; /* 클릭 이벤트가 부모 label로 전달되도록 */
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 공유 관련 */
.share-section {
    margin-bottom: 2rem;
}

.share-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.invite-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.invite-form .form-input {
    flex: 2;
}

.invite-form .form-select {
    flex: 1;
    min-width: 100px;
    max-width: 140px;
}

.collaborators-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.collaborator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
}

.share-link {
    display: flex;
    gap: 0.5rem;
}

.share-link .form-input {
    flex: 1;
}

/* 폴더 모달 스타일 */
.warning-content {
    text-align: center;
    padding: 1rem 0;
}

.warning-icon {
    font-size: 3rem;
    color: var(--warning);
    margin-bottom: 1rem;
}

.warning-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.folder-mindmaps-info {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

#folderNameInput {
    width: 100%;
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .user-name {
        display: none;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-left, .action-right {
        justify-content: space-between;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .mindmaps-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .info-row {
        grid-template-columns: 1fr;
    }
    
    .invite-form {
        flex-direction: column;
    }
    
    .share-link {
        flex-direction: column;
    }
    
    .card-actions {
        gap: 0.25rem;
    }
    
    .card-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    .folder-select {
        min-width: 90px;
        max-width: 100px;
        font-size: 0.65rem;
        padding: 0.25rem 0.375rem;
    }
    
    .card-actions {
        gap: 0.2rem;
        flex-wrap: wrap;
    }
    
    .card-actions .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
        min-width: auto;
    }
}

/* 사이드바 스타일 */
.main-content {
    display: flex;
    min-height: calc(100vh - 80px); /* 헤더 높이만큼 빼기 */
}

.folders-sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 0;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
}

.sidebar-logo:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* 메인 메뉴 섹션들 */
.mindmaps-section {
    margin-bottom: 0.5rem;
}

.shared-mindmaps-section,
.my-images-section {
    margin-bottom: 0;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    margin-top: auto;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    border-radius: 10px;
    margin: 0;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.sidebar-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    border-color: transparent;
}

.sidebar-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar-item:hover i {
    transform: scale(1.1);
}

.sidebar-item span {
    font-weight: 500;
    font-size: 0.875rem;
    flex: 1;
}

.storage-info {
    font-size: 0.75rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

/* 사이드바 설정 섹션 */
.sidebar-settings {
    padding: 0 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.sidebar-settings .sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.sidebar-settings .sidebar-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.sidebar-settings .sidebar-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* 폴더 섹션 */
.folders-section {
    flex: 1;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    overflow-y: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 1rem;
    margin-bottom: 0.5rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.add-folder-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-folder-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.add-folder-btn i {
    font-size: 0.75rem;
}

/* 폴더 아이템 */
.folder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 0;
}

.folder-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.folder-item.active {
    background: rgba(99, 102, 241, 0.1);
    border-right: 3px solid var(--primary-color);
}

.folder-icon {
    font-size: 1rem;
    color: var(--text-secondary);
    width: 1rem;
    text-align: center;
}

.folder-item.active .folder-icon {
    color: var(--primary-color);
}

.folder-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-item.active .folder-name {
    font-weight: 500;
}

.folder-count {
    font-size: 0.75rem;
    color: var(--text-light);
    background: rgba(148, 163, 184, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 1.5rem;
    text-align: center;
}

.folder-item.active .folder-count {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
}

/* 메인 메뉴 아이템 스타일 */
.all-mindmaps-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.all-mindmaps-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.12) 100%);
    border-left-color: rgba(99, 102, 241, 0.3);
}

.all-mindmaps-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.all-mindmaps-item.active .all-mindmaps-icon,
.all-mindmaps-item.active .all-mindmaps-name {
    color: var(--primary-color);
}

.all-mindmaps-item.active .submenu-toggle {
    color: var(--primary-color);
}

.submenu-toggle {
    font-size: 0.7rem !important;
    margin-right: 4px;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
    width: 12px;
    text-align: center;
    transform: rotate(90deg);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.submenu-toggle:not(.expanded) {
    transform: rotate(0deg);
}

.submenu-toggle.expanded {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.submenu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.all-mindmaps-icon {
    font-size: 1rem;
    color: var(--primary-color);
    width: 1.2rem;
    text-align: center;
}

.all-mindmaps-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.all-mindmaps-count {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(99, 102, 241, 0.1);
}

/* 하위 메뉴 컨테이너 */
.submenu-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    background: rgba(248, 250, 252, 0.6);
    margin: 0.2rem 0.5rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    opacity: 1;
}

.submenu-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0 0.5rem;
}

.submenu-content.expanded {
    max-height: 500px;
    opacity: 1;
}

/* 하위 메뉴 아이템 */
.submenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0.2rem 0.5rem;
    position: relative;
}

.submenu-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    transform: translateX(2px);
}

.submenu-item.active {
    background: linear-gradient(90deg, var(--primary-color), rgba(99, 102, 241, 0.9));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.submenu-icon {
    width: 14px;
    height: 14px;
    font-size: 0.8rem;
    color: inherit;
    flex-shrink: 0;
}

.submenu-name {
    flex: 1;
    font-weight: 500;
}

/* 폴더 섹션 헤더 */
.folder-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.4rem;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.folder-section-icon {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.folder-section-name {
    font-weight: 700;
}

/* 폴더 아이템 (심플 버전) */
.folder-item {
    padding-left: 1.5rem !important;
}

.folder-item-name {
    flex: 1;
    font-weight: 400;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

/* 폴더 액션 컨테이너 */
.folder-item-actions {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 32px;
    height: 24px;
}

.folder-item-count, 
.submenu-count {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    min-width: 20px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: opacity 0.2s ease;
    cursor: pointer;
}

/* 폴더 메뉴 버튼 */
.folder-menu-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    z-index: 10;
}

/* 호버 효과 */
.folder-item:hover .folder-item-count {
    opacity: 0;
}

.folder-item:hover .folder-menu-btn {
    opacity: 1;
    visibility: visible;
}

.folder-menu-btn:hover {
    background: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.submenu-item.active .folder-item-count,
.submenu-item.active .submenu-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.submenu-item.active .folder-menu-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

.submenu-item.active .folder-menu-btn:hover {
    background: white;
    color: var(--secondary-color);
}

/* 새 폴더 추가 아이템 */
.add-folder-item {
    opacity: 0.7;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    margin-top: 0.5rem;
}

.add-folder-item:hover {
    opacity: 1;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* 루트 폴더 특별 스타일 */
.root-folder .folder-item-name {
    font-weight: 500;
}

.root-folder:not(.active) .folder-item-name {
    color: var(--accent-color);
}

/* 폴더 컨텍스트 메뉴 */
.folder-item .folder-menu {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.folder-item:hover .folder-menu {
    opacity: 1;
    pointer-events: auto;
}

.folder-menu-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.folder-menu-btn i {
    font-size: 0.75rem;
}

/* 사이드바 하단 */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: var(--text-primary);
}

/* 컨테이너를 사이드바만큼 밀어내기 */
.container {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 0 2rem 2rem 2rem; /* 상단 패딩 제거 */
    min-height: 100vh;
}

.container {
    flex: 1;
    max-width: none;
}

/* 이미지 관리 스타일 */
.images-container {
    animation: fadeIn 0.3s ease-in-out;
}

.images-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.images-action-bar .action-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.images-action-bar .action-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.storage-overview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.storage-overview h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.storage-bar {
    width: 200px;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.storage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--error));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.storage-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 이미지 그리드 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.image-card {
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
}

.image-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.image-card.selected {
    border: 2px solid var(--primary-color);
}

.image-card-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}

.image-card-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

.image-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.image-info {
    padding: 1rem;
}

.image-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.image-usage {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.usage-count {
    font-weight: 500;
    color: var(--primary-color);
}

.unused {
    color: var(--text-light);
}

.image-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 98;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
    }
    
    .sidebar-header {
        padding: 1rem;
        border-bottom: none;
        border-right: 1px solid var(--border);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .sidebar-item {
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .container {
        margin-left: 0;
        width: 100%;
        padding: 0 1rem 1rem 1rem; /* 상단 패딩 제거 */
        padding-top: calc(100px + 1rem); /* 사이드바 높이 + 최소 패딩 */
    }
    
    .images-action-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .images-action-bar .action-left,
    .images-action-bar .action-right {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .storage-overview {
        order: -1;
        width: 100%;
    }
    
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== 다크모드 스타일 ===== */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --secondary-color: #a78bfa;
    --accent-color: #22d3ee;
    --background: #1f1f1f;
    --surface: #3a3f4d;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border: #334155;
    --border-focus: #818cf8;
    --error: #f87171;
    --success: #34d399;
    --warning: #fbbf24;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mindmap-card {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .mindmap-card:hover {
    box-shadow: 0 8px 32px var(--shadow);
}

[data-theme="dark"] .modal-container {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select {
    background: var(--background);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--border-focus);
}

[data-theme="dark"] .btn {
    border-color: var(--border);
}

[data-theme="dark"] .btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--surface);
}

[data-theme="dark"] .sidebar {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .sidebar-logo-text {
    color: white;
}

[data-theme="dark"] .sidebar-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar-item:hover {
    background: var(--background);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar-item.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .sidebar-settings {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sidebar-settings .sidebar-item {
    color: var(--text-light);
}

[data-theme="dark"] .sidebar-settings .sidebar-item:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .search-box input {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .images-grid .image-card {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .images-grid .image-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

/* 공유 설정 - Visibility 옵션 */
.visibility-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.visibility-option {
    position: relative;
}

.visibility-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.visibility-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
}

.visibility-label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.visibility-option input[type="radio"]:checked + .visibility-label {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.visibility-label i {
    font-size: 18px;
    color: var(--text-secondary);
    min-width: 20px;
}

.visibility-option input[type="radio"]:checked + .visibility-label i {
    color: var(--primary-color);
}

.visibility-label div strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.visibility-label div p {
    color: var(--text-secondary);
    font-size: 12px;
    margin: 2px 0 0 0;
}

.permission-settings {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.permission-settings label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.permission-settings .form-select {
    width: 100%;
}

/* 공유 마인드맵 배지 */
.shared-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.shared-badge i {
    font-size: 10px;
}

/* 권한 배지 */
.permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.permission-badge.owner {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.permission-badge.editor {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.permission-badge.viewer {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

/* 다크 테마 적용 */
[data-theme="dark"] .visibility-label {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .visibility-label:hover {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .permission-settings {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

/* 공유 마인드맵 카드 추가 스타일 */
.shared-mindmap-card {
    border-left: 4px solid var(--primary-color);
}

.shared-mindmap-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shared-mindmap-card .card-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

/* 카드 배지 위치 조정 */
.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.card-badge-public {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.card-badge-invited {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.card-badge-private {
    background: rgba(100, 116, 139, 0.9);
    color: white;
}

/* ===== 프로필 편집 모달 스타일 ===== */
.profile-section {
    margin-bottom: 2rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.current-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.avatar-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.avatar-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:read-only {
    background: var(--background);
    color: var(--text-secondary);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

.profile-stats {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.profile-stats h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 사용자 아바타 클릭 가능하게 스타일링 */
.user-avatar {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 50%;
    padding: 0.5rem;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

/* 토스트 메시지 스타일 */
.toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px var(--shadow-lg);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast i {
    font-size: 1.25rem;
}

.toast-success i {
    color: var(--success);
}

.toast-error i {
    color: var(--error);
}

.toast-info i {
    color: var(--primary-color);
}

/* 다크 테마에서 프로필 모달 */
[data-theme="dark"] .profile-avatar-section,
[data-theme="dark"] .profile-stats {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .stat-item {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .toast {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

/* 폴더 컨텍스트 메뉴 */
.folder-context-menu {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 180px;
    padding: 4px 0;
    backdrop-filter: blur(10px);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-primary);
}

.context-menu-item:hover {
    background: var(--hover-bg);
}

.context-menu-item.danger {
    color: var(--danger-color);
}

.context-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* 폴더 선택 모달 */
#folderSelectModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-select-list {
    max-height: 400px;
    overflow-y: auto;
}

.folder-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 4px;
    position: relative;
}

.folder-select-item:hover {
    background: var(--hover-bg);
}

.folder-select-item.selected {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary-color);
}

.folder-select-item i.fas.fa-folder {
    color: var(--primary-color);
    font-size: 16px;
}

.folder-select-item .selected-icon {
    color: var(--primary-color);
    font-size: 14px;
    margin-left: auto;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

[data-theme="dark"] .folder-context-menu {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
